[Gridflow-cvs] [svn] commit: r6617 - /trunk/src/gridflow.hxx

svn-gridflow at artengine.ca svn-gridflow at artengine.ca
Thu Feb 17 17:28:45 EST 2011


Author: matju
Date: Thu Feb 17 17:28:44 2011
New Revision: 6617

Log:
fixing bug : insufficient lcm precision causes crashes in grid.cxx (which shouldn't have to use lcm)

Modified:
    trunk/src/gridflow.hxx

Modified: trunk/src/gridflow.hxx
==============================================================================
--- trunk/src/gridflow.hxx (original)
+++ trunk/src/gridflow.hxx Thu Feb 17 17:28:44 2011
@@ -155,7 +155,7 @@
 }
 
 // least common multiple; this runs in log(a+b) like gcd.
-template <class T> static inline T lcm (T a, T b) {return a*b/gcd(a,b);}
+template <class T> static inline T lcm (T a, T b) {return (int64)a*b/gcd(a,b);}
 
 // returns the position (0..63) of highest bit set in a word, or 0 if none.
 #define Z(N) if ((x>>N)&(((typeof(x))1<<N)-1)) { x>>=N; i+=N; }



More information about the Gridflow-cvs mailing list