diff --git a/code/renderergl1/tr_curve.c b/code/renderergl1/tr_curve.c index 40537eac..eaabba46 100644 --- a/code/renderergl1/tr_curve.c +++ b/code/renderergl1/tr_curve.c @@ -182,7 +182,7 @@ static int neighbors[8][2] = { break; // edge of patch } VectorSubtract( ctrl[y][x].xyz, base, temp ); - if ( VectorNormalize2( temp, temp ) == 0 ) { + if ( VectorNormalize( temp ) < 0.001f ) { continue; // degenerate edge, get more dist } else { good[k] = qtrue; @@ -198,7 +198,7 @@ static int neighbors[8][2] = { continue; // didn't get two points } CrossProduct( around[(k+1)&7], around[k], normal ); - if ( VectorNormalize2( normal, normal ) == 0 ) { + if ( VectorNormalize( normal ) < 0.001f ) { continue; } VectorAdd( normal, sum, sum ); diff --git a/code/renderergl2/tr_curve.c b/code/renderergl2/tr_curve.c index 1d7e99e8..d175789b 100644 --- a/code/renderergl2/tr_curve.c +++ b/code/renderergl2/tr_curve.c @@ -182,7 +182,7 @@ static int neighbors[8][2] = { break; // edge of patch } VectorSubtract( ctrl[y][x].xyz, base, temp ); - if ( VectorNormalize2( temp, temp ) == 0 ) { + if ( VectorNormalize( temp ) < 0.001f ) { continue; // degenerate edge, get more dist } else { good[k] = qtrue; @@ -198,7 +198,7 @@ static int neighbors[8][2] = { continue; // didn't get two points } CrossProduct( around[(k+1)&7], around[k], normal ); - if ( VectorNormalize2( normal, normal ) == 0 ) { + if ( VectorNormalize( normal ) < 0.001f ) { continue; } VectorAdd( normal, sum, sum );