BIS fnc smoothStep: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Some wiki formatting) |
Lou Montana (talk | contribs) m (Some wiki formatting) |
||
(One intermediate revision by the same user not shown) | |||
Line 6: | Line 6: | ||
|gr1= Interpolation | |gr1= Interpolation | ||
|descr= Interpolates between 0 and 1 with smoothing at the limits. Formula is {{ | |descr= Interpolates between 0 and 1 with smoothing at the limits. Formula is {{hl|n<sup>2</sup> × (3 - 2n)}}. | ||
|s1= number call [[BIS_fnc_smoothStep]] | |s1= number call [[BIS_fnc_smoothStep]] | ||
Line 14: | Line 14: | ||
|r1= [[Number]] - interpolation result | |r1= [[Number]] - interpolation result | ||
|x1= <sqf>_smoothedStep = 0.75 call BIS_fnc_smoothStep;</sqf> | |x1= <sqf>private _smoothedStep = 0.75 call BIS_fnc_smoothStep;</sqf> | ||
|x2= <sqf> | |x2= <sqf> |
Latest revision as of 11:50, 27 July 2022
Description
- Description:
- Interpolates between 0 and 1 with smoothing at the limits. Formula is n2 × (3 - 2n).
- Execution:
- call
- Groups:
- Interpolation
Syntax
- Syntax:
- number call BIS_fnc_smoothStep
- Parameters:
- number: Number - a number in range 0..1. A value not in range will be floored to 0 or ceiled to 1
- Return Value:
- Number - interpolation result
Examples
- Example 1:
- Example 2:
Additional Information
- See also:
- BIS_fnc_lerp
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