choicescript
choicescript copied to clipboard
Add *round_floor to round numbers down
You can add 0.5 first to round to the nearest integer.
Let me propose an alternative:
rather than cluttering up the command namespace, why not expose a subset of the functionality of Javascripts Math object?
Perhaps limit this to the single parameter functions: abs acos asin atan ceil cos exp floor log round sin sqrt tan
and expose this through a single math command:
*temp test *set test 3 ... *set test /2 *math floor test
you could give some more non-programmer friendly names to the operations, as well.
Just some thoughts.
I put a math command into my fork for your review, similar to the way I outlined it here.