1
Discussion | Обсуждение / Re: Strip trailing zeros from a number
« on: March 19, 2024, 03:59:45 PM »
The "common" way to format as you want in the script using
Code: [Select]
$S{
var value=1.000004;
var approx=numberFormat(value,"f",4);
while (approx.charAt(approx.length-1)=='0' || approx.charAt(approx.length-1)=='.')
approx=approx.slice(0,-1);
approx;
}