This page has been translated automatically.
编程
Fundamentals
Setting Up Development Environment
Usage Examples
UnigineScript
High-Level Systems
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine and Tools
GUI
Double Precision Coordinates
应用程序接口
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Node-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
Rendering-Related Classes
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

Math Trigonometrical Functions

variable acos(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

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

variable asin(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

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

variable atan2(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

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

variable atan(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

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

variable cos(variable arg)

The standard trigonometric cosine function.

Arguments

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

variable sin(variable arg)

The standard trigonometric sine function.

Arguments

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

variable tan(variable arg)

The standard trigonometric tangent.

Arguments

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
Build: ()