ACE3/addons/atragmx/functions/fnc_update_inclination_angle.sqf
Phyma ffaa195fe5 Conform function headers to coding guidelines (#5255)
* Fixed headers to work with silentspike python script

* Fixed rest of the files

* Fixed ace-team
2017-06-08 15:31:51 +02:00

27 lines
661 B
Plaintext

/*
* Author: Ruthberg
* Updates the inclination angle input fields
*
* Arguments:
* Reference input field ID <NUMBER>
*
* Return Value:
* None
*
* Example:
* 0 call ace_atragmx_fnc_update_inclination_angle
*
* Public: No
*/
#include "script_component.hpp"
private ["_inclinationAngleCosine", "_inclinationAngleDegree"];
_inclinationAngleCosine = 0.5 max parseNumber(ctrlText 140041) min 1;
_inclinationAngleDegree = -60 max parseNumber(ctrlText 140040) min 60;
if (_this == 0) then {
ctrlSetText [140040, Str(round(acos(_inclinationAngleCosine)))];
} else {
ctrlSetText [140041, Str(round(cos(_inclinationAngleDegree) * 100) / 100)];
};