Update of /cvsroot/plib/plib/src/sg
In directory sc8-pr-cvs1:/tmp/cvs-serv4204/src/sg
Modified Files:
sg.h
Log Message:
Added sgHypot(SGfloat,SGfloat) to sg.h. Replaced some instances of fabsf/hypotf with sgAbs/sgHypot. Removed a MAC_OSX compatibility patch which is no longer needed.
Index: sg.h
===================================================================
RCS file: /cvsroot/plib/plib/src/sg/sg.h,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -d -r1.55 -r1.56
--- sg.h 30 Nov 2003 21:23:48 -0000 1.55
+++ sg.h 21 Jan 2004 22:33:46 -0000 1.56
@@ -64,6 +64,8 @@
inline SGfloat sgSqrt ( const SGfloat x ) { return (SGfloat) sqrt ( x ) ; }
inline SGfloat sgSquare ( const SGfloat x ) { return x * x ; }
inline SGfloat sgAbs ( const SGfloat a ) { return (a<SG_ZERO) ? -a : a ; }
+inline SGfloat sgHypot ( const SGfloat x, const SGfloat y ) { return sgSqrt( sgSquare(x) + sgSquare(y) ); }
+
/*
Type-casted sin/cos/tan/asin/acos/atan2 ANGLES IN DEGREES
|