I try to get altitude in a datafield, but it gives a lot of decimals. I can't find how to get rid of the decimals
But it rounds, only the altitude but still gives a lot of zeros as decimal.
var x = 3.6583;
x = Math.round[x];
System.println["x = " + x.Format["%d"]]; // should print "4"
function compute[]
{
var x = 3.6583;
x = Math.round[x].toNumber[];
System.println["x = " + x]; // should print "4"
return x; // will be displayed as "4"
}