|
| template<typename U, typename V, typename = std::enable_if_t<std::is_unsigned_v<V> && std::is_integral_v<V>>> |
| constexpr U | vulpes::vmath::upow (U base, V exp, U result=U(1)) |
| | Computes the unsigned power of a number.
|
| template<typename U, typename V, typename = std::enable_if_t<std::is_signed_v<V> && std::is_integral_v<V>>> |
| constexpr U | vulpes::vmath::ipow (U base, V exp, U result=U(1)) |
| | Computes the signed power of a number.
|
| template<typename U, typename V, typename = std::enable_if_t<std::is_integral_v<V>>> |
| constexpr U | vulpes::vmath::pow (U base, V exp, U result=U(1)) |
| | Computes the power of a number.
|
| template<typename T, typename = std::enable_if_t<is_pseudoaritmetic<T>::value>> |
| T | vulpes::vmath::abs (const T &value) |
| | Computes the absolute value of a number.
|
| template<typename T, typename = std::enable_if_t<is_pseudoaritmetic<T>::value>> |
| T | vulpes::vmath::sqrt (const T &value) |
| template<typename T, typename = std::enable_if_t<is_pseudofloating<T>::value>> |
| constexpr T | vulpes::vmath::pi () |
| | Returns the value of pi.
|
| template<typename T, typename = std::enable_if_t<is_pseudofloating<T>::value>> |
| constexpr T | vulpes::vmath::epsilon (const T &instance=T(0)) |
| | Returns the machine epsilon for floating-point types or a rough approximation for GMP types.
|
| template<typename T, typename = std::enable_if_t<is_pseudofloating<T>::value>> |
| std::size_t | vulpes::vmath::precision (const T &instance) |
| | Returns the precision of the input value in bits.
|
| template<typename V, typename U, typename = std::enable_if_t< is_pseudoaritmetic<U>::value && is_pseudoaritmetic<V>::value>> |
| V | vulpes::vmath::to (const U &src) |
| | Converts a value of one pseudo-arithmetic type to another.
|
| template<typename T, typename = std::enable_if_t<is_pseudoaritmetic<T>::value>> |
| constexpr T | vulpes::vmath::factorial (T n) |
| | Computes the factorial of a pseudo-arithmetic number iteratively.
|
| template<typename T, typename = std::enable_if_t<is_pseudoaritmetic<T>::value>> |
| T | vulpes::vmath::gamma (const T &value) |
| template<typename T, typename = std::enable_if_t<std::is_integral_v<T>>> |
| constexpr int64_t | vulpes::vmath::pow1 (T exp) |
| | Computes (-1)^exp.
|
| template<typename T, typename = std::enable_if_t<std::is_integral_v<T>>> |
| constexpr T | vulpes::vmath::binomial (T n, T k) |
| template<typename T, int Options> |
| T | vulpes::vmath::sarrus_det (const Eigen::Matrix< T, 3, 3, Options > &mat) |
| | Computes the determinant of a 3x3 matrix using Sarrus' rule.
|
| template<typename T, int Dim, int Options> |
| T | vulpes::vmath::determinant (const Eigen::Matrix< T, Dim, Dim, Options > &mat) |
| | Computes the determinant of a 2x2 or 3x3 matrix.
|
| template<typename T, int Dim, int Options> |
| T | vulpes::vmath::area (const Eigen::Matrix< T, Dim, Dim - 1, Options > &mat) |
| template<typename FloatType, typename IndexType> |
| void | vulpes::vmath::newellNormal (const FloatType *vertices_data, const IndexType *face_indices_data, IndexType num_face_vertices, FloatType *out_normal) |
| | Accumulates the unnormalized normal of a polygon using Newell's method.
|