MIST mapValue

From DCS World Wiki - Hoggitworld.com


Added with: Mist 4.5
Adjusts the passed value to be relative to the input entries and the output entries.
number mist.utils.mapValue(number value ,number inMin ,number inMax ,number outMin ,number outMax )
Valid Input Values:
any number
Return value:
Return example:
Usage Examples:
The following adjusts the value of 5 relative between 0 and 10 to be between 0 and 100.
   local val = mist.mapValue(5, 0, 10, 0, 100)
   env.info(val) --> 50
Related Functions
makeUnitTable, getRandPointInCircle, getRandomPointInZone, getRandomPointInPoly, isTerrainValid, terrainHeightDiff, getUnitsInZones, getUnitsInMovingZones, pointInPolygon, getUnitsInPolygon, getDeadMapObjsInZones, getDeadMapObjsInPolygonZone, getUnitsLOS, random, randomizeNumTable, getAvgPoint, getQFE, getWindBearingAndVel, getPathLength, getPathInSegments, getPointAtDistanceOnPath, projectPoint, getGroupsByAttribute, , getUnitsByAttribute, mapValue,

Scripting Engine

MIST Root Page