Q: Get signed decimal part from number?
Given, for example, the numbers (which are themselves the result of a calculation)
-9.12, -7.45, -0.52, 0.52, 7.45, 9.12
In JS FX or lua, what is the best way to get these formatted results from them?
-12, -45, -52, +52, +45 and +12
I've tried various combos of %, floor() and ceil(), but no luck so far.
Also, do those numbers after the decimal point have a mathematical name?
__________________
DarkStar ... interesting, if true. . . . Inspired by ...
|