BIS fnc smoothStep: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "_x" to "_x")
m (Text replacement - "{{Inline code|" to "{{ic|")
Line 7: Line 7:
|gr1 = Interpolation
|gr1 = Interpolation


| Interpolates between 0 and 1 with smoothing at the limits. Formula is {{Inline code|n² × (3 - 2n)}}.
| Interpolates between 0 and 1 with smoothing at the limits. Formula is {{ic|n² × (3 - 2n)}}.


| number call [[BIS_fnc_smoothStep]]
| number call [[BIS_fnc_smoothStep]]

Revision as of 18:10, 27 February 2021

Hover & click on the images for description

Description

Description:
Description needed
Execution:
call
Groups:
Interpolation

Syntax

Syntax:
Syntax needed
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:
Return value needed

Examples

Example 1:
_smoothedStep = 0.75 call BIS_fnc_smoothStep;
Example 2:
[0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0] apply { _x call BIS_fnc_smoothStep; }; // returns [0, 0.028, 0.104, 0.216, 0.352, 0.5, 0.648, 0.784, 0.896, 0.972, 1]

Additional Information

See also:
See also needed

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