neoGFX
Cross-platform C++ app/game engine
Loading...
Searching...
No Matches
numerical.hpp File Reference
#include <neolib/neolib.hpp>
#include <type_traits>
#include <stdexcept>
#include <vector>
#include <utility>
#include <array>
#include <algorithm>
#include <ostream>
#include <istream>
#include <boost/math/constants/constants.hpp>
#include <neolib/core/vecarray.hpp>
#include <neolib/core/swizzle.hpp>
#include <neolib/core/simd.hpp>
#include <neolib/core/optional.hpp>
#include <neolib/core/string_utils.hpp>

Go to the source code of this file.

Classes

struct  neolib::math::column_vector
 
struct  neolib::math::row_vector
 
class  neolib::math::basic_vector< T, _Size, Type >
 
struct  neolib::math::basic_vector< T, _Size, Type >::rebind< Size2 >
 
class  neolib::math::basic_vector< T, 2, Type >
 
struct  neolib::math::basic_vector< T, 2, Type >::rebind< Size2 >
 
class  neolib::math::basic_vector< T, 1, Type >
 
struct  neolib::math::basic_vector< T, 1, Type >::rebind< Size2 >
 
class  neolib::math::basic_matrix< T, Rows, Columns >
 
struct  neolib::math::basic_matrix< T, Rows, Columns >::rebind< T2 >
 
struct  neolib::math::aabb
 
struct  neolib::math::aabb_2d
 

Namespaces

namespace  neolib
 
namespace  neolib::math
 
namespace  neolib::math::constants
 

Macros

#define USE_AVX
 
#define USE_EMM
 

Typedefs

typedef double neolib::math::scalar
 
typedef double neolib::math::angle
 
typedef basic_vector< double, 1 > neolib::math::vector1
 
typedef basic_vector< double, 2 > neolib::math::vector2
 
typedef basic_vector< double, 3 > neolib::math::vector3
 
typedef basic_vector< double, 4 > neolib::math::vector4
 
typedef vector1 neolib::math::vec1
 
typedef vector2 neolib::math::vec2
 
typedef vector3 neolib::math::vec3
 
typedef vector4 neolib::math::vec4
 
typedef vec1 neolib::math::col_vec1
 
typedef vec2 neolib::math::col_vec2
 
typedef vec3 neolib::math::col_vec3
 
typedef vec4 neolib::math::col_vec4
 
typedef basic_vector< double, 1, row_vectorneolib::math::row_vec1
 
typedef basic_vector< double, 2, row_vectorneolib::math::row_vec2
 
typedef basic_vector< double, 3, row_vectorneolib::math::row_vec3
 
typedef basic_vector< double, 4, row_vectorneolib::math::row_vec4
 
typedef optional< vector1neolib::math::optional_vector1
 
typedef optional< vector2neolib::math::optional_vector2
 
typedef optional< vector3neolib::math::optional_vector3
 
typedef optional< vector4neolib::math::optional_vector4
 
typedef optional< vec1neolib::math::optional_vec1
 
typedef optional< vec2neolib::math::optional_vec2
 
typedef optional< vec3neolib::math::optional_vec3
 
typedef optional< vec4neolib::math::optional_vec4
 
typedef optional< col_vec1neolib::math::optional_col_vec1
 
typedef optional< col_vec2neolib::math::optional_col_vec2
 
typedef optional< col_vec3neolib::math::optional_col_vec3
 
typedef optional< col_vec4neolib::math::optional_col_vec4
 
typedef optional< row_vec1neolib::math::optional_row_vec1
 
typedef optional< row_vec2neolib::math::optional_row_vec2
 
typedef optional< row_vec3neolib::math::optional_row_vec3
 
typedef optional< row_vec4neolib::math::optional_row_vec4
 
typedef std::vector< vec2neolib::math::vec2_list
 
typedef std::vector< vec3neolib::math::vec3_list
 
typedef optional< vec2_listneolib::math::optional_vec2_list
 
typedef optional< vec3_listneolib::math::optional_vec3_list
 
typedef vec2_list neolib::math::vertices_2d
 
typedef vec3_list neolib::math::vertices
 
typedef optional_vec2_list neolib::math::optional_vertices_2d_t
 
typedef optional_vec3_list neolib::math::optional_vertices_t
 
typedef basic_vector< float, 1 > neolib::math::vector1f
 
typedef basic_vector< float, 2 > neolib::math::vector2f
 
typedef basic_vector< float, 3 > neolib::math::vector3f
 
typedef basic_vector< float, 4 > neolib::math::vector4f
 
typedef vector1f neolib::math::vec1f
 
typedef vector2f neolib::math::vec2f
 
typedef vector3f neolib::math::vec3f
 
typedef vector4f neolib::math::vec4f
 
typedef int32_t neolib::math::i32
 
typedef int64_t neolib::math::i64
 
typedef basic_vector< i32, 1 > neolib::math::vector1i32
 
typedef basic_vector< i32, 2 > neolib::math::vector2i32
 
typedef basic_vector< i32, 3 > neolib::math::vector3i32
 
typedef basic_vector< i32, 4 > neolib::math::vector4i32
 
typedef vector1i32 neolib::math::vec1i32
 
typedef vector2i32 neolib::math::vec2i32
 
typedef vector3i32 neolib::math::vec3i32
 
typedef vector4i32 neolib::math::vec4i32
 
typedef uint32_t neolib::math::u32
 
typedef uint32_t neolib::math::u64
 
typedef basic_vector< u32, 1 > neolib::math::vector1u32
 
typedef basic_vector< u32, 2 > neolib::math::vector2u32
 
typedef basic_vector< u32, 3 > neolib::math::vector3u32
 
typedef basic_vector< u32, 4 > neolib::math::vector4u32
 
typedef vector1u32 neolib::math::vec1u32
 
typedef vector2u32 neolib::math::vec2u32
 
typedef vector3u32 neolib::math::vec3u32
 
typedef vector4u32 neolib::math::vec4u32
 
template<std::size_t VertexCount>
using neolib::math::vec3_array = neolib::vecarray< vec3, VertexCount, VertexCount, neolib::check< neolib::vecarray_overflow >, std::allocator< vec3 > >
 
template<std::size_t VertexCount>
using neolib::math::vec2_array = neolib::vecarray< vec2, VertexCount, VertexCount, neolib::check< neolib::vecarray_overflow >, std::allocator< vec2 > >
 
typedef std::array< int8_t, 1 > neolib::math::avec1i8
 
typedef std::array< int8_t, 2 > neolib::math::avec2i8
 
typedef std::array< int8_t, 3 > neolib::math::avec3i8
 
typedef std::array< int8_t, 4 > neolib::math::avec4i8
 
typedef std::array< int16_t, 1 > neolib::math::avec1i16
 
typedef std::array< int16_t, 2 > neolib::math::avec2i16
 
typedef std::array< int16_t, 3 > neolib::math::avec3i16
 
typedef std::array< int16_t, 4 > neolib::math::avec4i16
 
typedef std::array< int32_t, 1 > neolib::math::avec1i32
 
typedef std::array< int32_t, 2 > neolib::math::avec2i32
 
typedef std::array< int32_t, 3 > neolib::math::avec3i32
 
typedef std::array< int32_t, 4 > neolib::math::avec4i32
 
typedef std::array< uint8_t, 1 > neolib::math::avec1u8
 
typedef std::array< uint8_t, 2 > neolib::math::avec2u8
 
typedef std::array< uint8_t, 3 > neolib::math::avec3u8
 
typedef std::array< uint8_t, 4 > neolib::math::avec4u8
 
typedef std::array< uint16_t, 1 > neolib::math::avec1u16
 
typedef std::array< uint16_t, 2 > neolib::math::avec2u16
 
typedef std::array< uint16_t, 3 > neolib::math::avec3u16
 
typedef std::array< uint16_t, 4 > neolib::math::avec4u16
 
typedef std::array< uint32_t, 1 > neolib::math::avec1u32
 
typedef std::array< uint32_t, 2 > neolib::math::avec2u32
 
typedef std::array< uint32_t, 3 > neolib::math::avec3u32
 
typedef std::array< uint32_t, 4 > neolib::math::avec4u32
 
typedef std::array< float, 1 > neolib::math::avec1f
 
typedef std::array< float, 2 > neolib::math::avec2f
 
typedef std::array< float, 3 > neolib::math::avec3f
 
typedef std::array< float, 4 > neolib::math::avec4f
 
typedef std::array< double, 1 > neolib::math::avec1
 
typedef std::array< double, 2 > neolib::math::avec2
 
typedef std::array< double, 3 > neolib::math::avec3
 
typedef std::array< double, 4 > neolib::math::avec4
 
typedef std::array< vec3, 3 > neolib::math::triangle
 
typedef std::array< vec3, 4 > neolib::math::quad
 
typedef std::array< vec2, 3 > neolib::math::triangle_2d
 
typedef std::array< vec2, 4 > neolib::math::quad_2d
 
typedef std::array< vec3f, 3 > neolib::math::trianglef
 
typedef std::array< vec3f, 4 > neolib::math::quadf
 
typedef std::array< vec2f, 3 > neolib::math::trianglef_2d
 
typedef std::array< vec2f, 4 > neolib::math::quadf_2d
 
typedef basic_matrix< double, 1, 1 > neolib::math::matrix11
 
typedef basic_matrix< double, 2, 2 > neolib::math::matrix22
 
typedef basic_matrix< double, 2, 1 > neolib::math::matrix21
 
typedef basic_matrix< double, 1, 2 > neolib::math::matrix12
 
typedef basic_matrix< double, 3, 3 > neolib::math::matrix33
 
typedef basic_matrix< double, 3, 1 > neolib::math::matrix31
 
typedef basic_matrix< double, 3, 2 > neolib::math::matrix32
 
typedef basic_matrix< double, 1, 3 > neolib::math::matrix13
 
typedef basic_matrix< double, 2, 3 > neolib::math::matrix23
 
typedef basic_matrix< double, 4, 4 > neolib::math::matrix44
 
typedef basic_matrix< double, 4, 1 > neolib::math::matrix41
 
typedef basic_matrix< double, 4, 2 > neolib::math::matrix42
 
typedef basic_matrix< double, 4, 3 > neolib::math::matrix43
 
typedef basic_matrix< double, 1, 4 > neolib::math::matrix14
 
typedef basic_matrix< double, 2, 4 > neolib::math::matrix24
 
typedef basic_matrix< double, 3, 4 > neolib::math::matrix34
 
typedef matrix11 neolib::math::matrix1
 
typedef matrix22 neolib::math::matrix2
 
typedef matrix33 neolib::math::matrix3
 
typedef matrix44 neolib::math::matrix4
 
typedef matrix11 neolib::math::mat11
 
typedef matrix22 neolib::math::mat22
 
typedef matrix21 neolib::math::mat21
 
typedef matrix12 neolib::math::mat12
 
typedef matrix33 neolib::math::mat33
 
typedef matrix31 neolib::math::mat31
 
typedef matrix32 neolib::math::mat32
 
typedef matrix13 neolib::math::mat13
 
typedef matrix23 neolib::math::mat23
 
typedef matrix44 neolib::math::mat44
 
typedef matrix41 neolib::math::mat41
 
typedef matrix42 neolib::math::mat42
 
typedef matrix43 neolib::math::mat43
 
typedef matrix14 neolib::math::mat14
 
typedef matrix24 neolib::math::mat24
 
typedef matrix34 neolib::math::mat34
 
typedef mat11 neolib::math::mat1
 
typedef mat22 neolib::math::mat2
 
typedef mat33 neolib::math::mat3
 
typedef mat44 neolib::math::mat4
 
typedef optional< matrix11neolib::math::optional_matrix11
 
typedef optional< matrix22neolib::math::optional_matrix22
 
typedef optional< matrix21neolib::math::optional_matrix21
 
typedef optional< matrix12neolib::math::optional_matrix12
 
typedef optional< matrix33neolib::math::optional_matrix33
 
typedef optional< matrix31neolib::math::optional_matrix31
 
typedef optional< matrix32neolib::math::optional_matrix32
 
typedef optional< matrix13neolib::math::optional_matrix13
 
typedef optional< matrix23neolib::math::optional_matrix23
 
typedef optional< matrix44neolib::math::optional_matrix44
 
typedef optional< matrix41neolib::math::optional_matrix41
 
typedef optional< matrix42neolib::math::optional_matrix42
 
typedef optional< matrix43neolib::math::optional_matrix43
 
typedef optional< matrix14neolib::math::optional_matrix14
 
typedef optional< matrix24neolib::math::optional_matrix24
 
typedef optional< matrix34neolib::math::optional_matrix34
 
typedef optional< matrix11neolib::math::optional_matrix1
 
typedef optional< matrix22neolib::math::optional_matrix2
 
typedef optional< matrix33neolib::math::optional_matrix3
 
typedef optional< matrix44neolib::math::optional_matrix4
 
typedef optional< mat11neolib::math::optional_mat11
 
typedef optional< mat22neolib::math::optional_mat22
 
typedef optional< mat21neolib::math::optional_mat21
 
typedef optional< mat12neolib::math::optional_mat12
 
typedef optional< mat33neolib::math::optional_mat33
 
typedef optional< mat31neolib::math::optional_mat31
 
typedef optional< mat32neolib::math::optional_mat32
 
typedef optional< mat13neolib::math::optional_mat13
 
typedef optional< mat23neolib::math::optional_mat23
 
typedef optional< mat44neolib::math::optional_mat44
 
typedef optional< mat41neolib::math::optional_mat41
 
typedef optional< mat42neolib::math::optional_mat42
 
typedef optional< mat43neolib::math::optional_mat43
 
typedef optional< mat14neolib::math::optional_mat14
 
typedef optional< mat24neolib::math::optional_mat24
 
typedef optional< mat34neolib::math::optional_mat34
 
typedef optional< mat11neolib::math::optional_mat1
 
typedef optional< mat22neolib::math::optional_mat2
 
typedef optional< mat33neolib::math::optional_mat3
 
typedef optional< mat44neolib::math::optional_mat4
 
typedef basic_matrix< float, 1, 1 > neolib::math::matrix11f
 
typedef basic_matrix< float, 2, 2 > neolib::math::matrix22f
 
typedef basic_matrix< float, 2, 1 > neolib::math::matrix21f
 
typedef basic_matrix< float, 1, 2 > neolib::math::matrix12f
 
typedef basic_matrix< float, 3, 3 > neolib::math::matrix33f
 
typedef basic_matrix< float, 3, 1 > neolib::math::matrix31f
 
typedef basic_matrix< float, 3, 2 > neolib::math::matrix32f
 
typedef basic_matrix< float, 1, 3 > neolib::math::matrix13f
 
typedef basic_matrix< float, 2, 3 > neolib::math::matrix23f
 
typedef basic_matrix< float, 4, 4 > neolib::math::matrix44f
 
typedef basic_matrix< float, 4, 1 > neolib::math::matrix41f
 
typedef basic_matrix< float, 4, 2 > neolib::math::matrix42f
 
typedef basic_matrix< float, 4, 3 > neolib::math::matrix43f
 
typedef basic_matrix< float, 1, 4 > neolib::math::matrix14f
 
typedef basic_matrix< float, 2, 4 > neolib::math::matrix24f
 
typedef basic_matrix< float, 3, 4 > neolib::math::matrix34f
 
typedef matrix11f neolib::math::mat11f
 
typedef matrix22f neolib::math::mat22f
 
typedef matrix21f neolib::math::mat21f
 
typedef matrix12f neolib::math::mat12f
 
typedef matrix33f neolib::math::mat33f
 
typedef matrix31f neolib::math::mat31f
 
typedef matrix32f neolib::math::mat32f
 
typedef matrix13f neolib::math::mat13f
 
typedef matrix23f neolib::math::mat23f
 
typedef matrix44f neolib::math::mat44f
 
typedef matrix41f neolib::math::mat41f
 
typedef matrix42f neolib::math::mat42f
 
typedef matrix43f neolib::math::mat43f
 
typedef matrix14f neolib::math::mat14f
 
typedef matrix24f neolib::math::mat24f
 
typedef matrix34f neolib::math::mat34f
 
typedef matrix11f neolib::math::mat1f
 
typedef matrix22f neolib::math::mat2f
 
typedef matrix33f neolib::math::mat3f
 
typedef matrix44f neolib::math::mat4f
 
typedef optional< matrix11fneolib::math::optional_matrix11f
 
typedef optional< matrix22fneolib::math::optional_matrix22f
 
typedef optional< matrix21fneolib::math::optional_matrix21f
 
typedef optional< matrix12fneolib::math::optional_matrix12f
 
typedef optional< matrix33fneolib::math::optional_matrix33f
 
typedef optional< matrix31fneolib::math::optional_matrix31f
 
typedef optional< matrix32fneolib::math::optional_matrix32f
 
typedef optional< matrix13fneolib::math::optional_matrix13f
 
typedef optional< matrix23fneolib::math::optional_matrix23f
 
typedef optional< matrix44fneolib::math::optional_matrix44f
 
typedef optional< matrix41fneolib::math::optional_matrix41f
 
typedef optional< matrix42fneolib::math::optional_matrix42f
 
typedef optional< matrix43fneolib::math::optional_matrix43f
 
typedef optional< matrix14fneolib::math::optional_matrix14f
 
typedef optional< matrix24fneolib::math::optional_matrix24f
 
typedef optional< matrix34fneolib::math::optional_matrix34f
 
typedef optional< matrix11fneolib::math::optional_matrix1f
 
typedef optional< matrix22fneolib::math::optional_matrix2f
 
typedef optional< matrix33fneolib::math::optional_matrix3f
 
typedef optional< matrix44fneolib::math::optional_matrix4f
 
typedef optional< mat11fneolib::math::optional_mat11f
 
typedef optional< mat22fneolib::math::optional_mat22f
 
typedef optional< mat21fneolib::math::optional_mat21f
 
typedef optional< mat12fneolib::math::optional_mat12f
 
typedef optional< mat33fneolib::math::optional_mat33f
 
typedef optional< mat31fneolib::math::optional_mat31f
 
typedef optional< mat32fneolib::math::optional_mat32f
 
typedef optional< mat13fneolib::math::optional_mat13f
 
typedef optional< mat23fneolib::math::optional_mat23f
 
typedef optional< mat44fneolib::math::optional_mat44f
 
typedef optional< mat41fneolib::math::optional_mat41f
 
typedef optional< mat42fneolib::math::optional_mat42f
 
typedef optional< mat43fneolib::math::optional_mat43f
 
typedef optional< mat14fneolib::math::optional_mat14f
 
typedef optional< mat24fneolib::math::optional_mat24f
 
typedef optional< mat34fneolib::math::optional_mat34f
 
typedef optional< mat11fneolib::math::optional_mat1f
 
typedef optional< mat22fneolib::math::optional_mat2f
 
typedef optional< mat33fneolib::math::optional_mat3f
 
typedef optional< mat44fneolib::math::optional_mat4f
 
typedef optional< aabbneolib::math::optional_aabb
 
typedef optional< aabb_2dneolib::math::optional_aabb_2d
 

Functions

template<typename T , typename SFINAE = std::enable_if_t<std::is_scalar_v<T>, sfinae>>
T neolib::math::lerp (T aX1, T aX2, double aAmount)
 
angle neolib::math::to_rad (angle aDegrees)
 
angle neolib::math::to_deg (angle aRadians)
 
template<typename T , uint32_t Size, typename Type >
bool neolib::math::operator== (const basic_vector< T, Size, Type > &aLhs, const basic_vector< T, Size, Type > &aRhs)
 
template<typename T , uint32_t Size, typename Type >
bool neolib::math::operator< (const basic_vector< T, Size, Type > &aLhs, const basic_vector< T, Size, Type > &aRhs)
 
template<typename T , uint32_t Size, typename Type >
std::partial_ordering neolib::math::operator<=> (const basic_vector< T, Size, Type > &aLhs, const basic_vector< T, Size, Type > &aRhs)
 
template<typename T , uint32_t D, typename Type >
basic_vector< T, D, Type > neolib::math::operator+ (const basic_vector< T, D, Type > &left, const basic_vector< T, D, Type > &right)
 
template<typename T , uint32_t D, typename Type >
basic_vector< T, D, Type > neolib::math::operator- (const basic_vector< T, D, Type > &left, const basic_vector< T, D, Type > &right)
 
template<typename T , uint32_t D, typename Type , std::size_t VertexCount>
std::array< basic_vector< T, D, Type >, VertexCountneolib::math::operator+ (const basic_vector< T, D, Type > &left, const std::array< basic_vector< T, D, Type >, VertexCount > &right)
 
template<typename T , uint32_t D, typename Type , std::size_t VertexCount>
std::array< basic_vector< T, D, Type >, VertexCountneolib::math::operator+ (const std::array< basic_vector< T, D, Type >, VertexCount > &left, const basic_vector< T, D, Type > &right)
 
template<typename T , uint32_t D, typename Type , std::size_t VertexCount>
std::array< basic_vector< T, D, Type >, VertexCount > & neolib::math::operator+= (std::array< basic_vector< T, D, Type >, VertexCount > &left, const basic_vector< T, D, Type > &right)
 
template<typename T , uint32_t D, typename Type , std::size_t VertexCount>
std::array< basic_vector< T, D, Type >, VertexCountneolib::math::operator- (const basic_vector< T, D, Type > &left, const std::array< basic_vector< T, D, Type >, VertexCount > &right)
 
template<typename T , uint32_t D, typename Type , std::size_t VertexCount>
std::array< basic_vector< T, D, Type >, VertexCountneolib::math::operator- (const std::array< basic_vector< T, D, Type >, VertexCount > &left, const basic_vector< T, D, Type > &right)
 
template<typename T , uint32_t D, typename Type , std::size_t VertexCount>
std::array< basic_vector< T, D, Type >, VertexCount > & neolib::math::operator-= (std::array< basic_vector< T, D, Type >, VertexCount > &left, const basic_vector< T, D, Type > &right)
 
template<typename T , uint32_t D, typename Type >
basic_vector< T, D, Type > neolib::math::operator+ (const basic_vector< T, D, Type > &left, const T &right)
 
template<typename T , uint32_t D, typename Type >
basic_vector< T, D, Type > neolib::math::operator+ (const T &left, const basic_vector< T, D, Type > &right)
 
template<typename T , uint32_t D, typename Type >
basic_vector< T, D, Type > neolib::math::operator- (const basic_vector< T, D, Type > &left, const T &right)
 
template<typename T , uint32_t D, typename Type >
basic_vector< T, D, Type > neolib::math::operator- (const T &left, const basic_vector< T, D, Type > &right)
 
template<typename T , uint32_t D, typename Type >
basic_vector< T, D, Type > neolib::math::operator* (const basic_vector< T, D, Type > &left, const T &right)
 
template<typename T , uint32_t D, typename Type >
basic_vector< T, D, Type > neolib::math::operator* (const T &left, const basic_vector< T, D, Type > &right)
 
template<typename T , uint32_t D, typename Type >
basic_vector< T, D, Type > neolib::math::operator/ (const basic_vector< T, D, Type > &left, const T &right)
 
template<typename T , uint32_t D, typename Type >
basic_vector< T, D, Type > neolib::math::operator/ (const T &left, const basic_vector< T, D, Type > &right)
 
template<typename T , uint32_t D, typename Type >
basic_vector< T, D, Type > neolib::math::operator% (const basic_vector< T, D, Type > &left, const T &right)
 
template<typename T , uint32_t D>
T neolib::math::operator* (const basic_vector< T, D, row_vector > &left, const basic_vector< T, D, column_vector > &right)
 
template<typename T , typename Type >
basic_vector< T, 3, Type > neolib::math::operator+ (const basic_vector< T, 3, Type > &left, const basic_vector< T, 3, Type > &right)
 
template<typename T , typename Type >
basic_vector< T, 3, Type > neolib::math::operator- (const basic_vector< T, 3, Type > &left, const basic_vector< T, 3, Type > &right)
 
template<typename T , typename Type >
basic_vector< T, 3, Type > neolib::math::operator+ (const basic_vector< T, 3, Type > &left, const T &right)
 
template<typename T , typename Type >
basic_vector< T, 3, Type > neolib::math::operator+ (const T &left, const basic_vector< T, 3, Type > &right)
 
template<typename T , typename Type >
basic_vector< T, 3, Type > neolib::math::operator- (const basic_vector< T, 3, Type > &left, const T &right)
 
template<typename T , typename Type >
basic_vector< T, 3, Type > neolib::math::operator- (const T &left, const basic_vector< T, 3, Type > &right)
 
template<typename T , typename Type >
basic_vector< T, 3, Type > neolib::math::operator* (const basic_vector< T, 3, Type > &left, const T &right)
 
template<typename T , typename Type >
basic_vector< T, 3, Type > neolib::math::operator* (const T &left, const basic_vector< T, 3, Type > &right)
 
template<typename T , typename Type >
basic_vector< T, 3, Type > neolib::math::operator/ (const basic_vector< T, 3, Type > &left, const T &right)
 
template<typename T , typename Type >
basic_vector< T, 3, Type > neolib::math::operator% (const basic_vector< T, 3, Type > &left, const T &right)
 
template<typename T >
T neolib::math::operator* (const basic_vector< T, 3, row_vector > &left, const basic_vector< T, 3, column_vector > &right)
 
template<typename T , typename Type >
basic_vector< T, 3, Type > neolib::math::midpoint (const basic_vector< T, 3, Type > &left, const basic_vector< T, 3, Type > &right)
 
template<typename T , uint32_t Size, typename Type >
basic_vector< T, Size, Type > neolib::math::lerp (const basic_vector< T, Size, Type > &aV1, const basic_vector< T, Size, Type > &aV2, double aAmount)
 
template<typename T , uint32_t Rows, uint32_t Columns>
basic_matrix< T, Rows, Columnsneolib::math::operator+ (const basic_matrix< T, Rows, Columns > &left, typename basic_matrix< T, Rows, Columns >::value_type right)
 
template<typename T , uint32_t Rows, uint32_t Columns>
basic_matrix< T, Rows, Columnsneolib::math::operator- (const basic_matrix< T, Rows, Columns > &left, typename basic_matrix< T, Rows, Columns >::value_type right)
 
template<typename T , uint32_t Rows, uint32_t Columns>
basic_matrix< T, Rows, Columnsneolib::math::operator* (const basic_matrix< T, Rows, Columns > &left, typename basic_matrix< T, Rows, Columns >::value_type right)
 
template<typename T , uint32_t Rows, uint32_t Columns>
basic_matrix< T, Rows, Columnsneolib::math::operator/ (const basic_matrix< T, Rows, Columns > &left, typename basic_matrix< T, Rows, Columns >::value_type right)
 
template<typename T , uint32_t Rows, uint32_t Columns>
basic_matrix< T, Rows, Columnsneolib::math::operator+ (scalar left, const basic_matrix< T, Rows, Columns > &right)
 
template<typename T , uint32_t Rows, uint32_t Columns>
basic_matrix< T, Rows, Columnsneolib::math::operator- (scalar left, const basic_matrix< T, Rows, Columns > &right)
 
template<typename T , uint32_t Rows, uint32_t Columns>
basic_matrix< T, Rows, Columnsneolib::math::operator* (scalar left, const basic_matrix< T, Rows, Columns > &right)
 
template<typename T , uint32_t Rows, uint32_t Columns>
basic_matrix< T, Rows, Columnsneolib::math::operator+ (const basic_matrix< T, Rows, Columns > &left, const basic_matrix< T, Rows, Columns > &right)
 
template<typename T , uint32_t Rows, uint32_t Columns>
basic_matrix< T, Rows, Columnsneolib::math::operator- (const basic_matrix< T, Rows, Columns > &left, const basic_matrix< T, Rows, Columns > &right)
 
template<typename T , uint32_t D1, uint32_t D2>
basic_matrix< T, D1, D1 > neolib::math::operator* (const basic_matrix< T, D1, D2 > &left, const basic_matrix< T, D2, D1 > &right)
 
template<typename T >
basic_matrix< T, 4u, 4uneolib::math::operator* (const basic_matrix< T, 4u, 4u > &left, const basic_matrix< T, 4u, 4u > &right)
 
template<typename T , uint32_t D>
basic_vector< T, D, column_vectorneolib::math::operator* (const basic_matrix< T, D, D > &left, const basic_vector< T, D, column_vector > &right)
 
template<typename T , uint32_t D, std::size_t VertexCount>
std::array< basic_vector< T, D, column_vector >, VertexCountneolib::math::operator* (const basic_matrix< T, D, D > &left, const std::array< basic_vector< T, D, column_vector >, VertexCount > &right)
 
template<typename T >
basic_vector< T, 4u, column_vectorneolib::math::operator* (const basic_matrix< T, 4u, 4u > &left, const basic_vector< T, 4u, column_vector > &right)
 
template<typename T , std::size_t VertexCount>
std::array< basic_vector< T, 4u, column_vector >, VertexCountneolib::math::operator* (const basic_matrix< T, 4u, 4u > &left, const std::array< basic_vector< T, 4u, column_vector >, VertexCount > &right)
 
template<typename T , uint32_t D>
basic_vector< T, D, row_vectorneolib::math::operator* (const basic_vector< T, D, row_vector > &left, const basic_matrix< T, D, D > &right)
 
template<typename T , uint32_t D, std::size_t VertexCount>
std::array< basic_vector< T, D, row_vector >, VertexCountneolib::math::operator* (const std::array< basic_vector< T, D, row_vector >, VertexCount > &left, const basic_matrix< T, D, D > &right)
 
template<typename T >
basic_vector< T, 4u, row_vectorneolib::math::operator* (const basic_vector< T, 4u, row_vector > &left, const basic_matrix< T, 4u, 4u > &right)
 
template<typename T , std::size_t VertexCount>
basic_vector< T, 4u, row_vectorneolib::math::operator* (const std::array< basic_vector< T, 4u, row_vector >, VertexCount > &left, const basic_matrix< T, 4u, 4u > &right)
 
template<typename T , uint32_t D>
basic_matrix< T, D, D > neolib::math::operator* (const basic_vector< T, D, column_vector > &left, const basic_vector< T, D, row_vector > &right)
 
template<typename T >
basic_matrix< T, 4u, 4uneolib::math::operator* (const basic_vector< T, 4u, column_vector > &left, const basic_vector< T, 4u, row_vector > &right)
 
template<typename T , uint32_t D>
basic_matrix< T, D, D > neolib::math::without_translation (const basic_matrix< T, D, D > &matrix)
 
template<typename Elem , typename Traits , typename T , uint32_t Size, typename Type >
std::basic_ostream< Elem, Traits > & neolib::math::operator<< (std::basic_ostream< Elem, Traits > &aStream, const basic_vector< T, Size, Type > &aVector)
 
template<typename Elem , typename Traits , typename T , uint32_t Size, typename Type >
std::basic_istream< Elem, Traits > & neolib::math::operator>> (std::basic_istream< Elem, Traits > &aStream, basic_vector< T, Size, Type > &aVector)
 
template<typename Elem , typename Traits , typename T , uint32_t Rows, uint32_t Columns>
std::basic_ostream< Elem, Traits > & neolib::math::operator<< (std::basic_ostream< Elem, Traits > &aStream, const basic_matrix< T, Rows, Columns > &aMatrix)
 
template<typename Elem , typename Traits , typename T , uint32_t Rows, uint32_t Columns>
std::basic_ostream< Elem, Traits > & neolib::math::operator<< (std::basic_ostream< Elem, Traits > &aStream, const optional< basic_matrix< T, Rows, Columns > > &aMatrix)
 
template<typename Elem , typename Traits , typename T , uint32_t Rows, uint32_t Columns>
std::basic_ostream< Elem, Traits > & neolib::math::operator<< (std::basic_ostream< Elem, Traits > &aStream, const std::optional< basic_matrix< T, Rows, Columns > > &aMatrix)
 
template<typename T >
basic_vector< T, 3u, column_vectorneolib::math::operator* (const basic_matrix< T, 4u, 4u > &left, const basic_vector< T, 3u, column_vector > &right)
 
template<typename T >
std::vector< basic_vector< T, 3u, column_vector > > neolib::math::operator* (const basic_matrix< T, 4u, 4u > &left, const std::vector< basic_vector< T, 3u, column_vector > > &right)
 
mat33 neolib::math::rotation_matrix (const vec3 &axis, scalar angle, scalar epsilon=0.00001)
 
mat33 neolib::math::rotation_matrix (const vec3 &vectorA, const vec3 &vectorB, scalar epsilon=0.00001)
 
mat33 neolib::math::rotation_matrix (const vec3 &angles)
 
mat44 neolib::math::affine_rotation_matrix (const vec3 &angles)
 
mat44neolib::math::apply_translation (mat44 &aMatrix, const vec3 &aTranslation)
 
mat44neolib::math::apply_scaling (mat44 &aMatrix, const vec3 &aScaling)
 
template<typename T >
bool neolib::math::nearly_equal (T lhs, T rhs, scalar epsilon=0.00001, std::enable_if_t< std::is_floating_point_v< T >, sfinae >={})
 
template<typename T >
bool neolib::math::nearly_equal (T lhs, T rhs, scalar epsilon=0.00001, std::enable_if_t< std::is_integral_v< T >, sfinae >={})
 
template<typename T , uint32_t Size, typename Type = column_vector>
bool neolib::math::nearly_equal (basic_vector< T, Size, Type > const &lhs, basic_vector< T, Size, Type > const &rhs, scalar epsilon=0.00001)
 
template<typename T >
bool neolib::math::nearly_equal (optional< T > const &lhs, optional< T > const &rhs, scalar epsilon=0.00001)
 
template<typename T >
bool neolib::math::nearly_equal (std::optional< T > const &lhs, std::optional< T > const &rhs, scalar epsilon=0.00001)
 
template<typename T1 , typename T2 >
bool neolib::math::nearly_equal (std::pair< T1, T2 > const &lhs, std::pair< T1, T2 > const &rhs, scalar epsilon=0.00001)
 
template<typename T >
bool neolib::math::nearly_equal (std::vector< T > const &lhs, std::vector< T > const &rhs, scalar epsilon=0.00001)
 
template<typename T , std::size_t D>
basic_vector< T, D > neolib::math::quad_extents (std::array< basic_vector< T, D >, 4 > const &aQuad)
 
vec3 neolib::math::aabb_origin (const aabb &aAabb)
 
vec3 neolib::math::aabb_extents (const aabb &aAabb)
 
template<typename... Transforms>
aabb neolib::math::aabb_transform (const aabb &aAabb, const Transforms &... aTransforms)
 
aabb neolib::math::to_aabb (const vec3 &aOrigin, scalar aSize)
 
aabb neolib::math::to_aabb (const vec3 &aOrigin, const vec3 &aSize)
 
template<typename VertexIter >
aabb neolib::math::to_aabb (VertexIter aBegin, VertexIter aEnd, const mat44 &aTransformation=mat44::identity())
 
aabb neolib::math::to_aabb (const vertices &aVertices, const mat44 &aTransformation=mat44::identity())
 
bool neolib::math::operator== (const aabb &left, const aabb &right)
 
bool neolib::math::operator< (const aabb &left, const aabb &right)
 
std::partial_ordering neolib::math::operator<=> (const aabb &left, const aabb &right)
 
aabb neolib::math::aabb_union (const aabb &left, const aabb &right)
 
scalar neolib::math::aabb_volume (const aabb &a)
 
bool neolib::math::aabb_contains (const aabb &outer, const aabb &inner)
 
bool neolib::math::aabb_contains (const aabb &outer, const vec3 &point)
 
bool neolib::math::aabb_intersects (const aabb &first, const aabb &second)
 
bool neolib::math::aabb_intersects (const optional< aabb > &first, const std::optional< aabb > &second)
 
bool neolib::math::aabb_intersects (const optional< aabb > &first, const aabb &second)
 
bool neolib::math::aabb_intersects (const aabb &first, const std::optional< aabb > &second)
 
vec2 neolib::math::aabb_origin (const aabb_2d &aAabb)
 
vec2 neolib::math::aabb_extents (const aabb_2d &aAabb)
 
template<typename... Transforms>
aabb_2d neolib::math::aabb_transform (const aabb_2d &aAabb, const Transforms &... aTransforms)
 
aabb_2d neolib::math::to_aabb_2d (const vec3 &aOrigin, scalar aSize)
 
aabb_2d neolib::math::to_aabb_2d (const vec3 &aOrigin, const vec3 &aSize)
 
template<typename VertexIter >
aabb_2d neolib::math::to_aabb_2d (VertexIter aBegin, VertexIter aEnd, const mat44 &aTransformation=mat44::identity())
 
aabb_2d neolib::math::to_aabb_2d (const vertices &aVertices, const mat44 &aTransformation=mat44::identity())
 
bool neolib::math::operator== (const aabb_2d &left, const aabb_2d &right)
 
bool neolib::math::operator< (const aabb_2d &left, const aabb_2d &right)
 
std::partial_ordering neolib::math::operator<=> (const aabb_2d &left, const aabb_2d &right)
 
aabb_2d neolib::math::aabb_union (const aabb_2d &left, const aabb_2d &right)
 
scalar neolib::math::aabb_volume (const aabb_2d &a)
 
bool neolib::math::aabb_contains (const aabb_2d &outer, const aabb_2d &inner)
 
bool neolib::math::aabb_contains (const aabb_2d &outer, const vec2 &point)
 
bool neolib::math::aabb_intersects (const aabb_2d &first, const aabb_2d &second)
 
bool neolib::math::aabb_intersects (const optional< aabb_2d > &first, const std::optional< aabb_2d > &second)
 
bool neolib::math::aabb_intersects (const optional< aabb_2d > &first, const aabb_2d &second)
 
bool neolib::math::aabb_intersects (const aabb_2d &first, const std::optional< aabb_2d > &second)
 
vec2 neolib::math::bezier_cubic (vec2 const &p0, vec2 const &p1, vec2 const &p2, vec2 const &p3, scalar t)
 
vec2 neolib::math::bezier_cubic_x (vec2 const &p0, vec2 const &p1, vec2 const &p2, vec2 const &p3, scalar x)
 
vec2 neolib::math::bezier_cubic_y (vec2 const &p0, vec2 const &p1, vec2 const &p2, vec2 const &p3, scalar y)
 
template<typename T >
basic_vector< T, 2 > neolib::math::bezier_cubic (basic_vector< T, 2 > const &p0, basic_vector< T, 2 > const &p1, basic_vector< T, 2 > const &p2, basic_vector< T, 2 > const &p3, T t)
 
template<typename T >
basic_vector< T, 2 > neolib::math::bezier_cubic_x (basic_vector< T, 2 > const &p0, basic_vector< T, 2 > const &p1, basic_vector< T, 2 > const &p2, basic_vector< T, 2 > const &p3, T x)
 
template<typename T >
basic_vector< T, 2 > neolib::math::bezier_cubic_y (basic_vector< T, 2 > const &p0, basic_vector< T, 2 > const &p1, basic_vector< T, 2 > const &p2, basic_vector< T, 2 > const &p3, T y)
 

Variables

template<typename T >
constexpr T neolib::math::constants::zero = static_cast<T>(0.0)
 
template<typename T >
constexpr T neolib::math::constants::one = static_cast<T>(1.0)
 
template<typename T >
constexpr T neolib::math::constants::two = static_cast<T>(2.0)
 
template<typename T >
constexpr T neolib::math::constants::three = static_cast<T>(3.0)
 
template<typename T >
constexpr T neolib::math::constants::four = static_cast<T>(4.0)
 

Macro Definition Documentation

◆ USE_AVX

#define USE_AVX

Definition at line 58 of file numerical.hpp.

◆ USE_EMM

#define USE_EMM

Definition at line 59 of file numerical.hpp.