MIST round

From DCS World Wiki - Hoggitworld.com


Added with: Mist 1.0
This function takes a number and returns a rounded version of it. Optional idp defines how many places after the decimal to round the number to; for example, an idp of 2 means the number will be rounded to the nearest hundredth. idp can be negative too, for example, -3 would round to the nearest thousand. If not specified, idp defaults to 0 (rounds to the nearest whole number).
number mist.utils.round(number number , number idp )
Valid Input Values:
(25.2343, 1)
Return value:
Return example:
Usage Examples:
local roundedVal = mist.utils.round(145.25436, 2)
See Google Unit converter. [1]
Related Functions
converter, toDegree, toRadian, round, roundTbl, metersToNM, metersToFeet, NMToMeters, feetToMeters, mpsToKnots, mpsToKmph, knotsToMps, kmphToMps, kelvinToCelsius, FahrenheitToCelsius, celsiusToFahrenheit, hexToRGB

Scripting Engine

MIST Root Page