Trim Floating Point

#Firmware/v302
fp = float.dp(fv, tv)

Trims and rounds a floating point number.

Parameter Type Description
fv number Floating point that needs trimming
tv number Trim value. e.g. 0.001 trims to 3 DP
Returns Type Description
fp number Floating point result
local v = float.dp(123.456, 0.01) -- -> 123.46
local v = float.dp(123.4566, 10)  -- -> 120