|
From: <kin...@us...> - 2004-02-19 06:55:26
|
Update of /cvsroot/teem/teem/src/ten In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16501/ten Modified Files: glyph.c tendHelix.c Log Message: going crazy: replaced M_E with AIR_E and M_PI with AIR_PI, out of spite for windows Index: glyph.c =================================================================== RCS file: /cvsroot/teem/teem/src/ten/glyph.c,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** glyph.c 13 Feb 2004 23:00:08 -0000 1.32 --- glyph.c 19 Feb 2004 06:45:13 -0000 1.33 *************** *** 224,232 **** case 0: edge0[1] = edge1[2] = 0; ! ELL_4M_ROTATE_Y_SET(sRot, M_PI/2); break; case 1: edge0[0] = edge1[2] = 0; ! ELL_4M_ROTATE_X_SET(sRot, M_PI/2); break; case 2: default: --- 224,232 ---- case 0: edge0[1] = edge1[2] = 0; ! ELL_4M_ROTATE_Y_SET(sRot, AIR_PI/2); break; case 1: edge0[0] = edge1[2] = 0; ! ELL_4M_ROTATE_X_SET(sRot, AIR_PI/2); break; case 2: default: Index: tendHelix.c =================================================================== RCS file: /cvsroot/teem/teem/src/ten/tendHelix.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** tendHelix.c 7 Jan 2004 15:34:31 -0000 1.4 --- tendHelix.c 19 Feb 2004 06:45:13 -0000 1.5 *************** *** 62,66 **** vpos[0] = AIR_AFFINE(0, xi, sx-1, nout->axis[1].min,nout->axis[1].max); ! #define WPOS(pos, th) ELL_3V_SET((pos), R*cos(th), R*sin(th), S*(th)/(2*M_PI)) #define VAL(th) (WPOS(wpos, th), ELL_3V_DIST(wpos, vpos)) #define RR 0.61803399 --- 62,66 ---- vpos[0] = AIR_AFFINE(0, xi, sx-1, nout->axis[1].min,nout->axis[1].max); ! #define WPOS(pos, th) ELL_3V_SET((pos), R*cos(th), R*sin(th), S*(th)/(2*AIR_PI)) #define VAL(th) (WPOS(wpos, th), ELL_3V_DIST(wpos, vpos)) #define RR 0.61803399 *************** *** 70,78 **** th = atan2(vpos[1], vpos[0]); ! th += 2*M_PI*floor(0.5 + vpos[2]/S - th/(2*M_PI)); ! if (S*th/(2*M_PI) > vpos[2]) { ! t0 = th - M_PI; t3 = th; } else { ! t0 = th; t3 = th + M_PI; } t1 = RR*t0 + CC*t3; --- 70,78 ---- th = atan2(vpos[1], vpos[0]); ! th += 2*AIR_PI*floor(0.5 + vpos[2]/S - th/(2*AIR_PI)); ! if (S*th/(2*AIR_PI) > vpos[2]) { ! t0 = th - AIR_PI; t3 = th; } else { ! t0 = th; t3 = th + AIR_PI; } t1 = RR*t0 + CC*t3; *************** *** 94,98 **** WPOS(wpos, t1); ELL_3V_SUB(wpos, vpos, wpos); ! ELL_3V_SET(fv, -R*sin(t1), R*cos(t1), S/M_PI); ELL_3V_NORM(fv, fv, len); ELL_3V_COPY(rv, wpos); --- 94,98 ---- WPOS(wpos, t1); ELL_3V_SUB(wpos, vpos, wpos); ! ELL_3V_SET(fv, -R*sin(t1), R*cos(t1), S/AIR_PI); ELL_3V_NORM(fv, fv, len); ELL_3V_COPY(rv, wpos); |