| View previous topic :: View next topic |
| Author |
Message |
Iximon
Joined: 08 Sep 2005 Posts: 5
|
Posted: Sat Oct 01, 2005 2:32 am Post subject: float to interger? |
|
|
Hi
I need to convert an float number to an interger
example:
iNumber = 10
fNumber = 2.35
iNumber2 = iNumber/fNumber --the result of this has to be an interger
-- but the value i get when i divide 10 with 2.35 is 4.25531....
-- i just want to have the value 4, and not 4.25531....
please help |
|
| Back to top |
|
 |
LuMo
Joined: 21 Aug 2005 Posts: 410 Location: Austria
|
Posted: Sat Oct 01, 2005 2:42 am Post subject: |
|
|
| Code: | | math.floor( iNumber2 ) |
please use google next time
shows up things like this _________________ "Good artists copy, great artists steal."
Pablo Picasso
go2lumo.com |
|
| Back to top |
|
 |
Iximon
Joined: 08 Sep 2005 Posts: 5
|
Posted: Sat Oct 01, 2005 5:42 am Post subject: |
|
|
| hehe, thx for the help. |
|
| Back to top |
|
 |
|