Hey Scott,
I THINK this will work…
local yourNumber = 3.7685344
yourNumber = math.floor(yourNumber\*100)/100
The idea being:
Multiply your number by 100 to shift the decimal point to the right 2 places.
Use floor to cleave off everything after the decimal point.
Divide your number by 100 to shift the decimal point to the left 2 places.
Now, your number is negative so you would have to use -100:
local yourNumber = -.432568
yourNumber = math.floor(yourNumber\*-100)/-100
I realize it is not the most robust solution but it should work. Ideally there would be some some of precision function that truncates but doesn’t round anything. [import]uid: 8444 topic_id: 19049 reply_id: 73458[/import]