Hey guys,
I have an application where I need to preserve trailing zeroes for numbers within a list when using the round function. I know trailing zeroes can be preserved in column formatting but the numbers I am working with exist outside of a column object.
An example below
list_x = {23.04, 24.12,59.632,87.9913};
rounded_x = {};
for(i = 1, i <= nitems(list_x), i++,
rounded_x[i] = round(list_x[i], 1);
);
show(rounded_x);
The returned list does not show trailing zeroes
rounded_x = {23, 24.1, 59.6, 88};
I looked for ways to force something to a float with specific decimal places but couldnt find anything in the scripting index (at least for the keywords I was using)