Floating point compare
Chuck Rice
Posts: 210
.
is this syntax valid?
In other words, can I compare against a floating point constant?
.
is this syntax valid?
if (fp.sin (fp.fsub(Lon2 , Lon1)) < 0.0)
In other words, can I compare against a floating point constant?
.
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
So what is the correct way? I searched Using Parallax Propeller™ Floating Point Routines for compare, but got no hits.
Would it be:
Post Edited (Chuck Rice) : 4/9/2008 8:49:35 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
Post Edited (Paul Baker (Parallax)) : 4/9/2008 9:12:37 PM GMT
returns 1 if NumberA > Number B, -1 if NumberA < NumberB, 0 if equal
Doh! I sure missed that one. Thanks!