fennec
Loading...
Searching...
No Matches
trigonometric.h File Reference

the Trigonometry More...

#include <fennec/math/detail/_math.h>
#include <fennec/math/vector.h>
#include <fennec/lang/types.h>

Go to the source code of this file.

Detailed Description

Author
Medusa Slockbower

Functions

Angle Conversions
template<typename genType >
constexpr genType fennec::radians (genType degrees)
 Converts \(degrees\) to \(radians\), i.e., \(degrees\cdot\frac{180}{\pi}\).
 
template<typename genType >
constexpr genType fennec::degrees (genType radians)
 Converts \(radians\) to \(degrees\), i.e., \(radians\cdot\frac{\pi}{180}\).
 
Trigonometric Functions
template<typename genType >
constexpr genType fennec::sin (genType x)
 The standard trigonometric sine.
 
template<typename genType >
constexpr genType fennec::cos (genType x)
 The Standard Trigonometric Cosine.
 
template<typename genType >
constexpr genType fennec::tan (genType x)
 The Standard Trigonometric Tangent.
 
Inverse Trigonometric Functions
template<typename genType >
constexpr genType fennec::asin (genType x)
 Arc Sine. Returns an angle \(\theta\) whose sine is /a x.
 
template<typename genType >
constexpr genType fennec::acos (genType x)
 Arc Cosine. Returns an angle \(\theta\) whose cosine is /a x.
 
template<typename genType >
constexpr genType fennec::atan (genType y_over_x)
 Arc Tangent. Returns an angle \(\theta\) whose tangent is /a y_over_x.
 
template<typename genType >
constexpr genType fennec::atan (genType y, genType x)
 Arc Tangent. Returns an angle whose tangent is \(\frac{y}{x}\).
 
Hyperbolic Functions
template<typename genType >
constexpr genType fennec::sinh (genType x)
 Returns the Hyperbolic Sine Function, \(\frac{{e}^{x}-{e}^{-x}}{2}\).
 
template<typename genType >
constexpr genType fennec::cosh (genType x)
 Returns the Hyperbolic Cosine Function, \(\frac{{e}^{x}+{e}^{-x}}{2}\).
 
template<typename genType , size_t... i>
constexpr genType fennec::tanh (genType x)
 Returns the Hyperbolic Tangent Function, \(\frac{\text{sinh}(x)}{\text{cosh}(x)}\).
 
Inverse Hyperbolic Functions
template<typename genType , size_t... i>
constexpr genType fennec::asinh (genType x)
 The Inverse Hyperbolic Sine Function.
 
template<typename genType , size_t... i>
constexpr genType fennec::acosh (genType x)
 The Inverse Hyperbolic Cosine Function.
 
template<typename genType , size_t... i>
constexpr genType fennec::atanh (genType x)
 The Inverse Hyperbolic Tangent Function.
 

Function Documentation

◆ radians()

template<typename genType >
constexpr genType fennec::radians ( genType  degrees)
constexpr
Returns
the angle \(\theta\) in \(radians\)

Converts \(degrees\) to \(radians\), i.e., \(degrees\cdot\frac{180}{\pi}\)

Template Parameters
genTypefloating point type
Parameters
degreesthe angle \(\theta\) in \(degrees\)

◆ degrees()

template<typename genType >
constexpr genType fennec::degrees ( genType  radians)
constexpr
Returns
the angle \(\theta\) in \(degrees\)

Converts \(radians\) to \(degrees\), i.e., \(radians\cdot\frac{\pi}{180}\)

Template Parameters
genTypefloating point type
Parameters
radiansthe angle \(\theta\) in \(radians\)

◆ sin()

template<typename genType >
constexpr genType fennec::sin ( genType  x)
constexpr
Returns
the sine of \(\theta\) in the range \(\left[-1,\,1\right]\)

The standard trigonometric sine

Template Parameters
genTypefloating point type
Parameters
xthe angle \(\theta\) in \(radians\)

◆ cos()

template<typename genType >
constexpr genType fennec::cos ( genType  x)
constexpr
Returns
the cosine of \(\theta\) in the range \(\left[-1,\,1\right]\)

The Standard Trigonometric Cosine

Template Parameters
genTypefloating point type
Parameters
xthe angle \(\theta\) in \(radians\)

◆ tan()

template<typename genType >
constexpr genType fennec::tan ( genType  x)
constexpr
Returns
The Tangent of \(\theta\) in the Range \(\left[-\inf,\,\inf\right]\)

The Standard Trigonometric Tangent

Template Parameters
genTypefloating point type
Parameters
xThe Angle \(\theta\) in \(radians\)

◆ asin()

template<typename genType >
constexpr genType fennec::asin ( genType  x)
constexpr
Returns
an angle \(\theta\) whose sine is /a x.

Arc Sine. The range of values returned by this functions is \(\left[-\pi/2,\pi/2\right]\). Results are undefined if \(\left|x\right|\,>\,1\).

Template Parameters
genTypefloating point type
Parameters
xThe Sine Value produced by \(\theta\)

◆ acos()

template<typename genType >
constexpr genType fennec::acos ( genType  x)
constexpr
Returns
an angle \(\theta\) whose cosine is /a x.

Arc Cosine. The range of values returned by this functions is \(\left[0,\pi\right]\). Results are undefined if \(\left|x\right|\,>\,1\).

Template Parameters
genTypefloating point type
Parameters
xThe Cosine Value produced by \(\theta\)

◆ atan() [1/2]

template<typename genType >
constexpr genType fennec::atan ( genType  y_over_x)
constexpr
Returns
an angle \(\theta\) whose tangent is /a y_over_x.

Arc Tangent. The range of values returned by this functions is \(\left[\frac{-\pi}{2},\frac{\pi}{2}\right]\). Results are undefined if \(\left|x\right|\,>\,1\).

Template Parameters
genTypefloating point type
Parameters
y_over_xThe Cosine Value produced by \(\theta\)

◆ atan() [2/2]

template<typename genType >
constexpr genType fennec::atan ( genType  y,
genType  x 
)
constexpr
Returns
an angle whose tangent is \(\frac{y}{x}\).

Arc Tangent. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this functions is \(\left[-\pi,\pi\right]\)

Template Parameters
genTypefloating point type
Parameters
yThe Sine Value produced by \(\theta\)
xThe Cosine Value produced by \(\theta\)

◆ sinh()

template<typename genType >
constexpr genType fennec::sinh ( genType  x)
constexpr
Returns
The Hyperbolic Sine of \(x\), \(\frac{{e}^{x}-{e}^{-x}}{2}\)

Template Parameters
genTypefloating point type
Parameters
xThe Hyperbolic Angle \(\alpha\)

◆ cosh()

template<typename genType >
constexpr genType fennec::cosh ( genType  x)
constexpr
Returns
The Hyperbolic Cosine of \(x\), \(\frac{{e}^{x}+{e}^{-x}}{2}\)

Parameters
xThe Hyperbolic Angle \(\alpha\)

◆ tanh()

template<typename genType , size_t... i>
constexpr genType fennec::tanh ( genType  x)
constexpr
Returns
The Hyperbolic Tangent of \(x\), \(\frac{{e}^{x}+{e}^{-x}}{2}\)

Parameters
xThe Hyperbolic Angle \(\alpha\)

◆ asinh()

template<typename genType , size_t... i>
constexpr genType fennec::asinh ( genType  x)
constexpr
Returns
the value \(y\) that fulfills \(x=\text{sinh}(y)\)

The Inverse Hyperbolic Sine Function

Parameters
xthe hyperbolic angle \(\alpha\)

◆ acosh()

template<typename genType , size_t... i>
constexpr genType fennec::acosh ( genType  x)
constexpr
Returns
the value \(y\) that fulfills \(x=\text{cosh}(y)\)

The Inverse Hyperbolic Cosine Function

Parameters
xthe hyperbolic angle \(\alpha\)

◆ atanh()

template<typename genType , size_t... i>
constexpr genType fennec::atanh ( genType  x)
constexpr
Returns
the value \(y\) that fulfills \(x=\text{atanh}(y)\)

The Inverse Hyperbolic Tangent Function

Parameters
xThe Hyperbolic Angle \(\alpha\)