From: Tom B. <tom...@gm...> - 2011-09-16 20:55:11
|
I'm cleaning up some old cruft and found this change to HACKING (diff -p) I started some time ago but don't remember the context. I'll submit it if it hasn't been rejected already. *** HACKING Fri Sep 16 15:10:08 2011 --- HACKING.mine Fri Sep 16 15:10:08 2011 *************** Violations of these rules in the existin *** 449,454 **** --- 449,463 ---- follow suit. If code is seen that doesn't conform, it may and should be fixed. + Floating point (FP) comparisons: + + When FP comparisons are absolutely necessary, use the ZERO and EQUAL + macros (defined in vmath.h which is included in bu.h). Examples of + use: + + * instead of "foo == 2.0" use "EQUAL(foo,2.0)" + * instead of "foo > 0.0" use "foo > ZERO" + Code Organization: Code that is potentially useful to another application, or that may be Cheers! -Tom |