From Bohemia Interactive Community
					 
					
					
					
					
Hover & click on the images for description
 
Description
- Description:
 
- Converts given value from given "from" range to wanted "to" range. If clipping is set to true, the resulting value is guaranteed to be within "to" range no matter what. 
 
- Groups:
 
- Math
 
Syntax
- Syntax:
 
- linearConversion [minFrom, maxFrom, value, minTo, maxTo, clip]
 - Parameters:
 
- minFrom: Number - start "from" range
 
- maxFrom: Number - end "from" range
 
- value: Number - given value from "from" range
 
- minTo: Number - start "to" range
 
- maxTo: Number - end "to" range
 
- clip: Boolean - (Optional, default false) if true, resulting value cannot leave "to" range
 - Return Value:
 
- Number - respectful value from "to" range
 
Examples
- Example 1:
 - Example 2:
 - Example 3:
 
Additional Information
- See also:
 
- round floor ceil vectorLinearConversion bezierInterpolation
 
Notes
- 
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here!
Add Note