Update of /cvsroot/plib/plib/src/ssgAux
In directory sc8-pr-cvs1:/tmp/cvs-serv4204/src/ssgAux
Modified Files:
ssgaBillboards.cxx
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: ssgaBillboards.cxx
===================================================================
RCS file: /cvsroot/plib/plib/src/ssgAux/ssgaBillboards.cxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- ssgaBillboards.cxx 21 Jan 2004 16:30:20 -0000 1.2
+++ ssgaBillboards.cxx 21 Jan 2004 22:33:46 -0000 1.3
@@ -25,12 +25,6 @@
#include "ssgaBillboards.h"
-#ifdef UL_MAC_OSX
-#define fabsf(x) ((x) < 0 ? -(x) : (x))
-#define hypotf(x, y) sqrtf((x)*(x) + (y)*(y))
-#endif
-
-
int ssgaBillboards::total_drawn = 0;
@@ -254,7 +248,7 @@
wx = z_axis[1];
wy = -z_axis[0];
- len = hypotf(wx, wy);
+ len = sgHypot(wx, wy);
if (len > 1e-6f) {
@@ -359,7 +353,7 @@
// pick any orientation
sgVec3 xy, axis = { 0, 0, 0 };
- axis[ fabsf(up[0]) > fabsf(up[1]) ] = 1;
+ axis[ sgAbs(up[0]) > sgAbs(up[1]) ] = 1;
sgVectorProductVec3(xy, up, axis);
sgNormaliseVec3(xy);
|