PSMoveService
Functions
Angle and Trigonometry Functions

Function parameters specified as angle are assumed to be in units of radians. More...

Functions

template<typename genType >
genType glm::radians (genType const &degrees)
 Converts degrees to radians and returns the result. More...
 
template<typename genType >
genType glm::degrees (genType const &radians)
 Converts radians to degrees and returns the result. More...
 
template<typename genType >
genType glm::sin (genType const &angle)
 The standard trigonometric sine function. More...
 
template<typename genType >
genType glm::cos (genType const &angle)
 The standard trigonometric cosine function. More...
 
template<typename genType >
genType glm::tan (genType const &angle)
 The standard trigonometric tangent function. More...
 
template<typename genType >
genType glm::asin (genType const &x)
 Arc sine. More...
 
template<typename genType >
genType glm::acos (genType const &x)
 Arc cosine. More...
 
template<typename genType >
genType glm::atan (genType const &y, genType const &x)
 Arc tangent. More...
 
template<typename genType >
genType glm::atan (genType const &y_over_x)
 Arc tangent. More...
 
template<typename genType >
genType glm::sinh (genType const &angle)
 Returns the hyperbolic sine function, (exp(x) - exp(-x)) / 2. More...
 
template<typename genType >
genType glm::cosh (genType const &angle)
 Returns the hyperbolic cosine function, (exp(x) + exp(-x)) / 2. More...
 
template<typename genType >
genType glm::tanh (genType const &angle)
 Returns the hyperbolic tangent function, sinh(angle) / cosh(angle) More...
 
template<typename genType >
genType glm::asinh (genType const &x)
 Arc hyperbolic sine; returns the inverse of sinh. More...
 
template<typename genType >
genType glm::acosh (genType const &x)
 Arc hyperbolic cosine; returns the non-negative inverse of cosh. More...
 
template<typename genType >
genType glm::atanh (genType const &x)
 Arc hyperbolic tangent; returns the inverse of tanh. More...
 

Detailed Description

Function parameters specified as angle are assumed to be in units of radians.

In no case will any of these functions result in a divide by zero error. If the divisor of a ratio is 0, then results will be undefined.

These all operate component-wise. The description is per component.

Function Documentation

§ acos()

template<typename genType >
genType glm::acos ( genType const &  x)

Arc cosine.

Returns an angle whose sine is x. The range of values returned by this function is [0, PI]. Results are undefined if |x| > 1.

Template Parameters
genTypeFloating-point scalar or vector types.
See also
GLSL acos man page
GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions

§ acosh()

template<typename genType >
genType glm::acosh ( genType const &  x)

Arc hyperbolic cosine; returns the non-negative inverse of cosh.

Results are undefined if x < 1.

Template Parameters
genTypeFloating-point scalar or vector types.
See also
GLSL acosh man page
GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions

§ asin()

template<typename genType >
genType glm::asin ( genType const &  x)

Arc sine.

Returns an angle whose sine is x. The range of values returned by this function is [-PI/2, PI/2]. Results are undefined if |x| > 1.

Template Parameters
genTypeFloating-point scalar or vector types.
See also
GLSL asin man page
GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions

§ asinh()

template<typename genType >
genType glm::asinh ( genType const &  x)

Arc hyperbolic sine; returns the inverse of sinh.

Template Parameters
genTypeFloating-point scalar or vector types.
See also
GLSL asinh man page
GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions

§ atan() [1/2]

template<typename genType >
genType glm::atan ( genType const &  y,
genType const &  x 
)

Arc tangent.

Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0.

Template Parameters
genTypeFloating-point scalar or vector types.
See also
GLSL atan man page
GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions

§ atan() [2/2]

template<typename genType >
genType glm::atan ( genType const &  y_over_x)

Arc tangent.

Returns an angle whose tangent is y_over_x. The range of values returned by this function is [-PI/2, PI/2].

Template Parameters
genTypeFloating-point scalar or vector types.
See also
GLSL atan man page
GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions

§ atanh()

template<typename genType >
genType glm::atanh ( genType const &  x)

Arc hyperbolic tangent; returns the inverse of tanh.

Results are undefined if abs(x) >= 1.

Template Parameters
genTypeFloating-point scalar or vector types.
See also
GLSL atanh man page
GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions

§ cos()

template<typename genType >
genType glm::cos ( genType const &  angle)

The standard trigonometric cosine function.

The values returned by this function will range from [-1, 1].

Template Parameters
genTypeFloating-point scalar or vector types.
See also
GLSL cos man page
GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions

§ cosh()

template<typename genType >
genType glm::cosh ( genType const &  angle)

Returns the hyperbolic cosine function, (exp(x) + exp(-x)) / 2.

Template Parameters
genTypeFloating-point scalar or vector types.
See also
GLSL cosh man page
GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions

§ degrees()

template<typename genType >
genType glm::degrees ( genType const &  radians)

Converts radians to degrees and returns the result.

Template Parameters
genTypeFloating-point scalar or vector types.
See also
GLSL degrees man page
GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions

§ radians()

template<typename genType >
genType glm::radians ( genType const &  degrees)

Converts degrees to radians and returns the result.

Template Parameters
genTypeFloating-point scalar or vector types.
See also
GLSL radians man page
GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions

§ sin()

template<typename genType >
genType glm::sin ( genType const &  angle)

The standard trigonometric sine function.

The values returned by this function will range from [-1, 1].

Template Parameters
genTypeFloating-point scalar or vector types.
See also
GLSL sin man page
GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions

§ sinh()

template<typename genType >
genType glm::sinh ( genType const &  angle)

Returns the hyperbolic sine function, (exp(x) - exp(-x)) / 2.

Template Parameters
genTypeFloating-point scalar or vector types.
See also
GLSL sinh man page
GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions

§ tan()

template<typename genType >
genType glm::tan ( genType const &  angle)

The standard trigonometric tangent function.

Template Parameters
genTypeFloating-point scalar or vector types.
See also
GLSL tan man page
GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions

§ tanh()

template<typename genType >
genType glm::tanh ( genType const &  angle)

Returns the hyperbolic tangent function, sinh(angle) / cosh(angle)

Template Parameters
genTypeFloating-point scalar or vector types.
See also
GLSL tanh man page
GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions