This page has been translated automatically.
UnigineEditor
Interface Overview
Assets Workflow
Settings and Preferences
Working With Projects
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Landscape Tool
Using Editor Tools for Specific Tasks
Extending Editor Functionality
Programming
Fundamentals
Setting Up Development Environment
Usage Examples
UnigineScript
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine Tools
GUI
Double Precision Coordinates
API
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes
Warning! This version of documentation is OUTDATED, as it describes an older SDK version! Please switch to the documentation for the latest SDK version.
Warning! This version of documentation describes an old SDK version which is no longer supported! Please upgrade to the latest SDK version.

Math Trigonometric Functions

Warning
The scope of applications for UnigineScript is limited to implementing materials-related logic (material expressions, scriptable materials, brush materials). Do not use UnigineScript as a language for application logic, please consider C#/C++ instead, as these APIs are the preferred ones. Availability of new Engine features in UnigineScipt (beyond its scope of applications) is not guaranteed, as the current level of support assumes only fixing critical issues.

This class contains basic and inverse trigonometric functions.

variable acos ( variable arg ) #

Returns the arc cosine of the given argument - the angle in radians, whose cosine is equal to arg. a == cos(acos(a)) for every value of a that is within acos()'s range.

Arguments

Return value

Arc cosine of arg, in radians. 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 ) #

Returns the arc sine of the given argument - the angle in radians, whose sine is equal to arg. a == sin(asin(a)) for every value of a that is within asin()'s range.

Arguments

Return value

Arc sine of arg, in radians. 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 ) #

Returns the arc tangent of the given argument - the angle in radians, whose tangent is equal to arg. a == tan(atan(a)) for every value of a that is within atan()'s range.

Arguments

Return value

Arc tangent of arg, in radians. 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 ) #

Returns the arc tangent of two variables (x and y). 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 cos ( variable arg ) #

Returns the cosine of the given argument.

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 ) #

Returns the sine of the given argument.

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 ) #

Returns the tangent of the given argument.

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