[Gridflow-cvs] [svn] commit: r3970 - /trunk/base/number.c

gridflow-cvs at artengine.ca gridflow-cvs at artengine.ca
Fri Jul 4 15:24:15 EDT 2008


Author: matju
Date: Fri Jul  4 15:24:15 2008
New Revision: 3970

Log:
fix warnings about && (Claude)

Modified:
    trunk/base/number.c

Modified: trunk/base/number.c
==============================================================================
--- trunk/base/number.c (original)
+++ trunk/base/number.c Fri Jul  4 15:24:15 2008
@@ -198,12 +198,12 @@
 DEF_OP(div2, b==0 ?    0 : div2(a,b), 1, side==at_right && x==1, false)
 DEF_OP(vid,  a==0 ? (T)0 :      b/a , 1, side==at_left  && x==1, false)
 DEF_OP(vid2, a==0 ?    0 : div2(b,a), 1, side==at_left  && x==1, false)
-DEF_OPF(mod, b==0 ? 0 : mod(a,b), b==0 ? 0 : a-b*gf_floor(a/b), 0, false, side==at_left && x==0 || side==at_right && x==1)
-DEF_OPF(dom, a==0 ? 0 : mod(b,a), a==0 ? 0 : b-a*gf_floor(b/a), 0, false, side==at_left && x==0 || side==at_right && x==1)
+DEF_OPF(mod, b==0 ? 0 : mod(a,b), b==0 ? 0 : a-b*gf_floor(a/b), 0, false, (side==at_left && x==0) || (side==at_right && x==1))
+DEF_OPF(dom, a==0 ? 0 : mod(b,a), a==0 ? 0 : b-a*gf_floor(b/a), 0, false, (side==at_left && x==0) || (side==at_right && x==1))
 //DEF_OPF(rem, b==0 ? 0 : a%b, b==0 ? 0 : a-b*gf_trunc(a/b))
 //DEF_OPF(mer, a==0 ? 0 : b%a, a==0 ? 0 : b-a*gf_trunc(b/a))
-DEF_OP(rem, b==0?(T)0:a%b, 0, false, side==at_left&&x==0 || side==at_right&&x==1)
-DEF_OP(mer, a==0?(T)0:b%a, 0, false, side==at_left&&x==0 || side==at_right&&x==1)
+DEF_OP(rem, b==0?(T)0:a%b, 0, false, (side==at_left&&x==0) || (side==at_right&&x==1))
+DEF_OP(mer, a==0?(T)0:b%a, 0, false, (side==at_left&&x==0) || (side==at_right&&x==1))
 #endif
 #ifdef PASS2
 DEF_OP(gcd,   gcd(a,b), 0, x==0, x==1)
@@ -221,10 +221,10 @@
 DEF_OP(cmp, cmp(a,b), 0, false, false)
 DEF_OP(eq,  a == b, 0, false, false)
 DEF_OP(ne,  a != b, 0, false, false)
-DEF_OP(gt,  a >  b, 0, false, side==at_left&&x==nt_smallest(&x)||side==at_right&&x==nt_greatest(&x))
-DEF_OP(le,  a <= b, 0, false, side==at_left&&x==nt_smallest(&x)||side==at_right&&x==nt_greatest(&x))
-DEF_OP(lt,  a <  b, 0, false, side==at_left&&x==nt_greatest(&x)||side==at_right&&x==nt_smallest(&x))
-DEF_OP(ge,  a >= b, 0, false, side==at_left&&x==nt_greatest(&x)||side==at_right&&x==nt_smallest(&x))
+DEF_OP(gt,  a >  b, 0, false, (side==at_left && x==nt_smallest(&x)) || side==at_right && x==nt_greatest(&x)))
+DEF_OP(le,  a <= b, 0, false, (side==at_left && x==nt_smallest(&x)) || side==at_right && x==nt_greatest(&x)))
+DEF_OP(lt,  a <  b, 0, false, (side==at_left && x==nt_greatest(&x)) || side==at_right && x==nt_smallest(&x)))
+DEF_OP(ge,  a >= b, 0, false, (side==at_left && x==nt_greatest(&x)) || side==at_right && x==nt_smallest(&x)))
 #endif
 #ifdef PASS3
 DEF_OP(sinmul, (float64)b * sin((float64)a * (M_PI / 18000)), 0, false, false) // "LN=9000+36000n RA=0 LA=..."



More information about the Gridflow-cvs mailing list