Difference between revisions of "MIST mapValue"
From DCS World Wiki - Hoggitworld.com
(Created page with "{{Mission Scripting |fName= mist.utils.mapValue| |vNum = Mist 4.5 |desc= Adjusts the passed value to be relative to the input entries and the output entries. |rtnType= nu...") |
(No difference)
|
Latest revision as of 21:39, 11 February 2022
mist.utils.mapValue
Added with: Mist 4.5 |
Description |
Adjusts the passed value to be relative to the input entries and the output entries. |
Syntax |
number mist.utils.mapValue(number value ,number inMin ,number inMax ,number outMin ,number outMax ) |
Valid Input Values: |
any number |
Return value: |
number |
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 |
Notes: |
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, |