The math API provides functions and function templates that act on simple types or generic container and vector concepts. More...
Modules | |
| Basic Math Functors in the Math API | |
| Basic math functors in the Math API. | |
| Fast Approximations for float Math Functions | |
| Fast approximations for math functions on limited precision floats. | |
Namespaces | |
| namespace | mi::math::functor |
| Namespace for basic math functors in the Math API. | |
| namespace | mi::math::general |
| Namespace for generic functions in the Math API. | |
Functions | |
| Float32 | mi::math::exp (Float32 s) |
Returns the constant e to the power of s (exponential function). More... | |
| Float64 | mi::math::exp (Float64 s) |
Returns the constant e to the power of s (exponential function). More... | |
| Float32 | mi::math::log (Float32 s) |
Returns the natural logarithm of s. More... | |
| Float64 | mi::math::log (Float64 s) |
Returns the natural logarithm of s. More... | |
The math API provides functions and function templates that act on simple types or generic container and vector concepts.
Examples are trigonometric functions or lexicographically_compare().
Functions exist typically as a family of overloaded functions for all applicable argument types, such as trigonometric functions, or as a single function template for a vector-like concept, such as lexicographically_compare().
Generic function templates on vector-like value require the vector-like type to have a compile-time constant SIZE as local value, defining the number of elements in the value, and operator[] style access to these elements.
Overloaded functions may have additional overloads for various non-simple types, such as mi::math::Vector or mi::math::Color.
Functions in this group are intended for unqualified naming, such that argument-dependent name lookup (ADL, a.k.a. extended Koenig lookup) can be used with them.
The basic function templates for min() and max(), as well as the overloaded abs() functions are taken from the mi::base namespace.
#include <mi/math/function.h> Returns the constant e to the power of s (exponential function).
Returns the constant e to the power of s (exponential function).