You can't. TomToad is suggesting that you convert your float to a string and then chop off the parts you don't want, which is okay, but as soon as you want to actually use that number to do something you'd have to convert it back to a float again.
Floats and doubles are NOT accurate enough to represent all numbers *exactly*, it is an approximation of a real number. Even numbers that you think would be easy to represent with less decimal places cannot be represented simply because that number may not fall on a numerical boundary supported by the number format.
You can only get exact numbers of decimal places by using either fractions or fixed-point numbers. To use fixed point numbers to 2 decimal places, just use Integers and multiple or divide them by 100 to represent the precision you need. e.g.
I guess it depends what you want to use it for.
Floats and doubles are NOT accurate enough to represent all numbers *exactly*, it is an approximation of a real number. Even numbers that you think would be easy to represent with less decimal places cannot be represented simply because that number may not fall on a numerical boundary supported by the number format.
You can only get exact numbers of decimal places by using either fractions or fixed-point numbers. To use fixed point numbers to 2 decimal places, just use Integers and multiple or divide them by 100 to represent the precision you need. e.g.
'I want 1.50,2.49 Local MyInt:Int=150 Local MyInt2:Int=249 MyInt2:+001 'add 0.01 to it Plot MyInt/100.0,MyInt2/100.0
I guess it depends what you want to use it for.