2018-09-17 19:19:29 +00:00
|
|
|
#include "script_component.hpp"
|
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
|
|
|
|
*/
|
|
|
|
|
2017-10-10 14:39:59 +00:00
|
|
|
private _inclinationAngleCosine = 0.5 max parseNumber(ctrlText 140041) min 1;
|
|
|
|
private _inclinationAngleDegree = -60 max parseNumber(ctrlText 140040) min 60;
|
2015-04-18 13:52:06 +00:00
|
|
|
|
|
|
|
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
|
|
|
};
|