Describe the bug
All of the trigonometric functions (cos, tan, sin, etc) in SQF-VM are backed by the underlying C++ std library functions of the same name.
However, C++ uses radians exclusively for parameters + return values, whereas Arma 3 uses degrees.
SQF-VM needs to convert degrees to radians before passing it to the underlying std:: functions.
To Reproduce
Steps to reproduce the behavior:
Do sin 30 in SQF-VM. Correct value is 0.5, actual value is not.
Expected behaviorsin 30 takes degrees, and returns 0.5.
Additional context
Affected operators are (in order of appearance in ops_math.cpp)
Describe the bug All of the trigonometric functions (cos, tan, sin, etc) in SQF-VM are backed by the underlying C++ std library functions of the same name.
However, C++ uses radians exclusively for parameters + return values, whereas Arma 3 uses degrees. SQF-VM needs to convert degrees to radians before passing it to the underlying std:: functions.
To Reproduce Steps to reproduce the behavior:
sin 30
in SQF-VM. Correct value is 0.5, actual value is not.Expected behavior
sin 30
takes degrees, and returns 0.5.Additional context Affected operators are (in order of appearance in ops_math.cpp)