Math Commands: Difference between revisions
Lou Montana (talk | contribs) m (→Commands Introduced with Arma 3 v1.22: typo... and layout.) |
m (Removed random commands from see also and added extern links for radian and degree) |
||
Line 57: | Line 57: | ||
* [[vectorMagnitudeSqr]] | * [[vectorMagnitudeSqr]] | ||
== | ==See Also== | ||
*[ | *[https://en.wikipedia.org/wiki/Degree_%28angle%29 Degrees] | ||
*[ | *[https://en.wikipedia.org/wiki/Radian Radians] | ||
[[Category: Scripting Topics]] | [[Category: Scripting Topics]] |
Revision as of 19:13, 11 August 2020
Math Commands
All of these commands work with and/or return a generic type Number.
In the scripting language (unlike config's) there is no specialty types such as float or integer. All numeric values are represented solely as a Number type.
However, specific commands listed below expect specific types of value e.g. Radians, Degrees, and floats.
Be aware that although not directly related to the list below many commands in the scripting language restrict the range of possible values. Particularly commands wanting ratios between 0.0 and 1.0 (e.g. no integer > 1 is possible). Check individual documentation for the command itself.
Also, the Boolean is a true type in command syntax. The results (the return value) of the below list should not be used directly in a boolean type expression(s).
- Good
? (a > 0) : exit;
Commands Introduced with Arma 3 v1.22
In 1.22 the following math commands were added to simplify vector management. See this post for more information.
Returning an Array:
Returning a Number: