{"name":"BIS_fnc_clerp","operator":null,"title":"BIS fnc clerp","type":"function","url":"https://community.bistudio.com/wiki/BIS_fnc_clerp","revid":349253,"updated":"2023-11-08T14:51:03Z","groups":["Interpolation"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"1.78"}],"since":{"game":"arma3","name":"Arma 3","version":"1.78"},"arma3_since":"1.78","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"CLerp - Circular Lerp - is like lerp but handles the wraparound from 0 to 360\n This is useful when interpolating eulerAngles and the object crosses the 0/360 boundary\n The standard Lerp function causes the object to rotate in the wrong direction, clerp fixes that","syntaxes":[{"syntax":"[currentValue, targetValue, alpha] call BIS_fnc_clerp","since":null,"effect":null,"exec":null,"params":[{"name":"currentValue","type":"Number","optional":false,"default":null,"description":"the current value","types":["Number"],"since":null,"text":"currentValue: Number - the current value"},{"name":"targetValue","type":"Number","optional":false,"default":null,"description":"the target value","types":["Number"],"since":null,"text":"targetValue: Number - the target value"},{"name":"alpha","type":"Number","optional":false,"default":null,"description":"the alpha","types":["Number"],"since":null,"text":"alpha: Number - the alpha"}],"returns":{"type":"Number","types":["Number"],"description":"interpolated value","text":"Number - interpolated value"}}],"examples":[{"text":"```sqf\n[90,170,0.1] call BIS_fnc_clerp; // Returns 98\n```","code":["[90,170,0.1] call BIS_fnc_clerp; // Returns 98"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["BIS_fnc_slerp","BIS_fnc_lerp","BIS_fnc_lerpVector","BIS_fnc_inverseLerp"],"notes":[],"categories":["Arma 3: Functions","Arma 3: New Functions","Function Group: Interpolation","Functions","Introduced with Arma 3 version 1.78"],"docblock":null,"filled_from_docblock":[]}