This version of documentation is OUTDATED! Please switch to the latest one.

Math Trigonometrical Functions

variableacos (variable arg)

Arc cosine. acos() is the inverse cosine function, which means that a == cos(acos(a)) for every value of a that is within acos()'s range.

Arguments

• variable arg - Argument. Can be the following types:

Return value

Arc cosine of arg. The type of returned value will depend on the argument type:
• float for int, long, float arguments
• double for double arguments
• vec4 for vec4 arguments
• dvec3 for dvec3 arguments
• dvec4 for dvec4 arguments

variableasin (variable arg)

Arc sine. asin() is the inverse sine function, which means that a == sin(asin(a)) for every value of a that is within asin()'s range.

Arguments

• variable arg - Argument. Can be the following types:

Return value

Arc sine of arg. The type of returned value will depend on the argument type:
• float for int, long, float arguments
• double for double arguments
• vec4 for vec4 arguments
• dvec3 for dvec3 arguments
• dvec4 for dvec4 arguments

variableatan2 (variable y, variable x)

Arc tangent of two variables. It is similar to calculating the arc tangent of y / x, except that the signs of both arguments are used to determine the quadrant of the result.

Arguments

• variable y - First argument. Can be the following types:
• variable x - Second argument.

Return value

Result in radians, which is between -PI and PI (inclusive). The type of returned value will depend on the argument type:
• float for int, long, float arguments
• double for double arguments
• vec4 for vec4 arguments
• dvec3 for dvec3 arguments
• dvec4 for dvec4 arguments

variableatan (variable arg)

Arc tangent. atan() is the inverse tangent function, which means that a == tan(atan(a)) for every value of a that is within atan()'s range.

Arguments

• variable arg - Argument. Can be the following types:

Return value

Arc tangent of arg. The type of returned value will depend on the argument type:
• float for int, long, float arguments
• double for double arguments
• vec4 for vec4 arguments
• dvec3 for dvec3 arguments
• dvec4 for dvec4 arguments

variablecos (variable arg)

The standard trigonometric cosine function.

Arguments

• variable arg - Argument in radians. Can be the following types:

Return value

Cosine of arg. The type of returned value will depend on the argument type:
• float for int, long, float arguments
• double for double arguments
• vec4 for vec4 arguments
• dvec3 for dvec3 arguments
• dvec4 for dvec4 arguments

variablesin (variable arg)

The standard trigonometric sine function.

Arguments

• variable arg - Argument in radians. Can be the following types:

Return value

Sine of arg. The type of returned value will depend on the argument type:
• float for int, long, float arguments
• double for double arguments
• vec4 for vec4 arguments
• dvec3 for dvec3 arguments
• dvec4 for dvec4 arguments

variabletan (variable arg)

The standard trigonometric tangent.

Arguments

• variable arg - Argument in radians. Can be the following types:

Return value

Tangent of arg. The type of returned value will depend on the argument type:
• float for int, long, float arguments
• double for double arguments
• vec4 for vec4 arguments
• dvec3 for dvec3 arguments
• dvec4 for dvec4 arguments
Last update: 2017-07-03