Using 'floor' for +ve floats
BlitzMax Forums/BlitzMax Beginners Area/Using 'floor' for +ve floats
| ||
Hi, Just noticed that for +ve floats, you can use Int() to get the same value. Int(5.1) gives 5 int(5.9) gives 5 also. This is different to Int() in B3D. Int() is also a good bit faster then Floor(). Jim |
| ||
Just noticed that for +ve floats To clarify for others, Floor and Int don't work the same on negative numbers (round down and up respectively) |
| ||
Floor(x) is a floating point value and means "x rounded toward negative infinity". Int(x) is an integer, "x with everything after the decimal point deleted". |