Floating point to integer?
Sniper King
Posts: 221
I figured out string to float, float to string, now how about float to integer.· Thought that would be an easy one but of course learning russian.... i mean spin·has been a curve for sure.· Love it though.
What I am really trying to do is the opposite of the Float32Full method of FFloat.
[noparse][[/noparse]code]
Var
··· byte X
··· long Y
OBJ
······ Fp· :· "Float32Full"
Pub Change
X:=5
fp.start
y:=Fp.ffloat(x)
X:=??????(y)
[noparse][[/noparse]/code]
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·- Was it pin 11 or 26?· Hmmm....··I think the smell of smoke tells the whole story.· Must be 26.
Michael King
Application Engineer
R&D
Digital Technology Group
Post Edited (Sniper King) : 6/11/2008 7:38:42 PM GMT
What I am really trying to do is the opposite of the Float32Full method of FFloat.
[noparse][[/noparse]code]
Var
··· byte X
··· long Y
OBJ
······ Fp· :· "Float32Full"
Pub Change
X:=5
fp.start
y:=Fp.ffloat(x)
X:=??????(y)
[noparse][[/noparse]/code]
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·- Was it pin 11 or 26?· Hmmm....··I think the smell of smoke tells the whole story.· Must be 26.
Michael King
Application Engineer
R&D
Digital Technology Group
Post Edited (Sniper King) : 6/11/2008 7:38:42 PM GMT
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
integer := FP.FTrunc(fpnumber) or integer := FP.FRound(fpnumber)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.