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