TRIGONOMETRY FUNCTIONS

Sine

float sin(float x)
float2 sin(float2 x)
float3 sin(float3 x)
float4 sin(float4 x)

The function returns the sine of an angle in radians. The input parameter can be a float scalar or a float vector. In case of a float vector the sine is calculated separately for every component.

Cosine

float cos(float x)
float2 cos(float2 x)
float3 cos(float3 x)
float4 cos(float4 x)

The function returns the cosine of an angle in radians. The input parameter can be a float scalar or a float vector. In case of a float vector the cosine is calculated separately for every component.

Tangent

float tan(float x)
float2 tan(float2 x)
float3 tan(float3 x)
float4 tan(float4 x)

The function returns the tangent of an angle in radians. The input parameter can be a float scalar or a float vector. In case of a float vector the tangent is calculated separately for every component.

Arcsine

float asin(float x)
float2 asin(float2 x)
float3 asin(float3 x)
float4 asin(float4 x)

The function returns the arcsine. It is the inverse function of sine. The input parameter can be a float scalar or a float vector. In case of a float vector the arcsine is calculated separately for every component.

Arccosine

float acos(float x)
float2 acos(float2 x)
float3 acos(float3 x)
float4 acos(float4 x)

The function returns the arccosine. It is the inverse function of cosine. The input parameter can be a float scalar or a float vector. In case of a float vector the arccosine is calculated separately for every component.

Arctangent

float atan(float y\_over\_x)
float2 atan(float2 y\_over\_x)
float3 atan(float3 y\_over\_x)
float4 atan(float4 y\_over\_x)

The function returns the arctangent. It is the inverse function of tangent. The input parameter can be a float scalar or a float vector. In case of a float vector the arctangent is calculated separately for every component.