getting the decimal part of a number
Posted: November 25th, 2020, 6:43 am
Is there an easy way to get that?
For example:
i = 23.45678;
j = fn(i);
j would be .45678
I´m using now a maketext to string, then string to number and then a subtraction, like:
i = 23.456789;
x = maketext("%7.0f", i);
j = tonumber(x);
k = i - j;
For example:
i = 23.45678;
j = fn(i);
j would be .45678
I´m using now a maketext to string, then string to number and then a subtraction, like:
i = 23.456789;
x = maketext("%7.0f", i);
j = tonumber(x);
k = i - j;