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

Exponential More...

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

Go to the source code of this file.

Detailed Description

Author
Medusa Slockbower

Functions

template<typename genType >
constexpr genType fennec::pow (genType x, genType y)
 Returns \(x\) raised to the \(y\) power, i.e., \(x^y\).
 
template<typename genType >
constexpr genType fennec::exp (genType x)
 Returns the natural exponentiation of \(x\), i.e., \(e^x\).
 
template<typename genType >
constexpr genType fennec::exp2 (genType x)
 Returns 2 raised to the \(x\) power, i.e., \(e^x\).
 
template<typename genType >
constexpr genType fennec::log (genType x)
 Returns the natural logarithm of \(x\).
 
template<typename genType >
constexpr genType fennec::log2 (genType x)
 Returns the base 2 logarithm of \(x\).
 
template<typename genType >
constexpr genType fennec::sqrt (genType x)
 Returns \(\sqrt{x}\).
 
template<typename genType >
constexpr genType fennec::inversesqrt (genType x)
 Returns \(\frac{1}{\sqrt{x}}\).
 

Function Documentation

◆ pow()

template<typename genType >
constexpr genType fennec::pow ( genType  x,
genType  y 
)
constexpr
Returns
\(x\) raised to the \(y\) power, i.e., \(x^y\).

Results are undefined if \(x<0\).

Results are undefined if \(x=0\) and \({y}\le{0}\).

Parameters
xthe base
ythe exponent

◆ exp()

template<typename genType >
constexpr genType fennec::exp ( genType  x)
constexpr
Returns
the natural exponentiation of \(x\), i.e., \(e^x\).

Parameters
xthe exponent

◆ exp2()

template<typename genType >
constexpr genType fennec::exp2 ( genType  x)
constexpr
Returns
2 raised to the \(x\) power, i.e., \(e^x\)

Parameters
xthe exponent

◆ log()

template<typename genType >
constexpr genType fennec::log ( genType  x)
constexpr
Returns
the natural logarithm of \(x\), i.e., returns the value \(y\) which satisfies the equation \(x=e^y\).

Results are undefined if \({x}\le{0}\).

Parameters
xthe input value

◆ log2()

template<typename genType >
constexpr genType fennec::log2 ( genType  x)
constexpr
Returns
the base 2 logarithm of \(x\), i.e., returns the value \(y\) which satisfies the equation \(x=2^y\).

Results are undefined if \({x}\le{0}\).

Parameters
xthe input value

◆ sqrt()

template<typename genType >
constexpr genType fennec::sqrt ( genType  x)
constexpr
Returns
\(\sqrt{x}\).

Results are undefined if \(x<0\)

Parameters
xthe input value

◆ inversesqrt()

template<typename genType >
constexpr genType fennec::inversesqrt ( genType  x)
constexpr
Returns
\(\frac{1}{\sqrt{x}}\).

Results are undefined if \(x<0\).

Parameters
xthe input value