Exponential
More...
#include <fennec/math/detail/_math.h>
#include <fennec/math/vector.h>
Go to the source code of this file.
- Author
- Medusa Slockbower
- Copyright
- Copyright © 2025 Medusa Slockbower (GPLv3)
|
| 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}}\).
|
| |
◆ 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
-
◆ exp()
template<typename genType >
| constexpr genType fennec::exp |
( |
genType |
x | ) |
|
|
constexpr |
- Returns
- the natural exponentiation of \(x\), i.e., \(e^x\).
- Parameters
-
◆ exp2()
template<typename genType >
| constexpr genType fennec::exp2 |
( |
genType |
x | ) |
|
|
constexpr |
- Returns
- 2 raised to the \(x\) power, i.e., \(e^x\)
- Parameters
-
◆ 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
-
◆ 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
-
◆ sqrt()
template<typename genType >
| constexpr genType fennec::sqrt |
( |
genType |
x | ) |
|
|
constexpr |
- Returns
- \(\sqrt{x}\).
Results are undefined if \(x<0\)
- Parameters
-
◆ inversesqrt()
template<typename genType >
| constexpr genType fennec::inversesqrt |
( |
genType |
x | ) |
|
|
constexpr |
- Returns
- \(\frac{1}{\sqrt{x}}\).
Results are undefined if \(x<0\).
- Parameters
-