Nic
2010-09-30 15:59:01 UTC
Hello,
I'm wandering how to store a floating point number (float) in an int
and then convert it back to the origional floating point number again.
From what I understand, if I cast to int (int i = (int)floatnumber)
this will round the number down to the nearest whole number which is
not want I'm looking for. Can this be done?
Thanks in advance
Nic
I'm wandering how to store a floating point number (float) in an int
and then convert it back to the origional floating point number again.
From what I understand, if I cast to int (int i = (int)floatnumber)
this will round the number down to the nearest whole number which is
not want I'm looking for. Can this be done?
Thanks in advance
Nic