Im basically making a speed gun system for my game, but once I get the result I get ridiculous numbers with 20 or so decimal digits, is it possible to round it down to just 1? I’ve seen people use math.floor but as far as I know it rounds it to the nearest whole number where as I need to it to round to round to 1 decimal, for example:
local x = 4.6787673219385
function Round(Number)
return math.floor(Number)
end
print(Round(x))
This would return 5, I need it to return 4.6 or 4.7 instead
this does not work if there is a 0 at the end. For example, if the number starting is 4.0193, it will only output “4”, not “4.0”
How do we get this 0 to stay on the end?