Skip to content

Latest commit

 

History

History
135 lines (101 loc) · 6.66 KB

func_trigonometric.md

File metadata and controls

135 lines (101 loc) · 6.66 KB

func_trigonometric methods

The following methods are all part of the func_trigonometric methods.
Function parameters specified as angle are assumed to be in units of radians.

Table of contents

acos() function

glm.acos(x: float) -> float

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

glm.acos(x: vecN) -> vecN

  Returns acos(c) for every component c of x.

acosh() function

glm.acosh(x: float) -> float

  Arc hyperbolic cosine; returns the non-negative inverse of cosh. Results are undefined
  if x < 1.

glm.acosh(x: vecN) -> vecN

  Returns acosh(c) for every component c of x.

asin() function

glm.asin(x: float) -> float

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

glm.asin(x: vecN) -> vecN

  Returns asin(c) for every component c of x.

asinh() function

glm.asinh(x: float) -> float

  Arc hyperbolic sine; returns the inverse of sinh.

glm.asinh(x: vecN) -> vecN

  Returns asinh(c) for every component c of x.

atan() function

glm.atan(y_over_x: float) -> float

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

glm.atan(y_over_x: vecN) -> vecN

  Returns atan(c) for every component c of x.

glm.atan(y: float, x: float) -> float

  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.

glm.atan(y: vecN, x: vecN) -> vecN

  Returns atan(y[i], x[i]) for every index i.

atanh() function

glm.atanh(x: float) -> float

  Arc hyperbolic tangent; returns the inverse of tanh. Results are undefined if abs(x) >= 1.

glm.atanh(x: vecN) -> vecN

  Returns atanh(c) for every component c of x.

cos() function

glm.cos(angle: float) -> float

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

glm.cos(angle: vecN) -> vecN

  Returns cos(c) for every component c of x.

cosh() function

glm.cosh(angle: float) -> float

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

glm.cosh(angle: vecN) -> vecN

  Returns cosh(c) for every component c of x.

degrees() function

glm.degrees(angle: float) -> float

  Converts radians to degrees and returns the result.

glm.degrees(angle: vecN) -> vecN

  Returns degrees(c) for every component c of x.

radians() function

glm.radians(angle: float) -> float

  Converts degrees to radians and returns the result.

glm.radians(angle: vecN) -> vecN

  Returns radians(c) for every component c of x.

sin() function

glm.sin(angle: float) -> float

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

glm.sin(angle: vecN) -> vecN

  Returns sin(c) for every component c of x.

sinh() function

glm.sinh(angle: float) -> float

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

glm.sinh(angle: vecN) -> vecN

  Returns sinh(c) for every component c of x.

tan() function

glm.tan(angle: float) -> float

  The standard trigonometric tangent function.

glm.tan(angle: vecN) -> vecN

  Returns tan(c) for every component c of x.

tanh() function

glm.tanh(angle: float) -> float

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

glm.tanh(angle: vecN) -> vecN

  Returns tanh(c) for every component c of x.