MathLib.cos function

MathLib.cos returns the cosine of an angle that is measured in radians.

Package

eglx.lang

Syntax
static function cos(value float in) returns(float);
value
Takes the numeric value of an angle, in radians.

The returned value is between -1 and 1, inclusive.

Example use

Here is example code:

result = mathLib.cos(myVar);
Comments

In the case of Java™, EGL uses methods in the Java StrictMath class that are equivalent to the EGL functions. This usage ensures that the runtime behavior is the same for every Java Virtual Machine.

Compatibility

Table 1. Compatibility
Target Issue
Java No issues.
JavaScript No issues.