nngn
Loading...
Searching...
No Matches
nngn::Math Class Reference

#include <math.h>

Classes

struct  rnd_generator_t
 

Public Types

using rand_seed_t = std::decay_t<>
 
using rand_seed_t = std::decay_t<>
 

Public Member Functions

auto * rnd_generator (void)
 
void init (void)
 
void seed_rand (rand_seed_t s)
 
void rand_mat (std::span< float > m)
 
auto * rnd_generator (void)
 
void init (void)
 
void seed_rand (rand_seed_t s)
 
void rand_mat (std::span< float > m)
 

Static Public Member Functions

template<typename T >
static constexpr T sq2_2 (void)
 
template<typename T >
static constexpr T sq2 (void)
 
template<typename T >
static constexpr T e (void)
 
template<typename T >
static constexpr T pi (void)
 
template<typename T >
static constexpr T tau (void)
 
template<typename T >
static constexpr T radians (T d)
 
template<typename T >
static constexpr T degrees (T r)
 
template<typename T >
static constexpr T round_down_pow2 (T n, T d)
 
template<typename T >
static constexpr T round_up_pow2 (T n, T d)
 
template<typename T >
static constexpr T round_down (T n, T d)
 
template<typename T >
static constexpr T round_up (T n, T d)
 
template<typename T >
static constexpr T round_up_div (T n, T d)
 
template<unsigned_integral T>
static constexpr T mip_levels (T extent)
 
template<typename T >
static constexpr auto length2 (const T &v)
 
template<typename T >
static auto length (const T &v)
 
template<typename T >
static T normalize (const T &v)
 
template<template< typename > typename V, typename T >
requires vector<V, T>
static V< Tclamp_len (V< T > v, T len)
 
template<typename T >
static constexpr vector_type< Tsum (const T &v)
 
template<typename T >
static constexpr vector_type< Tproduct (const T &v)
 
template<typename T >
static constexpr vector_type< Tavg (const T &v)
 
template<typename T >
static constexpr vector_type< Tdot (const T &u, const T &v)
 
template<typename T >
static constexpr vec3_base< Tcross (const vec3_base< T > &u, const vec3_base< T > &v)
 
template<typename T >
static constexpr T angle (const vec2_base< T > &u, const vec2_base< T > &v)
 
template<typename T >
static constexpr T angle (const vec3_base< T > &u, const vec3_base< T > &v, const vec3_base< T > &n)
 
template<typename T >
static constexpr vec3_base< Treflect (const vec3_base< T > &v, const vec3_base< T > &n)
 
template<typename T >
static constexpr vec3_base< Tnormal (const vec3_base< T > &p0, const vec3_base< T > &p1, const vec3_base< T > &p2)
 
static void mat_mul (std::span< float > dst, const float *src0, const float *src1, std::size_t n)
 
template<typename T >
static constexpr vec3_base< Tdiag (const mat3_base< T > &m, std::size_t i)
 
template<typename T >
static constexpr vec3_base< Tinv_diag (const mat3_base< T > &m, std::size_t i)
 
template<typename T >
static constexpr mat3_base< Tminor_matrix (const mat4_base< T > &m, std::size_t i, std::size_t j)
 
template<typename T >
static constexpr T minor (const mat4_base< T > &m, std::size_t i, std::size_t j)
 
template<typename T >
static constexpr T determinant (const mat3_base< T > &m)
 
template<typename T >
static constexpr T determinant (const mat4_base< T > &m)
 
template<typename T >
static constexpr T cofactor (const mat4_base< T > &m, std::size_t i, std::size_t j)
 
template<typename T >
static constexpr mat4_base< Tadjugate (const mat4_base< T > &m)
 
template<typename T >
static constexpr mat4_base< Tinverse (const mat4_base< T > &m)
 
template<typename T >
static constexpr mat3_base< Ttranspose (const mat3_base< T > &m)
 
template<typename T >
static constexpr mat4_base< Ttranspose (const mat4_base< T > &m)
 
template<typename T >
static constexpr mat4_base< Ttranslate (const mat4_base< T > &m, const vec3_base< T > &v)
 
template<typename T >
static constexpr mat4_base< Tscale (const mat4_base< T > &m, const vec3_base< T > &v)
 
template<typename T >
static constexpr vec2_base< Trotate (const vec2_base< T > &v, T sin, T cos)
 
template<typename T >
static constexpr vec2_base< Trotate (const vec2_base< T > &v, T angle)
 
template<typename T >
static constexpr vec3_base< Trotate (const vec3_base< T > &v, T sin, T cos, const vec3_base< T > &n)
 
template<typename T >
static constexpr vec3_base< Trotate (const vec3_base< T > &v, T angle, const vec3_base< T > &n)
 
template<typename T >
static constexpr vec3_base< Trotate_x (const vec3_base< T > &v, T sin, T cos)
 
template<typename T >
static constexpr vec3_base< Trotate_y (const vec3_base< T > &v, T sin, T cos)
 
template<typename T >
static constexpr vec3_base< Trotate_z (const vec3_base< T > &v, T sin, T cos)
 
template<typename T >
static constexpr vec3_base< Trotate_x (const vec3_base< T > &v, T angle)
 
template<typename T >
static constexpr vec3_base< Trotate_y (const vec3_base< T > &v, T angle)
 
template<typename T >
static constexpr vec3_base< Trotate_z (const vec3_base< T > &v, T angle)
 
template<typename T >
static constexpr mat4_base< Trotate (const mat4_base< T > &m, T angle, const vec3_base< T > &v)
 
template<typename T >
static constexpr mat4_base< Tortho (T left, T right, T bottom, T top)
 
template<typename T >
static constexpr mat4_base< Tortho (T left, T right, T bottom, T top, T near, T far)
 
template<typename T >
static constexpr mat4_base< Tperspective (T fovy, T aspect, T near, T far)
 
template<typename T >
static constexpr mat4_base< Tlook_at (const vec3_base< T > &eye, const vec3_base< T > &center, const vec3_base< T > &up)
 
static void gaussian_filter (std::size_t size, float std_dev, std::span< float > s)
 
static void gaussian_filter (std::size_t xsize, std::size_t ysize, float std_dev, std::span< float > s)
 
static bool is_aligned (void *p, std::size_t a)
 
static void * align_ptr (void *p, std::size_t a)
 
template<typename T >
static Talign_ptr (void *p)
 
template<typename T = double>
static constexpr T sq2_2 (void)
 
template<typename T = double>
static constexpr T sq2 (void)
 
template<typename T = double>
static constexpr T e (void)
 
template<typename T = double>
static constexpr T pi (void)
 
template<typename T = double>
static constexpr T tau (void)
 
template<typename T = double>
static constexpr T radians (T d)
 
template<typename T = double>
static constexpr T degrees (T r)
 
template<typename T >
static constexpr T round_down_pow2 (T n, T d)
 
template<typename T >
static constexpr T round_up_pow2 (T n, T d)
 
template<typename T >
static constexpr T round_down (T n, T d)
 
template<typename T >
static constexpr T round_up (T n, T d)
 
template<typename T >
static constexpr T round_up_div (T n, T d)
 
template<unsigned_integral T>
static constexpr T mip_levels (T extent)
 
template<typename T >
static constexpr auto dot (T u, T v)
 
template<typename T >
static constexpr auto length2 (T v)
 
template<typename T >
static auto length (T v)
 
template<typename T >
static T normalize (T v)
 
template<template< typename > typename V, typename T >
requires vector<V, T>
static V< Tclamp_len (V< T > v, T len)
 
template<typename T >
static constexpr vector_type< Tsum (T v)
 
template<typename T >
static constexpr vector_type< Tproduct (T v)
 
template<typename T >
static constexpr vector_type< Tavg (T v)
 
template<typename T >
static constexpr vec3_base< Tcross (vec3_base< T > u, vec3_base< T > v)
 
template<typename T >
static constexpr T angle (vec2_base< T > u, vec2_base< T > v)
 
template<typename T >
static constexpr T angle (vec3_base< T > u, vec3_base< T > v, vec3_base< T > n)
 
template<typename T >
static constexpr vec3_base< Treflect (vec3_base< T > v, vec3_base< T > n)
 
template<typename T >
static constexpr vec3_base< Tnormal (vec3_base< T > p0, vec3_base< T > p1, vec3_base< T > p2)
 
static void mat_mul (std::span< float > dst, const float *src0, const float *src1, std::size_t n)
 
template<typename T >
static vec3_base< Tperspective_transform (const mat4_base< T > &m, vec3_base< T > v)
 
template<typename T >
static constexpr vec3_base< Tdiag (const mat3_base< T > &m, std::size_t i)
 
template<typename T >
static constexpr vec3_base< Tinv_diag (const mat3_base< T > &m, std::size_t i)
 
template<typename T >
static constexpr mat3_base< Tminor_matrix (const mat4_base< T > &m, std::size_t i, std::size_t j)
 
template<typename T >
static constexpr T minor (const mat4_base< T > &m, std::size_t i, std::size_t j)
 
template<typename T >
static constexpr T determinant (const mat3_base< T > &m)
 
template<typename T >
static constexpr T determinant (const mat4_base< T > &m)
 
template<typename T >
static constexpr T cofactor (const mat4_base< T > &m, std::size_t i, std::size_t j)
 
template<typename T >
static constexpr mat4_base< Tadjugate (const mat4_base< T > &m)
 
template<typename T >
static constexpr mat4_base< Tinverse (const mat4_base< T > &m)
 
template<typename T >
static constexpr mat3_base< Ttranspose (const mat3_base< T > &m)
 
template<typename T >
static constexpr mat4_base< Ttranspose (const mat4_base< T > &m)
 
template<typename T >
static constexpr mat4_base< Ttranslate (const mat4_base< T > &m, vec3_base< T > v)
 
template<typename T >
static constexpr mat4_base< Tscale (const mat4_base< T > &m, vec3_base< T > v)
 
template<typename T >
static constexpr vec2_base< Trotate (vec2_base< T > v, T sin, T cos)
 
template<typename T >
static constexpr vec2_base< Trotate (vec2_base< T > v, T angle)
 
template<typename T >
static constexpr vec3_base< Trotate (vec3_base< T > v, T sin, T cos, vec3_base< T > n)
 
template<typename T >
static constexpr vec3_base< Trotate (vec3_base< T > v, T angle, vec3_base< T > n)
 
template<typename T >
static constexpr vec3_base< Trotate_x (vec3_base< T > v, T sin, T cos)
 
template<typename T >
static constexpr vec3_base< Trotate_y (vec3_base< T > v, T sin, T cos)
 
template<typename T >
static constexpr vec3_base< Trotate_z (vec3_base< T > v, T sin, T cos)
 
template<typename T >
static constexpr vec3_base< Trotate_x (vec3_base< T > v, T angle)
 
template<typename T >
static constexpr vec3_base< Trotate_y (vec3_base< T > v, T angle)
 
template<typename T >
static constexpr vec3_base< Trotate_z (vec3_base< T > v, T angle)
 
template<typename T >
static constexpr mat4_base< Trotate (const mat4_base< T > &m, T angle, vec3_base< T > v)
 
template<typename T >
static constexpr mat4_base< Tortho (T left, T right, T bottom, T top)
 
template<typename T >
static constexpr mat4_base< Tortho (T left, T right, T bottom, T top, T near, T far)
 
template<typename T >
static constexpr mat4_base< Tperspective (T fovy, T aspect, T near, T far)
 
template<typename T >
static constexpr mat4_base< Tlook_at (vec3_base< T > eye, vec3_base< T > center, vec3_base< T > up)
 
static void gaussian_filter (std::size_t size, float std_dev, std::span< float > s)
 
static void gaussian_filter (std::size_t xsize, std::size_t ysize, float std_dev, std::span< float > s)
 
static bool is_aligned (void *p, std::size_t a)
 
static void * align_ptr (void *p, std::size_t a)
 
template<typename T >
static Talign_ptr (void *p)
 

Private Attributes

std::optional< rnd_generator_tm_rnd_generator = {}
 

Member Typedef Documentation

◆ rand_seed_t [1/2]

using nngn::Math::rand_seed_t = std::decay_t<>

◆ rand_seed_t [2/2]

using nngn::Math::rand_seed_t = std::decay_t<>

Member Function Documentation

◆ adjugate() [1/2]

template<typename T >
constexpr mat4_base< T > nngn::Math::adjugate ( const mat4_base< T > &  m)
inlinestaticconstexpr
Here is the call graph for this function:
Here is the caller graph for this function:

◆ adjugate() [2/2]

template<typename T >
static constexpr mat4_base< T > nngn::Math::adjugate ( const mat4_base< T > &  m)
staticconstexpr

◆ align_ptr() [1/4]

template<typename T >
T * nngn::Math::align_ptr ( void *  p)
static
Here is the call graph for this function:

◆ align_ptr() [2/4]

template<typename T >
static T * nngn::Math::align_ptr ( void *  p)
static

◆ align_ptr() [3/4]

void * nngn::Math::align_ptr ( void *  p,
std::size_t  a 
)
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

◆ align_ptr() [4/4]

static void * nngn::Math::align_ptr ( void *  p,
std::size_t  a 
)
static

◆ angle() [1/4]

template<typename T >
constexpr T nngn::Math::angle ( const vec2_base< T > &  u,
const vec2_base< T > &  v 
)
inlinestaticconstexpr
Here is the call graph for this function:
Here is the caller graph for this function:

◆ angle() [2/4]

template<typename T >
constexpr T nngn::Math::angle ( const vec3_base< T > &  u,
const vec3_base< T > &  v,
const vec3_base< T > &  n 
)
inlinestaticconstexpr
Here is the call graph for this function:

◆ angle() [3/4]

template<typename T >
constexpr T nngn::Math::angle ( vec2_base< T u,
vec2_base< T v 
)
inlinestaticconstexpr
Here is the call graph for this function:

◆ angle() [4/4]

template<typename T >
constexpr T nngn::Math::angle ( vec3_base< T u,
vec3_base< T v,
vec3_base< T n 
)
inlinestaticconstexpr
Here is the call graph for this function:

◆ avg() [1/2]

template<typename T >
constexpr vector_type< T > nngn::Math::avg ( const T v)
inlinestaticconstexpr
Here is the call graph for this function:
Here is the caller graph for this function:

◆ avg() [2/2]

template<typename T >
constexpr vector_type< T > nngn::Math::avg ( T  v)
inlinestaticconstexpr
Here is the call graph for this function:

◆ clamp_len() [1/2]

template<template< typename > typename V, typename T >
requires vector<V, T>
V< T > nngn::Math::clamp_len ( V< T v,
T  len 
)
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

◆ clamp_len() [2/2]

template<template< typename > typename V, typename T >
requires vector<V, T>
static V< T > nngn::Math::clamp_len ( V< T v,
T  len 
)
static

◆ cofactor() [1/2]

template<typename T >
static constexpr T nngn::Math::cofactor ( const mat4_base< T > &  m,
std::size_t  i,
std::size_t  j 
)
staticconstexpr

◆ cofactor() [2/2]

template<typename T >
static constexpr T nngn::Math::cofactor ( const mat4_base< T > &  m,
std::size_t  i,
std::size_t  j 
)
staticconstexpr

◆ cross() [1/2]

template<typename T >
constexpr vec3_base< T > nngn::Math::cross ( const vec3_base< T > &  u,
const vec3_base< T > &  v 
)
inlinestaticconstexpr
Here is the caller graph for this function:

◆ cross() [2/2]

template<typename T >
constexpr vec3_base< T > nngn::Math::cross ( vec3_base< T u,
vec3_base< T v 
)
inlinestaticconstexpr

◆ degrees() [1/2]

template<typename T >
constexpr T nngn::Math::degrees ( T  r)
inlinestaticconstexpr

◆ degrees() [2/2]

template<typename T = double>
static constexpr T nngn::Math::degrees ( T  r)
staticconstexpr

◆ determinant() [1/4]

template<typename T >
constexpr T nngn::Math::determinant ( const mat3_base< T > &  m)
inlinestaticconstexpr
Here is the caller graph for this function:

◆ determinant() [2/4]

template<typename T >
static constexpr T nngn::Math::determinant ( const mat3_base< T > &  m)
staticconstexpr

◆ determinant() [3/4]

template<typename T >
constexpr T nngn::Math::determinant ( const mat4_base< T > &  m)
inlinestaticconstexpr

◆ determinant() [4/4]

template<typename T >
static constexpr T nngn::Math::determinant ( const mat4_base< T > &  m)
staticconstexpr

◆ diag() [1/2]

template<typename T >
constexpr vec3_base< T > nngn::Math::diag ( const mat3_base< T > &  m,
std::size_t  i 
)
inlinestaticconstexpr

◆ diag() [2/2]

template<typename T >
static constexpr vec3_base< T > nngn::Math::diag ( const mat3_base< T > &  m,
std::size_t  i 
)
staticconstexpr

◆ dot() [1/2]

template<typename T >
constexpr vector_type< T > nngn::Math::dot ( const T u,
const T v 
)
inlinestaticconstexpr
Here is the call graph for this function:
Here is the caller graph for this function:

◆ dot() [2/2]

template<typename T >
constexpr auto nngn::Math::dot ( T  u,
T  v 
)
inlinestaticconstexpr

◆ e() [1/2]

template<typename T >
constexpr T nngn::Math::e ( void  )
inlinestaticconstexpr

◆ e() [2/2]

template<typename T = double>
static constexpr T nngn::Math::e ( void  )
staticconstexpr

◆ gaussian_filter() [1/4]

void nngn::Math::gaussian_filter ( std::size_t  size,
float  std_dev,
std::span< float s 
)
static
Here is the caller graph for this function:

◆ gaussian_filter() [2/4]

static void nngn::Math::gaussian_filter ( std::size_t  size,
float  std_dev,
std::span< float s 
)
static

◆ gaussian_filter() [3/4]

void nngn::Math::gaussian_filter ( std::size_t  xsize,
std::size_t  ysize,
float  std_dev,
std::span< float s 
)
static

◆ gaussian_filter() [4/4]

static void nngn::Math::gaussian_filter ( std::size_t  xsize,
std::size_t  ysize,
float  std_dev,
std::span< float s 
)
static

◆ init() [1/2]

void nngn::Math::init ( void  )

◆ init() [2/2]

void nngn::Math::init ( void  )

◆ inv_diag() [1/2]

template<typename T >
constexpr vec3_base< T > nngn::Math::inv_diag ( const mat3_base< T > &  m,
std::size_t  i 
)
inlinestaticconstexpr

◆ inv_diag() [2/2]

template<typename T >
static constexpr vec3_base< T > nngn::Math::inv_diag ( const mat3_base< T > &  m,
std::size_t  i 
)
staticconstexpr

◆ inverse() [1/2]

template<typename T >
constexpr mat4_base< T > nngn::Math::inverse ( const mat4_base< T > &  m)
inlinestaticconstexpr
Here is the call graph for this function:
Here is the caller graph for this function:

◆ inverse() [2/2]

template<typename T >
static constexpr mat4_base< T > nngn::Math::inverse ( const mat4_base< T > &  m)
staticconstexpr

◆ is_aligned() [1/2]

bool nngn::Math::is_aligned ( void *  p,
std::size_t  a 
)
inlinestatic
Here is the caller graph for this function:

◆ is_aligned() [2/2]

static bool nngn::Math::is_aligned ( void *  p,
std::size_t  a 
)
static

◆ length() [1/2]

template<typename T >
auto nngn::Math::length ( const T v)
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

◆ length() [2/2]

template<typename T >
auto nngn::Math::length ( T  v)
inlinestatic
Here is the call graph for this function:

◆ length2() [1/2]

template<typename T >
constexpr auto nngn::Math::length2 ( const T v)
inlinestaticconstexpr
Here is the call graph for this function:
Here is the caller graph for this function:

◆ length2() [2/2]

template<typename T >
constexpr auto nngn::Math::length2 ( T  v)
inlinestaticconstexpr
Here is the call graph for this function:

◆ look_at() [1/2]

template<typename T >
constexpr mat4_base< T > nngn::Math::look_at ( const vec3_base< T > &  eye,
const vec3_base< T > &  center,
const vec3_base< T > &  up 
)
inlinestaticconstexpr
Here is the call graph for this function:
Here is the caller graph for this function:

◆ look_at() [2/2]

template<typename T >
constexpr mat4_base< T > nngn::Math::look_at ( vec3_base< T eye,
vec3_base< T center,
vec3_base< T up 
)
inlinestaticconstexpr
Here is the call graph for this function:

◆ mat_mul() [1/2]

void nngn::Math::mat_mul ( std::span< float dst,
const float src0,
const float src1,
std::size_t  n 
)
static
Here is the caller graph for this function:

◆ mat_mul() [2/2]

static void nngn::Math::mat_mul ( std::span< float dst,
const float src0,
const float src1,
std::size_t  n 
)
static

◆ minor() [1/2]

template<typename T >
constexpr T nngn::Math::minor ( const mat4_base< T > &  m,
std::size_t  i,
std::size_t  j 
)
inlinestaticconstexpr
Here is the call graph for this function:
Here is the caller graph for this function:

◆ minor() [2/2]

template<typename T >
static constexpr T nngn::Math::minor ( const mat4_base< T > &  m,
std::size_t  i,
std::size_t  j 
)
staticconstexpr

◆ minor_matrix() [1/2]

template<typename T >
constexpr mat3_base< T > nngn::Math::minor_matrix ( const mat4_base< T > &  m,
std::size_t  i,
std::size_t  j 
)
inlinestaticconstexpr
Here is the caller graph for this function:

◆ minor_matrix() [2/2]

template<typename T >
static constexpr mat3_base< T > nngn::Math::minor_matrix ( const mat4_base< T > &  m,
std::size_t  i,
std::size_t  j 
)
staticconstexpr

◆ mip_levels() [1/2]

template<unsigned_integral T>
constexpr T nngn::Math::mip_levels ( T  extent)
staticconstexpr
Here is the caller graph for this function:

◆ mip_levels() [2/2]

template<unsigned_integral T>
static constexpr T nngn::Math::mip_levels ( T  extent)
staticconstexpr

◆ normal() [1/2]

template<typename T >
constexpr vec3_base< T > nngn::Math::normal ( const vec3_base< T > &  p0,
const vec3_base< T > &  p1,
const vec3_base< T > &  p2 
)
inlinestaticconstexpr
Here is the call graph for this function:

◆ normal() [2/2]

template<typename T >
constexpr vec3_base< T > nngn::Math::normal ( vec3_base< T p0,
vec3_base< T p1,
vec3_base< T p2 
)
inlinestaticconstexpr
Here is the call graph for this function:

◆ normalize() [1/2]

template<typename T >
T nngn::Math::normalize ( const T v)
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

◆ normalize() [2/2]

template<typename T >
T nngn::Math::normalize ( T  v)
inlinestatic
Here is the call graph for this function:

◆ ortho() [1/4]

template<typename T >
constexpr mat4_base< T > nngn::Math::ortho ( T  left,
T  right,
T  bottom,
T  top 
)
inlinestaticconstexpr
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ortho() [2/4]

template<typename T >
static constexpr mat4_base< T > nngn::Math::ortho ( T  left,
T  right,
T  bottom,
T  top 
)
staticconstexpr

◆ ortho() [3/4]

template<typename T >
constexpr mat4_base< T > nngn::Math::ortho ( T  left,
T  right,
T  bottom,
T  top,
T  near,
T  far 
)
inlinestaticconstexpr
Here is the call graph for this function:

◆ ortho() [4/4]

template<typename T >
static constexpr mat4_base< T > nngn::Math::ortho ( T  left,
T  right,
T  bottom,
T  top,
T  near,
T  far 
)
staticconstexpr

◆ perspective() [1/2]

template<typename T >
constexpr mat4_base< T > nngn::Math::perspective ( T  fovy,
T  aspect,
T  near,
T  far 
)
inlinestaticconstexpr
Here is the call graph for this function:
Here is the caller graph for this function:

◆ perspective() [2/2]

template<typename T >
static constexpr mat4_base< T > nngn::Math::perspective ( T  fovy,
T  aspect,
T  near,
T  far 
)
staticconstexpr

◆ perspective_transform()

template<typename T >
vec3_base< T > nngn::Math::perspective_transform ( const mat4_base< T > &  m,
vec3_base< T v 
)
inlinestatic
Here is the caller graph for this function:

◆ pi() [1/2]

template<typename T >
constexpr T nngn::Math::pi ( void  )
inlinestaticconstexpr

◆ pi() [2/2]

template<typename T = double>
static constexpr T nngn::Math::pi ( void  )
staticconstexpr

◆ product() [1/2]

template<typename T >
constexpr vector_type< T > nngn::Math::product ( const T v)
inlinestaticconstexpr
Here is the call graph for this function:
Here is the caller graph for this function:

◆ product() [2/2]

template<typename T >
constexpr vector_type< T > nngn::Math::product ( T  v)
inlinestaticconstexpr
Here is the call graph for this function:

◆ radians() [1/2]

template<typename T >
constexpr T nngn::Math::radians ( T  d)
inlinestaticconstexpr
Here is the caller graph for this function:

◆ radians() [2/2]

template<typename T = double>
static constexpr T nngn::Math::radians ( T  d)
staticconstexpr

◆ rand_mat() [1/2]

void nngn::Math::rand_mat ( std::span< float m)
Here is the call graph for this function:

◆ rand_mat() [2/2]

void nngn::Math::rand_mat ( std::span< float m)

◆ reflect() [1/2]

template<typename T >
constexpr vec3_base< T > nngn::Math::reflect ( const vec3_base< T > &  v,
const vec3_base< T > &  n 
)
inlinestaticconstexpr
Here is the call graph for this function:

◆ reflect() [2/2]

template<typename T >
constexpr vec3_base< T > nngn::Math::reflect ( vec3_base< T v,
vec3_base< T n 
)
inlinestaticconstexpr
Here is the call graph for this function:

◆ rnd_generator() [1/2]

auto * nngn::Math::rnd_generator ( void  )
inline
Here is the caller graph for this function:

◆ rnd_generator() [2/2]

auto * nngn::Math::rnd_generator ( void  )

◆ rotate() [1/10]

template<typename T >
constexpr mat4_base< T > nngn::Math::rotate ( const mat4_base< T > &  m,
T  angle,
const vec3_base< T > &  v 
)
inlinestaticconstexpr
Here is the call graph for this function:

◆ rotate() [2/10]

template<typename T >
constexpr mat4_base< T > nngn::Math::rotate ( const mat4_base< T > &  m,
T  angle,
vec3_base< T v 
)
inlinestaticconstexpr
Here is the call graph for this function:

◆ rotate() [3/10]

template<typename T >
constexpr vec2_base< T > nngn::Math::rotate ( const vec2_base< T > &  v,
T  angle 
)
inlinestaticconstexpr
Here is the call graph for this function:

◆ rotate() [4/10]

template<typename T >
constexpr vec2_base< T > nngn::Math::rotate ( const vec2_base< T > &  v,
T  sin,
T  cos 
)
inlinestaticconstexpr
Here is the caller graph for this function:

◆ rotate() [5/10]

template<typename T >
constexpr vec3_base< T > nngn::Math::rotate ( const vec3_base< T > &  v,
T  angle,
const vec3_base< T > &  n 
)
inlinestaticconstexpr
Here is the call graph for this function:

◆ rotate() [6/10]

template<typename T >
constexpr vec3_base< T > nngn::Math::rotate ( const vec3_base< T > &  v,
T  sin,
T  cos,
const vec3_base< T > &  n 
)
inlinestaticconstexpr
Here is the call graph for this function:

◆ rotate() [7/10]

template<typename T >
constexpr vec2_base< T > nngn::Math::rotate ( vec2_base< T v,
T  angle 
)
inlinestaticconstexpr
Here is the call graph for this function:

◆ rotate() [8/10]

template<typename T >
constexpr vec2_base< T > nngn::Math::rotate ( vec2_base< T v,
T  sin,
T  cos 
)
inlinestaticconstexpr

◆ rotate() [9/10]

template<typename T >
constexpr vec3_base< T > nngn::Math::rotate ( vec3_base< T v,
T  angle,
vec3_base< T n 
)
inlinestaticconstexpr
Here is the call graph for this function:

◆ rotate() [10/10]

template<typename T >
constexpr vec3_base< T > nngn::Math::rotate ( vec3_base< T v,
T  sin,
T  cos,
vec3_base< T n 
)
inlinestaticconstexpr
Here is the call graph for this function:

◆ rotate_x() [1/4]

template<typename T >
constexpr vec3_base< T > nngn::Math::rotate_x ( const vec3_base< T > &  v,
T  angle 
)
inlinestaticconstexpr
Here is the call graph for this function:

◆ rotate_x() [2/4]

template<typename T >
constexpr vec3_base< T > nngn::Math::rotate_x ( const vec3_base< T > &  v,
T  sin,
T  cos 
)
inlinestaticconstexpr
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rotate_x() [3/4]

template<typename T >
constexpr vec3_base< T > nngn::Math::rotate_x ( vec3_base< T v,
T  angle 
)
inlinestaticconstexpr
Here is the call graph for this function:

◆ rotate_x() [4/4]

template<typename T >
constexpr vec3_base< T > nngn::Math::rotate_x ( vec3_base< T v,
T  sin,
T  cos 
)
inlinestaticconstexpr
Here is the call graph for this function:

◆ rotate_y() [1/4]

template<typename T >
constexpr vec3_base< T > nngn::Math::rotate_y ( const vec3_base< T > &  v,
T  angle 
)
inlinestaticconstexpr
Here is the call graph for this function:

◆ rotate_y() [2/4]

template<typename T >
constexpr vec3_base< T > nngn::Math::rotate_y ( const vec3_base< T > &  v,
T  sin,
T  cos 
)
inlinestaticconstexpr
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rotate_y() [3/4]

template<typename T >
constexpr vec3_base< T > nngn::Math::rotate_y ( vec3_base< T v,
T  angle 
)
inlinestaticconstexpr
Here is the call graph for this function:

◆ rotate_y() [4/4]

template<typename T >
constexpr vec3_base< T > nngn::Math::rotate_y ( vec3_base< T v,
T  sin,
T  cos 
)
inlinestaticconstexpr
Here is the call graph for this function:

◆ rotate_z() [1/4]

template<typename T >
constexpr vec3_base< T > nngn::Math::rotate_z ( const vec3_base< T > &  v,
T  angle 
)
inlinestaticconstexpr
Here is the call graph for this function:

◆ rotate_z() [2/4]

template<typename T >
constexpr vec3_base< T > nngn::Math::rotate_z ( const vec3_base< T > &  v,
T  sin,
T  cos 
)
inlinestaticconstexpr
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rotate_z() [3/4]

template<typename T >
constexpr vec3_base< T > nngn::Math::rotate_z ( vec3_base< T v,
T  angle 
)
inlinestaticconstexpr
Here is the call graph for this function:

◆ rotate_z() [4/4]

template<typename T >
constexpr vec3_base< T > nngn::Math::rotate_z ( vec3_base< T v,
T  sin,
T  cos 
)
inlinestaticconstexpr
Here is the call graph for this function:

◆ round_down() [1/2]

template<typename T >
constexpr T nngn::Math::round_down ( T  n,
T  d 
)
staticconstexpr

◆ round_down() [2/2]

template<typename T >
static constexpr T nngn::Math::round_down ( T  n,
T  d 
)
staticconstexpr

◆ round_down_pow2() [1/2]

template<typename T >
constexpr T nngn::Math::round_down_pow2 ( T  n,
T  d 
)
staticconstexpr

◆ round_down_pow2() [2/2]

template<typename T >
static constexpr T nngn::Math::round_down_pow2 ( T  n,
T  d 
)
staticconstexpr

◆ round_up() [1/2]

template<typename T >
constexpr T nngn::Math::round_up ( T  n,
T  d 
)
staticconstexpr
Here is the caller graph for this function:

◆ round_up() [2/2]

template<typename T >
static constexpr T nngn::Math::round_up ( T  n,
T  d 
)
staticconstexpr

◆ round_up_div() [1/2]

template<typename T >
constexpr T nngn::Math::round_up_div ( T  n,
T  d 
)
staticconstexpr
Here is the caller graph for this function:

◆ round_up_div() [2/2]

template<typename T >
static constexpr T nngn::Math::round_up_div ( T  n,
T  d 
)
staticconstexpr

◆ round_up_pow2() [1/2]

template<typename T >
constexpr T nngn::Math::round_up_pow2 ( T  n,
T  d 
)
staticconstexpr
Here is the caller graph for this function:

◆ round_up_pow2() [2/2]

template<typename T >
static constexpr T nngn::Math::round_up_pow2 ( T  n,
T  d 
)
staticconstexpr

◆ scale() [1/2]

template<typename T >
constexpr mat4_base< T > nngn::Math::scale ( const mat4_base< T > &  m,
const vec3_base< T > &  v 
)
inlinestaticconstexpr
Here is the caller graph for this function:

◆ scale() [2/2]

template<typename T >
constexpr mat4_base< T > nngn::Math::scale ( const mat4_base< T > &  m,
vec3_base< T v 
)
inlinestaticconstexpr

◆ seed_rand() [1/2]

void nngn::Math::seed_rand ( rand_seed_t  s)
Here is the call graph for this function:

◆ seed_rand() [2/2]

void nngn::Math::seed_rand ( rand_seed_t  s)

◆ sq2() [1/2]

template<typename T >
constexpr T nngn::Math::sq2 ( void  )
inlinestaticconstexpr

◆ sq2() [2/2]

template<typename T = double>
static constexpr T nngn::Math::sq2 ( void  )
staticconstexpr

◆ sq2_2() [1/2]

template<typename T >
constexpr T nngn::Math::sq2_2 ( void  )
inlinestaticconstexpr

◆ sq2_2() [2/2]

template<typename T = double>
static constexpr T nngn::Math::sq2_2 ( void  )
staticconstexpr

◆ sum() [1/2]

template<typename T >
constexpr vector_type< T > nngn::Math::sum ( const T v)
inlinestaticconstexpr
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sum() [2/2]

template<typename T >
constexpr vector_type< T > nngn::Math::sum ( T  v)
inlinestaticconstexpr
Here is the call graph for this function:

◆ tau() [1/2]

template<typename T >
constexpr T nngn::Math::tau ( void  )
inlinestaticconstexpr

◆ tau() [2/2]

template<typename T = double>
static constexpr T nngn::Math::tau ( void  )
staticconstexpr

◆ translate() [1/2]

template<typename T >
constexpr mat4_base< T > nngn::Math::translate ( const mat4_base< T > &  m,
const vec3_base< T > &  v 
)
inlinestaticconstexpr
Here is the caller graph for this function:

◆ translate() [2/2]

template<typename T >
constexpr mat4_base< T > nngn::Math::translate ( const mat4_base< T > &  m,
vec3_base< T v 
)
inlinestaticconstexpr

◆ transpose() [1/4]

template<typename T >
constexpr mat3_base< T > nngn::Math::transpose ( const mat3_base< T > &  m)
inlinestaticconstexpr
Here is the caller graph for this function:

◆ transpose() [2/4]

template<typename T >
static constexpr mat3_base< T > nngn::Math::transpose ( const mat3_base< T > &  m)
staticconstexpr

◆ transpose() [3/4]

template<typename T >
constexpr mat4_base< T > nngn::Math::transpose ( const mat4_base< T > &  m)
inlinestaticconstexpr

◆ transpose() [4/4]

template<typename T >
static constexpr mat4_base< T > nngn::Math::transpose ( const mat4_base< T > &  m)
staticconstexpr

Member Data Documentation

◆ m_rnd_generator

std::optional< rnd_generator_t > nngn::Math::m_rnd_generator = {}
private

The documentation for this class was generated from the following files: