Float Question
CannibalRobotics
Posts: 535
Why does:
TimeZone := f.Ftrunc(f.div(Lon,15.0))
give me the result: -6.085645e+38 when sent to debug with
debug.str(fs.FloatToString(TimeZone))
'Lon' has been set up as a floating point value via FFloat() and is correctly displayed as -97 with
debug.str(fs.FloatToString(Lon))
The -6 part is correct but neither FRound or FTrunc seem to work at 'intgerizing'.
I'm missing something...
TimeZone := f.Ftrunc(f.div(Lon,15.0))
give me the result: -6.085645e+38 when sent to debug with
debug.str(fs.FloatToString(TimeZone))
'Lon' has been set up as a floating point value via FFloat() and is correctly displayed as -97 with
debug.str(fs.FloatToString(Lon))
The -6 part is correct but neither FRound or FTrunc seem to work at 'intgerizing'.
I'm missing something...
Comments
Replace debug.str(fs.FloatToString(Lon)) with debug.dec(TimeZone)
John Abshier
It's interesting that fRound and fTrunc return integers but all of the other functions return float's,,, I guess - it does leave me wanting a better documentation reference to the Float32 routines.
Any suggestions? I looked at Cam's write up and it's great on time and space but still does not say much for specific call functionality.
Thanks in advance.
Jonathan