Blender V4.3
BLI_math_base.hh File Reference
#include <algorithm>
#include <cmath>
#include <type_traits>
#include "BLI_math_numbers.hh"
#include "BLI_utildefines.h"

Go to the source code of this file.

Namespaces

namespace  blender
 
namespace  blender::math
 

Functions

template<typename T >
bool blender::math::is_zero (const T &a)
 
template<typename T >
bool blender::math::is_any_zero (const T &a)
 
template<typename T >
T blender::math::abs (const T &a)
 
template<typename T >
T blender::math::sign (const T &a)
 
template<typename T >
T blender::math::min (const T &a, const T &b)
 
template<typename T >
T blender::math::max (const T &a, const T &b)
 
template<typename T >
void blender::math::max_inplace (T &a, const T &b)
 
template<typename T >
void blender::math::min_inplace (T &a, const T &b)
 
template<typename T >
T blender::math::clamp (const T &a, const T &min, const T &max)
 
template<typename T >
T blender::math::step (const T &edge, const T &value)
 
template<typename T >
T blender::math::mod (const T &a, const T &b)
 
template<typename T >
T blender::math::safe_mod (const T &a, const T &b)
 
template<typename T >
void blender::math::min_max (const T &value, T &min, T &max)
 
template<typename T >
T blender::math::safe_divide (const T &a, const T &b)
 
template<typename T >
T blender::math::floor (const T &a)
 
template<typename T >
T blender::math::round (const T &a)
 
template<typename T >
T blender::math::mod_periodic (const T &a, const T &b)
 
template<typename T >
T blender::math::ceil (const T &a)
 
template<typename T >
T blender::math::distance (const T &a, const T &b)
 
template<typename T >
T blender::math::fract (const T &a)
 
template<typename T >
T blender::math::sqrt (const T &a)
 
template<typename T >
T blender::math::rcp (const T &a)
 
template<typename T >
T blender::math::safe_rcp (const T &a)
 
template<typename T >
T blender::math::cos (const T &a)
 
template<typename T >
T blender::math::sin (const T &a)
 
template<typename T >
T blender::math::tan (const T &a)
 
template<typename T >
T blender::math::acos (const T &a)
 
template<typename T >
T blender::math::pow (const T &x, const T &power)
 
template<typename T >
T blender::math::square (const T &a)
 
template<typename T >
T blender::math::exp (const T &x)
 
template<typename T >
T blender::math::safe_acos (const T &a)
 
float blender::math::safe_acos_approx (float x)
 
template<typename T >
T blender::math::asin (const T &a)
 
template<typename T >
T blender::math::atan (const T &a)
 
template<typename T >
T blender::math::atan2 (const T &y, const T &x)
 
template<typename T >
T blender::math::hypot (const T &y, const T &x)
 
template<typename T , typename FactorT >
T blender::math::interpolate (const T &a, const T &b, const FactorT &t)
 
template<typename T >
T blender::math::midpoint (const T &a, const T &b)
 

Variables

template<typename T >
constexpr bool blender::math::is_math_float_type = std::is_floating_point_v<T>
 
template<typename T >
constexpr bool blender::math::is_math_integral_type = std::is_integral_v<T>