Total RP 3: Extended

Total RP 3: Extended

903k Downloads

Automatically truncating variable decimals

Solanya opened this issue ยท 0 comments

commented

Numeric variables are shown with too much decimals at the moment, which can be excessive in particular for coordinates, or when there's a floating point hanging.
Variables will be truncated to 2 decimals max automatically, with a tag option to adjust how many variables should be shown : ${variable#X} with X being the amount of decimals max.

variable = 2.5463 / ${variable} = 2.55 / ${variable#1} = 2.5
variable = 2 / ${variable} = 2 / ${variable#5} = 2

It accepts negative numbers as well, because why not. For example, -1 will round to the tens, -2 to the hundreds...

Code is already in feature/decimals_truncation, ready for pull request.