Adding boolean return value to SnapNormal(). Returns true if the normal

was modified, false otherwise.


git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/branches/Rambetter-math-fix-experiments@399 8a3a26a2-13c4-0310-b231-cf6edde360e5
This commit is contained in:
rambetter 2011-01-01 02:48:28 +00:00
parent 3afaacd5b2
commit 2bdcb2d3c2

View file

@ -155,7 +155,7 @@ SnapNormal()
snaps a near-axial normal vector
*/
void SnapNormal( vec3_t normal )
qboolean SnapNormal( vec3_t normal )
{
#if EXPERIMENTAL_SNAP_NORMAL_FIX
int i;
@ -187,7 +187,9 @@ void SnapNormal( vec3_t normal )
if (adjusted)
{
VectorNormalize(normal, normal);
return qtrue;
}
return qfalse;
#else
int i;
@ -233,15 +235,16 @@ void SnapNormal( vec3_t normal )
{
VectorClear( normal );
normal[ i ] = 1;
break;
return qtrue;
}
if( fabs( normal[ i ] - -1 ) < normalEpsilon )
{
VectorClear( normal );
normal[ i ] = -1;
break;
return qtrue;
}
}
return qfalse;
#endif
}