IceShard 1
A personal game engine project, with development focused on 2D/2.5D games.
Loading...
Searching...
No Matches
ice::math Namespace Reference

Namespaces

namespace  concepts
namespace  detail_math
namespace  math_detail

Classes

struct  arr_t
struct  arr_t< 1, T >
struct  arr_t< 2, T >
struct  arr_t< 3, T >
struct  arr_t< 4, T >
struct  deg32
struct  deg64
struct  mat
struct  mat< 1, 1, T >
struct  mat< 2, 1, T >
struct  mat< 2, 2, T >
struct  mat< 3, 1, T >
struct  mat< 4, 1, T >
struct  rad32
struct  rad64
struct  swizzle_definitions

Concepts

concept  SimpleNumberType
concept  StrongScalarType

Typedefs

using deg = deg32
using rad = rad32
template<u32 Size, typename T>
using arr = arr_t<Size, T>
using arr1f = arr<1, f32>
using arr1u = arr<1, u32>
using arr1i = arr<1, i32>
using arr2f = arr<2, f32>
using arr2u = arr<2, u32>
using arr2i = arr<2, i32>
using arr3f = arr<3, f32>
using arr3u = arr<3, u32>
using arr3i = arr<3, i32>
using arr4f = arr<4, f32>
using arr4u = arr<4, u32>
using arr4i = arr<4, i32>
using mat2x2 = mat<2, 2, f32>
using mat2 = mat2x2
using mat3x3 = mat<3, 3, f32>
using mat3 = mat3x3
using mat4x4 = mat<4, 4, f32>
using mat4 = mat4x4
template<u32 Size, typename T>
using vec = mat<Size, 1, T>
using vec1f = vec<1, f32>
using vec1u = vec<1, u32>
using vec1i = vec<1, i32>
using vec2f = vec<2, f32>
using vec2u = vec<2, u32>
using vec2i = vec<2, i32>
using vec3f = vec<3, f32>
using vec3u = vec<3, u32>
using vec3i = vec<3, i32>
using vec3deg = vec<3, deg>
using vec3rad = vec<3, rad>
using vec4f = vec<4, f32>
using vec4u = vec<4, u32>
using vec4i = vec<4, i32>

Functions

template<typename T = void, typename U, typename... Args>
requires concepts::is_arithmetic<U, Args...>
constexpr auto sum (U first, Args... args) noexcept
template<typename T = void, typename U, typename... Args>
requires concepts::is_arithmetic<U, Args...>
constexpr auto sub (U first, Args... args) noexcept
template<typename T = void, typename U, typename... Args>
requires concepts::is_arithmetic<U, Args...>
constexpr auto mul (U first, Args... args) noexcept
template<typename T = void, typename U, typename... Args>
requires concepts::is_arithmetic<U, Args...>
constexpr auto div (U first, Args... args) noexcept
template<typename T = void, typename U, typename... Args>
requires concepts::is_arithmetic<U, Args...>
constexpr auto max_of (U first, Args... args) noexcept
template<typename T = void, typename U, typename... Args>
requires concepts::is_arithmetic<U, Args...>
constexpr auto min_of (U first, Args... args) noexcept
constexpr auto operator""_deg (long double value) noexcept -> ice::math::deg64
template<StrongScalarType ScalarType, SimpleNumberType NumberType>
constexpr auto operator* (ScalarType left, NumberType right) noexcept -> ScalarType
template<StrongScalarType ScalarType, SimpleNumberType NumberType>
constexpr auto operator/ (ScalarType left, NumberType right) noexcept -> ScalarType
template<u32 Size, typename T, typename U = T>
constexpr auto to_arr (arr_t< Size, U > arr_val) noexcept -> arr_t< Size, T >
template<u32 Size, typename T, typename U = T>
constexpr auto to_arr (vec< Size, U > vec_val) noexcept -> arr_t< Size, T >
template<u32 Size, typename T>
constexpr auto to_arr (vec< Size, T > vec_val) noexcept -> arr_t< Size, T >
template<u32 Size, typename T>
constexpr auto to_vec (vec< Size, T > vec_val) noexcept -> vec< Size, T >
template<u32 Size, typename T>
constexpr auto to_vec (arr_t< Size, T > arr_val) noexcept -> vec< Size, T >
template<u32 Size, typename T, typename U = T>
constexpr auto max (arr_t< Size, T > left, arr_t< Size, U > right) noexcept -> arr_t< Size, T >
template<u32 Size, typename T, typename U = T>
constexpr auto min (arr_t< Size, T > left, arr_t< Size, U > right) noexcept -> arr_t< Size, T >
template<u32 Size, typename T, typename U = T>
constexpr auto add (arr_t< Size, T > left, arr_t< Size, U > right) noexcept -> arr_t< Size, T >
template<u32 Size, typename T, typename U = T>
constexpr auto add (vec< Size, T > left, arr_t< Size, U > right) noexcept -> vec< Size, T >
template<u32 Size, typename T, typename U = T>
constexpr auto sub (arr_t< Size, T > left, arr_t< Size, U > right) noexcept -> arr_t< Size, T >
template<u32 Size, typename T, typename U = T>
constexpr auto sub (vec< Size, T > left, arr_t< Size, U > right) noexcept -> vec< Size, T >
template<u32 Size, typename T, typename U = T>
constexpr auto mul (arr_t< Size, T > left, U right) noexcept -> arr_t< Size, T >
template<u32 Size, typename T, typename U = T>
constexpr auto mul (arr_t< Size, T > left, arr_t< Size, U > right) noexcept -> arr_t< Size, T >
template<u32 Size, typename T, typename U = T>
constexpr auto mul (vec< Size, T > left, arr_t< Size, U > right) noexcept -> vec< Size, T >
template<u32 Size, typename T, typename U = T>
constexpr auto div (arr_t< Size, T > left, U right) noexcept -> arr_t< Size, T >
template<u32 Size, typename T, typename U = T>
constexpr auto div (arr_t< Size, T > left, arr_t< Size, U > right) noexcept -> arr_t< Size, T >
template<u32 Size, typename T, typename U = T>
constexpr auto div (vec< Size, T > left, arr_t< Size, U > right) noexcept -> vec< Size, T >
template<u32 Size, typename T>
constexpr auto operator- (arr_t< Size, T > left) noexcept -> arr_t< Size, T >
template<u32 Size, typename T, typename U = T>
constexpr auto operator+ (arr_t< Size, T > left, arr_t< Size, U > right) noexcept -> arr_t< Size, T >
template<u32 Size, typename T, typename U = T>
constexpr auto operator+ (vec< Size, T > left, arr_t< Size, U > right) noexcept -> vec< Size, T >
template<u32 Size, typename T, typename U = T>
constexpr auto operator- (arr_t< Size, T > left, arr_t< Size, U > right) noexcept -> arr_t< Size, T >
template<u32 Size, typename T, typename U = T>
constexpr auto operator- (vec< Size, T > left, arr_t< Size, U > right) noexcept -> vec< Size, T >
template<u32 Size, typename T, typename U = T>
constexpr auto operator* (arr_t< Size, T > left, U right) noexcept -> arr_t< Size, T >
template<u32 Size, typename T, typename U = T>
constexpr auto operator* (arr_t< Size, T > left, arr_t< Size, U > right) noexcept -> arr_t< Size, T >
template<u32 Size, typename T, typename U = T>
constexpr auto operator* (vec< Size, T > left, arr_t< Size, U > right) noexcept -> vec< Size, T >
template<u32 Size, typename T, typename U = T>
constexpr auto operator/ (arr_t< Size, T > left, U right) noexcept -> arr_t< Size, T >
template<u32 Size, typename T, typename U = T>
constexpr auto operator/ (arr_t< Size, T > left, arr_t< Size, U > right) noexcept -> arr_t< Size, T >
template<u32 Size, typename T, typename U = T>
constexpr auto operator/ (vec< Size, T > left, arr_t< Size, U > right) noexcept -> vec< Size, T >
constexpr auto radians (deg degrees) noexcept -> rad
constexpr auto degrees (rad radians) noexcept -> deg
constexpr auto sqrt (f32 val) noexcept -> f32
constexpr auto sin (rad radians) noexcept -> f32
constexpr auto cos (rad radians) noexcept -> f32
constexpr auto tan (rad radians) noexcept -> f32
auto atan (rad x) noexcept -> f32
auto atan2 (f32 x, f32 y) noexcept -> f32
constexpr auto clamp (f32 val, f32 min, f32 max) noexcept -> f32
constexpr auto radians (deg64 degrees) noexcept -> rad64
constexpr auto degrees (rad64 radians) noexcept -> deg64
constexpr auto sgn (f32 val) noexcept -> f32
constexpr auto abs (f32 val) noexcept -> f32
auto pow (f32 base, f32 exp) noexcept -> f32
constexpr auto cbrt (f32 val) noexcept -> f32
constexpr auto factorial (u32 n) noexcept -> u32
constexpr auto sin (rad64 angle) noexcept -> f64
constexpr auto cos (rad64 angle) noexcept -> f64
constexpr auto tan (rad64 radians) noexcept -> f64
auto atan (rad64 angle) noexcept -> f64
auto atan2 (f64 x, f64 y) noexcept -> f64
template<typename T>
constexpr void decompose (mat< 4, 4, T > matrix, vec3f *pos, vec3f *scale, vec< 3, rad > *angle) noexcept
auto lookat (vec< 3, f32 > pos, vec< 3, f32 > target, vec< 3, f32 > up) noexcept -> mat< 4, 4, f32 >
template<typename Mat>
constexpr auto identity () noexcept
template<u32 Rows1, u32 Cols1, u32 Rows2, u32 Cols2, typename T, typename U = T>
constexpr auto mul (mat< Rows1, Cols1, T > left, mat< Rows2, Cols2, U > right) noexcept -> mat< Rows1, Cols2, T >
template<u32 Rows, u32 Cols, typename T>
constexpr auto transpose (mat< Rows, Cols, T > matrix) noexcept -> mat< Cols, Rows, T >
template<u32 Rows, u32 Cols, typename T>
constexpr bool inverse_insitu (mat< Rows, Cols, T > &m) noexcept
template<typename T>
constexpr auto ortho_normalize (mat< 4, 4, T > matrix) noexcept -> mat< 4, 4, T >
template<u32 Rows1, u32 Cols1, u32 Rows2, u32 Cols2, typename T, typename U = T>
constexpr auto operator* (mat< Rows1, Cols1, T > left, mat< Rows2, Cols2, U > right) noexcept -> mat< Rows1, Cols2, T >
auto perspective_fovx (rad field_of_view_horizontal, f32 aspect_ratio, f32 near_plane, f32 far_plane) noexcept -> mat< 4, 4, f32 >
auto perspective_fovy (rad field_of_view_vertical, f32 aspect_ratio, f32 near_plane, f32 far_plane) noexcept -> mat< 4, 4, f32 >
constexpr auto orthographic (f32 left, f32 right, f32 bottom, f32 top, f32 near_plane, f32 far_plane) noexcept -> mat< 4, 4, f32 >
constexpr auto orthographic (vec< 2, f32 > left_right, vec< 2, f32 > bottom_top, vec< 2, f32 > near_far) noexcept -> mat< 4, 4, f32 >
auto rotate2d (radrad radrad) noexcept -> mat< 2, 2, f32 >
auto rotate (radrad radrad, vec< 3, f32 > v) noexcept -> mat< 4, 4, f32 >
auto rotate2d (mat< 2, 2, f32 > left, radrad radrad) noexcept -> mat< 2, 2, f32 >
auto rotate (mat< 4, 4, f32 > left, radrad radrad, vec< 3, f32 > v) noexcept -> mat< 4, 4, f32 >
auto rotation (mat< 4, 4, f32 > const &matrix) noexcept -> vec< 3, rad >
constexpr auto scale2d (vec< 2, f32 > v) noexcept -> mat< 2, 2, f32 >
constexpr auto scale (vec< 3, f32 > v) noexcept -> mat< 4, 4, f32 >
constexpr auto scale2d (mat< 2, 2, f32 > left, vec< 2, f32 > right) noexcept -> mat< 2, 2, f32 >
constexpr auto scale (mat< 4, 4, f32 > left, vec< 3, f32 > right) noexcept -> mat< 4, 4, f32 >
constexpr auto scale (mat< 4, 4, f32 > const &matrix) noexcept -> vec< 3, f32 >
template<u32 Size, typename T, u8... Components>
constexpr auto operator| (mat< Size, 1, T > vecvec, detail_math::swizzle< Components... >) noexcept -> mat< sizeof...(Components), 1, T >
constexpr auto translate (vec< 2, f32 > displacement) noexcept -> mat< 3, 3, f32 >
constexpr auto translate (vec< 3, f32 > displacement) noexcept -> mat< 4, 4, f32 >
constexpr auto translate (mat< 3, 3, f32 > left, vec< 2, f32 > right) noexcept -> mat< 3, 3, f32 >
constexpr auto translate (mat< 4, 4, f32 > left, vec< 3, f32 > right) noexcept -> mat< 4, 4, f32 >
constexpr auto translation (mat< 3, 3, f32 > const &matrix) noexcept -> vec< 2, f32 >
constexpr auto translation (mat< 4, 4, f32 > const &matrix) noexcept -> vec< 3, f32 >
template<u32 Size, typename T>
 mat (T(&)[Size]) -> mat< Size, 1, T >
template<u32 Size, typename T, typename U = T>
constexpr auto add (vec< Size, T > left, vec< Size, U > right) noexcept -> vec< Size, T >
template<u32 Size, typename T, typename U = T>
constexpr auto sub (vec< Size, T > left, vec< Size, U > right) noexcept -> vec< Size, T >
template<u32 Size, typename T, typename U = T>
constexpr auto mul (vec< Size, T > left, U right) noexcept -> vec< Size, T >
template<u32 Size, typename T, typename U = T>
constexpr auto div (vec< Size, T > left, U right) noexcept -> vec< Size, T >
template<u32 Size, typename T>
constexpr auto length (vec< Size, T > left) noexcept -> T
template<u32 Size, typename T>
constexpr auto length2 (vec< Size, T > left) noexcept -> T
constexpr auto cross (vec< 3, f32 > left, vec< 3, f32 > right) noexcept -> vec< 3, f32 >
constexpr auto dot (vec< 3, f32 > left, vec< 3, f32 > right) noexcept -> f32
auto atan2 (vec< 2, f32 > point) noexcept -> rad
template<u32 Size, typename T>
requires (Size > 1)
auto normalize (vec< Size, T > value) noexcept -> vec< Size, T >
template<u32 Size, typename T, typename U = T>
constexpr auto apply (vec< Size, T > left, U(*fn)(T) noexcept) noexcept -> vec< Size, U >
template<u32 Size, typename T>
constexpr auto operator- (vec< Size, T > left) noexcept -> vec< Size, T >
template<u32 Size, typename T, typename U = T>
constexpr auto operator+ (vec< Size, T > left, vec< Size, U > right) noexcept -> vec< Size, T >
template<u32 Size, typename T, typename U = T>
constexpr auto operator- (vec< Size, T > left, vec< Size, U > right) noexcept -> vec< Size, T >
template<u32 Size, typename T, typename U = T>
constexpr auto operator* (vec< Size, T > left, U right) noexcept -> vec< Size, T >
template<u32 Size, typename T, typename U = T>
constexpr auto operator/ (vec< Size, T > left, U right) noexcept -> vec< Size, T >
template<u32 Size, typename T, typename U>
constexpr auto operator+= (vec< Size, T > &left, vec< Size, U > right) noexcept -> vec< Size, T > &
template<u32 Size, typename T, typename U>
constexpr auto operator-= (vec< Size, T > &left, vec< Size, U > right) noexcept -> vec< Size, T > &

Variables

static constexpr ice::f32 f32_eps = std::numeric_limits<f32>::epsilon()
static constexpr ice::f32 f32_pi = 3.14159265358979323846f
static constexpr ice::f32 f32_half_pi = 3.14159265358979323846f * 0.5f
static constexpr ice::f64 f64_eps = std::numeric_limits<f64>::epsilon()
static constexpr ice::f64 f64_pi = 3.14159265358979323846
static constexpr ice::f64 f64_half_pi = 3.14159265358979323846 * 0.5
static constexpr auto mat2x2_identity = identity<mat<2, 2, f32>>()
static constexpr auto mat3x3_identity = identity<mat<3, 3, f32>>()
static constexpr auto mat4x4_identity = identity<mat<4, 4, f32>>()
static constexpr swizzle_definitions sw

Detailed Description

Copyright 2024 - 2026, Dandielo dandi.nosp@m.elo@.nosp@m.icesh.nosp@m.ard..nosp@m.net SPDX-License-Identifier: MIT

Copyright 2022 - 2026, Dandielo dandi.nosp@m.elo@.nosp@m.icesh.nosp@m.ard..nosp@m.net SPDX-License-Identifier: MIT

Copyright 2023 - 2025, Dandielo dandi.nosp@m.elo@.nosp@m.icesh.nosp@m.ard..nosp@m.net SPDX-License-Identifier: MIT

Copyright 2025 - 2025, Dandielo dandi.nosp@m.elo@.nosp@m.icesh.nosp@m.ard..nosp@m.net SPDX-License-Identifier: MIT

Copyright 2022 - 2025, Dandielo dandi.nosp@m.elo@.nosp@m.icesh.nosp@m.ard..nosp@m.net SPDX-License-Identifier: MIT

Typedef Documentation

◆ arr

template<u32 Size, typename T>
using ice::math::arr = arr_t<Size, T>

◆ arr1f

using ice::math::arr1f = arr<1, f32>

◆ arr1i

using ice::math::arr1i = arr<1, i32>

◆ arr1u

using ice::math::arr1u = arr<1, u32>

◆ arr2f

using ice::math::arr2f = arr<2, f32>

◆ arr2i

using ice::math::arr2i = arr<2, i32>

◆ arr2u

using ice::math::arr2u = arr<2, u32>

◆ arr3f

using ice::math::arr3f = arr<3, f32>

◆ arr3i

using ice::math::arr3i = arr<3, i32>

◆ arr3u

using ice::math::arr3u = arr<3, u32>

◆ arr4f

using ice::math::arr4f = arr<4, f32>

◆ arr4i

using ice::math::arr4i = arr<4, i32>

◆ arr4u

using ice::math::arr4u = arr<4, u32>

◆ deg

◆ mat2

◆ mat2x2

using ice::math::mat2x2 = mat<2, 2, f32>

◆ mat3

◆ mat3x3

using ice::math::mat3x3 = mat<3, 3, f32>

◆ mat4

◆ mat4x4

using ice::math::mat4x4 = mat<4, 4, f32>

◆ rad

◆ vec

template<u32 Size, typename T>
using ice::math::vec = mat<Size, 1, T>

◆ vec1f

using ice::math::vec1f = vec<1, f32>

◆ vec1i

using ice::math::vec1i = vec<1, i32>

◆ vec1u

using ice::math::vec1u = vec<1, u32>

◆ vec2f

using ice::math::vec2f = vec<2, f32>

◆ vec2i

using ice::math::vec2i = vec<2, i32>

◆ vec2u

using ice::math::vec2u = vec<2, u32>

◆ vec3deg

using ice::math::vec3deg = vec<3, deg>

◆ vec3f

using ice::math::vec3f = vec<3, f32>

◆ vec3i

using ice::math::vec3i = vec<3, i32>

◆ vec3rad

using ice::math::vec3rad = vec<3, rad>

◆ vec3u

using ice::math::vec3u = vec<3, u32>

◆ vec4f

using ice::math::vec4f = vec<4, f32>

◆ vec4i

using ice::math::vec4i = vec<4, i32>

◆ vec4u

using ice::math::vec4u = vec<4, u32>

Function Documentation

◆ abs()

auto ice::math::abs ( f32 val) -> f32
constexprnoexcept

◆ add() [1/3]

template<u32 Size, typename T, typename U = T>
auto ice::math::add ( arr_t< Size, T > left,
arr_t< Size, U > right ) -> arr_t< Size, T >
constexprnoexcept

◆ add() [2/3]

template<u32 Size, typename T, typename U = T>
auto ice::math::add ( vec< Size, T > left,
arr_t< Size, U > right ) -> vec< Size, T >
constexprnoexcept

◆ add() [3/3]

template<u32 Size, typename T, typename U = T>
auto ice::math::add ( vec< Size, T > left,
vec< Size, U > right ) -> vec< Size, T >
constexprnoexcept

◆ apply()

template<u32 Size, typename T, typename U = T>
auto ice::math::apply ( vec< Size, T > left,
U(* fn )(T) noexcept ) -> vec< Size, U >
constexprnoexcept

◆ atan() [1/2]

auto ice::math::atan ( rad x) -> f32
inlinenoexcept

◆ atan() [2/2]

auto ice::math::atan ( rad64 angle) -> f64
inlinenoexcept

◆ atan2() [1/3]

auto ice::math::atan2 ( f32 x,
f32 y ) -> f32
inlinenoexcept

◆ atan2() [2/3]

auto ice::math::atan2 ( f64 x,
f64 y ) -> f64
inlinenoexcept

◆ atan2() [3/3]

auto ice::math::atan2 ( vec< 2, f32 > point) -> rad
inlinenoexcept

◆ cbrt()

auto ice::math::cbrt ( f32 val) -> f32
constexprnoexcept

◆ clamp()

auto ice::math::clamp ( f32 val,
f32 min,
f32 max ) -> f32
constexprnoexcept

◆ cos() [1/2]

auto ice::math::cos ( rad radians) -> f32
constexprnoexcept

◆ cos() [2/2]

auto ice::math::cos ( rad64 angle) -> f64
constexprnoexcept

◆ cross()

auto ice::math::cross ( vec< 3, f32 > left,
vec< 3, f32 > right ) -> vec< 3, f32 >
constexprnoexcept

◆ decompose()

template<typename T>
void ice::math::decompose ( mat< 4, 4, T > matrix,
vec3f * pos,
vec3f * scale,
vec< 3, rad > * angle )
constexprnoexcept

◆ degrees() [1/2]

auto ice::math::degrees ( rad radians) -> deg
constexprnoexcept

◆ degrees() [2/2]

auto ice::math::degrees ( rad64 radians) -> deg64
constexprnoexcept

◆ div() [1/5]

template<u32 Size, typename T, typename U = T>
auto ice::math::div ( arr_t< Size, T > left,
arr_t< Size, U > right ) -> arr_t< Size, T >
constexprnoexcept

◆ div() [2/5]

template<u32 Size, typename T, typename U = T>
auto ice::math::div ( arr_t< Size, T > left,
U right ) -> arr_t< Size, T >
constexprnoexcept

◆ div() [3/5]

template<typename T = void, typename U, typename... Args>
requires concepts::is_arithmetic<U, Args...>
auto ice::math::div ( U first,
Args... args )
constexprnoexcept

◆ div() [4/5]

template<u32 Size, typename T, typename U = T>
auto ice::math::div ( vec< Size, T > left,
arr_t< Size, U > right ) -> vec< Size, T >
constexprnoexcept

◆ div() [5/5]

template<u32 Size, typename T, typename U = T>
auto ice::math::div ( vec< Size, T > left,
U right ) -> vec< Size, T >
constexprnoexcept

◆ dot()

auto ice::math::dot ( vec< 3, f32 > left,
vec< 3, f32 > right ) -> f32
constexprnoexcept

◆ factorial()

auto ice::math::factorial ( u32 n) -> u32
constexprnoexcept

◆ identity()

template<typename Mat>
auto ice::math::identity ( )
constexprnoexcept

◆ inverse_insitu()

template<u32 Rows, u32 Cols, typename T>
bool ice::math::inverse_insitu ( mat< Rows, Cols, T > & m)
constexprnoexcept

◆ length()

template<u32 Size, typename T>
auto ice::math::length ( vec< Size, T > left) -> T
constexprnoexcept

◆ length2()

template<u32 Size, typename T>
auto ice::math::length2 ( vec< Size, T > left) -> T
constexprnoexcept

◆ lookat()

auto ice::math::lookat ( vec< 3, f32 > pos,
vec< 3, f32 > target,
vec< 3, f32 > up ) -> mat< 4, 4, f32 >
inlinenoexcept

◆ mat()

template<u32 Size, typename T>
ice::math::mat ( T(&) [Size]) -> mat< Size, 1, T >

◆ max()

template<u32 Size, typename T, typename U = T>
auto ice::math::max ( arr_t< Size, T > left,
arr_t< Size, U > right ) -> arr_t< Size, T >
constexprnoexcept

◆ max_of()

template<typename T = void, typename U, typename... Args>
requires concepts::is_arithmetic<U, Args...>
auto ice::math::max_of ( U first,
Args... args )
constexprnoexcept

◆ min()

template<u32 Size, typename T, typename U = T>
auto ice::math::min ( arr_t< Size, T > left,
arr_t< Size, U > right ) -> arr_t< Size, T >
constexprnoexcept

◆ min_of()

template<typename T = void, typename U, typename... Args>
requires concepts::is_arithmetic<U, Args...>
auto ice::math::min_of ( U first,
Args... args )
constexprnoexcept

◆ mul() [1/6]

template<u32 Size, typename T, typename U = T>
auto ice::math::mul ( arr_t< Size, T > left,
arr_t< Size, U > right ) -> arr_t< Size, T >
constexprnoexcept

◆ mul() [2/6]

template<u32 Size, typename T, typename U = T>
auto ice::math::mul ( arr_t< Size, T > left,
U right ) -> arr_t< Size, T >
constexprnoexcept

◆ mul() [3/6]

template<u32 Rows1, u32 Cols1, u32 Rows2, u32 Cols2, typename T, typename U = T>
auto ice::math::mul ( mat< Rows1, Cols1, T > left,
mat< Rows2, Cols2, U > right ) -> mat< Rows1, Cols2, T >
constexprnoexcept

◆ mul() [4/6]

template<typename T = void, typename U, typename... Args>
requires concepts::is_arithmetic<U, Args...>
auto ice::math::mul ( U first,
Args... args )
constexprnoexcept

◆ mul() [5/6]

template<u32 Size, typename T, typename U = T>
auto ice::math::mul ( vec< Size, T > left,
arr_t< Size, U > right ) -> vec< Size, T >
constexprnoexcept

◆ mul() [6/6]

template<u32 Size, typename T, typename U = T>
auto ice::math::mul ( vec< Size, T > left,
U right ) -> vec< Size, T >
constexprnoexcept

◆ normalize()

template<u32 Size, typename T>
requires (Size > 1)
auto ice::math::normalize ( vec< Size, T > value) -> vec< Size, T >
inlinenoexcept

◆ operator""_deg()

auto ice::math::operator""_deg ( long double value) -> ice::math::deg64
inlineconstexprnoexcept

◆ operator*() [1/6]

template<u32 Size, typename T, typename U = T>
auto ice::math::operator* ( arr_t< Size, T > left,
arr_t< Size, U > right ) -> arr_t< Size, T >
constexprnoexcept

◆ operator*() [2/6]

template<u32 Size, typename T, typename U = T>
auto ice::math::operator* ( arr_t< Size, T > left,
U right ) -> arr_t< Size, T >
constexprnoexcept

◆ operator*() [3/6]

template<u32 Rows1, u32 Cols1, u32 Rows2, u32 Cols2, typename T, typename U = T>
auto ice::math::operator* ( mat< Rows1, Cols1, T > left,
mat< Rows2, Cols2, U > right ) -> mat< Rows1, Cols2, T >
constexprnoexcept

◆ operator*() [4/6]

template<StrongScalarType ScalarType, SimpleNumberType NumberType>
auto ice::math::operator* ( ScalarType left,
NumberType right ) -> ScalarType
inlineconstexprnoexcept

◆ operator*() [5/6]

template<u32 Size, typename T, typename U = T>
auto ice::math::operator* ( vec< Size, T > left,
arr_t< Size, U > right ) -> vec< Size, T >
constexprnoexcept

◆ operator*() [6/6]

template<u32 Size, typename T, typename U = T>
auto ice::math::operator* ( vec< Size, T > left,
U right ) -> vec< Size, T >
constexprnoexcept

◆ operator+() [1/3]

template<u32 Size, typename T, typename U = T>
auto ice::math::operator+ ( arr_t< Size, T > left,
arr_t< Size, U > right ) -> arr_t< Size, T >
constexprnoexcept

◆ operator+() [2/3]

template<u32 Size, typename T, typename U = T>
auto ice::math::operator+ ( vec< Size, T > left,
arr_t< Size, U > right ) -> vec< Size, T >
constexprnoexcept

◆ operator+() [3/3]

template<u32 Size, typename T, typename U = T>
auto ice::math::operator+ ( vec< Size, T > left,
vec< Size, U > right ) -> vec< Size, T >
constexprnoexcept

◆ operator+=()

template<u32 Size, typename T, typename U>
auto ice::math::operator+= ( vec< Size, T > & left,
vec< Size, U > right ) -> vec< Size, T > &
constexprnoexcept

◆ operator-() [1/5]

template<u32 Size, typename T>
auto ice::math::operator- ( arr_t< Size, T > left) -> arr_t< Size, T >
constexprnoexcept

◆ operator-() [2/5]

template<u32 Size, typename T, typename U = T>
auto ice::math::operator- ( arr_t< Size, T > left,
arr_t< Size, U > right ) -> arr_t< Size, T >
constexprnoexcept

◆ operator-() [3/5]

template<u32 Size, typename T>
auto ice::math::operator- ( vec< Size, T > left) -> vec< Size, T >
constexprnoexcept

◆ operator-() [4/5]

template<u32 Size, typename T, typename U = T>
auto ice::math::operator- ( vec< Size, T > left,
arr_t< Size, U > right ) -> vec< Size, T >
constexprnoexcept

◆ operator-() [5/5]

template<u32 Size, typename T, typename U = T>
auto ice::math::operator- ( vec< Size, T > left,
vec< Size, U > right ) -> vec< Size, T >
constexprnoexcept

◆ operator-=()

template<u32 Size, typename T, typename U>
auto ice::math::operator-= ( vec< Size, T > & left,
vec< Size, U > right ) -> vec< Size, T > &
constexprnoexcept

◆ operator/() [1/5]

template<u32 Size, typename T, typename U = T>
auto ice::math::operator/ ( arr_t< Size, T > left,
arr_t< Size, U > right ) -> arr_t< Size, T >
constexprnoexcept

◆ operator/() [2/5]

template<u32 Size, typename T, typename U = T>
auto ice::math::operator/ ( arr_t< Size, T > left,
U right ) -> arr_t< Size, T >
constexprnoexcept

◆ operator/() [3/5]

template<StrongScalarType ScalarType, SimpleNumberType NumberType>
auto ice::math::operator/ ( ScalarType left,
NumberType right ) -> ScalarType
inlineconstexprnoexcept

◆ operator/() [4/5]

template<u32 Size, typename T, typename U = T>
auto ice::math::operator/ ( vec< Size, T > left,
arr_t< Size, U > right ) -> vec< Size, T >
constexprnoexcept

◆ operator/() [5/5]

template<u32 Size, typename T, typename U = T>
auto ice::math::operator/ ( vec< Size, T > left,
U right ) -> vec< Size, T >
constexprnoexcept

◆ operator|()

template<u32 Size, typename T, u8... Components>
auto ice::math::operator| ( mat< Size, 1, T > vec,
detail_math::swizzle< Components... >  ) -> mat< sizeof...(Components), 1, T >
constexprnoexcept

◆ ortho_normalize()

template<typename T>
auto ice::math::ortho_normalize ( mat< 4, 4, T > matrix) -> mat< 4, 4, T >
constexprnoexcept

◆ orthographic() [1/2]

auto ice::math::orthographic ( f32 left,
f32 right,
f32 bottom,
f32 top,
f32 near_plane,
f32 far_plane ) -> mat< 4, 4, f32 >
constexprnoexcept

◆ orthographic() [2/2]

auto ice::math::orthographic ( vec< 2, f32 > left_right,
vec< 2, f32 > bottom_top,
vec< 2, f32 > near_far ) -> mat< 4, 4, f32 >
constexprnoexcept

◆ perspective_fovx()

auto ice::math::perspective_fovx ( rad field_of_view_horizontal,
f32 aspect_ratio,
f32 near_plane,
f32 far_plane ) -> mat< 4, 4, f32 >
inlinenoexcept

◆ perspective_fovy()

auto ice::math::perspective_fovy ( rad field_of_view_vertical,
f32 aspect_ratio,
f32 near_plane,
f32 far_plane ) -> mat< 4, 4, f32 >
inlinenoexcept

◆ pow()

auto ice::math::pow ( f32 base,
f32 exp ) -> f32
inlinenoexcept

◆ radians() [1/2]

auto ice::math::radians ( deg degrees) -> rad
constexprnoexcept

◆ radians() [2/2]

auto ice::math::radians ( deg64 degrees) -> rad64
constexprnoexcept

◆ rotate() [1/2]

auto ice::math::rotate ( mat< 4, 4, f32 > left,
rad rad,
vec< 3, f32 > v ) -> mat< 4, 4, f32 >
inlinenoexcept

◆ rotate() [2/2]

auto ice::math::rotate ( rad rad,
vec< 3, f32 > v ) -> mat< 4, 4, f32 >
inlinenoexcept

◆ rotate2d() [1/2]

auto ice::math::rotate2d ( mat< 2, 2, f32 > left,
rad rad ) -> mat< 2, 2, f32 >
inlinenoexcept

◆ rotate2d() [2/2]

auto ice::math::rotate2d ( rad rad) -> mat< 2, 2, f32 >
inlinenoexcept

◆ rotation()

auto ice::math::rotation ( mat< 4, 4, f32 > const & matrix) -> vec< 3, rad >
inlinenoexcept

◆ scale() [1/3]

auto ice::math::scale ( mat< 4, 4, f32 > const & matrix) -> vec< 3, f32 >
constexprnoexcept

◆ scale() [2/3]

auto ice::math::scale ( mat< 4, 4, f32 > left,
vec< 3, f32 > right ) -> mat< 4, 4, f32 >
constexprnoexcept

◆ scale() [3/3]

auto ice::math::scale ( vec< 3, f32 > v) -> mat< 4, 4, f32 >
constexprnoexcept

◆ scale2d() [1/2]

auto ice::math::scale2d ( mat< 2, 2, f32 > left,
vec< 2, f32 > right ) -> mat< 2, 2, f32 >
constexprnoexcept

◆ scale2d() [2/2]

auto ice::math::scale2d ( vec< 2, f32 > v) -> mat< 2, 2, f32 >
constexprnoexcept

◆ sgn()

auto ice::math::sgn ( f32 val) -> f32
constexprnoexcept

◆ sin() [1/2]

auto ice::math::sin ( rad radians) -> f32
constexprnoexcept

◆ sin() [2/2]

auto ice::math::sin ( rad64 angle) -> f64
constexprnoexcept

◆ sqrt()

auto ice::math::sqrt ( f32 val) -> f32
constexprnoexcept

◆ sub() [1/4]

template<u32 Size, typename T, typename U = T>
auto ice::math::sub ( arr_t< Size, T > left,
arr_t< Size, U > right ) -> arr_t< Size, T >
constexprnoexcept

◆ sub() [2/4]

template<typename T = void, typename U, typename... Args>
requires concepts::is_arithmetic<U, Args...>
auto ice::math::sub ( U first,
Args... args )
constexprnoexcept

◆ sub() [3/4]

template<u32 Size, typename T, typename U = T>
auto ice::math::sub ( vec< Size, T > left,
arr_t< Size, U > right ) -> vec< Size, T >
constexprnoexcept

◆ sub() [4/4]

template<u32 Size, typename T, typename U = T>
auto ice::math::sub ( vec< Size, T > left,
vec< Size, U > right ) -> vec< Size, T >
constexprnoexcept

◆ sum()

template<typename T = void, typename U, typename... Args>
requires concepts::is_arithmetic<U, Args...>
auto ice::math::sum ( U first,
Args... args )
constexprnoexcept

◆ tan() [1/2]

auto ice::math::tan ( rad radians) -> f32
constexprnoexcept

◆ tan() [2/2]

auto ice::math::tan ( rad64 radians) -> f64
constexprnoexcept

◆ to_arr() [1/3]

template<u32 Size, typename T, typename U = T>
auto ice::math::to_arr ( arr_t< Size, U > arr_val) -> arr_t< Size, T >
constexprnoexcept

◆ to_arr() [2/3]

template<u32 Size, typename T>
auto ice::math::to_arr ( vec< Size, T > vec_val) -> arr_t< Size, T >
constexprnoexcept

◆ to_arr() [3/3]

template<u32 Size, typename T, typename U = T>
auto ice::math::to_arr ( vec< Size, U > vec_val) -> arr_t< Size, T >
constexprnoexcept

◆ to_vec() [1/2]

template<u32 Size, typename T>
auto ice::math::to_vec ( arr_t< Size, T > arr_val) -> vec< Size, T >
constexprnoexcept

◆ to_vec() [2/2]

template<u32 Size, typename T>
auto ice::math::to_vec ( vec< Size, T > vec_val) -> vec< Size, T >
constexprnoexcept

◆ translate() [1/4]

auto ice::math::translate ( mat< 3, 3, f32 > left,
vec< 2, f32 > right ) -> mat< 3, 3, f32 >
constexprnoexcept

◆ translate() [2/4]

auto ice::math::translate ( mat< 4, 4, f32 > left,
vec< 3, f32 > right ) -> mat< 4, 4, f32 >
constexprnoexcept

◆ translate() [3/4]

auto ice::math::translate ( vec< 2, f32 > displacement) -> mat< 3, 3, f32 >
constexprnoexcept

◆ translate() [4/4]

auto ice::math::translate ( vec< 3, f32 > displacement) -> mat< 4, 4, f32 >
constexprnoexcept

◆ translation() [1/2]

auto ice::math::translation ( mat< 3, 3, f32 > const & matrix) -> vec< 2, f32 >
constexprnoexcept

◆ translation() [2/2]

auto ice::math::translation ( mat< 4, 4, f32 > const & matrix) -> vec< 3, f32 >
constexprnoexcept

◆ transpose()

template<u32 Rows, u32 Cols, typename T>
auto ice::math::transpose ( mat< Rows, Cols, T > matrix) -> mat< Cols, Rows, T >
constexprnoexcept

Variable Documentation

◆ f32_eps

ice::f32 ice::math::f32_eps = std::numeric_limits<f32>::epsilon()
staticconstexpr

◆ f32_half_pi

ice::f32 ice::math::f32_half_pi = 3.14159265358979323846f * 0.5f
staticconstexpr

◆ f32_pi

ice::f32 ice::math::f32_pi = 3.14159265358979323846f
staticconstexpr

◆ f64_eps

ice::f64 ice::math::f64_eps = std::numeric_limits<f64>::epsilon()
staticconstexpr

◆ f64_half_pi

ice::f64 ice::math::f64_half_pi = 3.14159265358979323846 * 0.5
staticconstexpr

◆ f64_pi

ice::f64 ice::math::f64_pi = 3.14159265358979323846
staticconstexpr

◆ mat2x2_identity

auto ice::math::mat2x2_identity = identity<mat<2, 2, f32>>()
staticconstexpr

◆ mat3x3_identity

auto ice::math::mat3x3_identity = identity<mat<3, 3, f32>>()
staticconstexpr

◆ mat4x4_identity

auto ice::math::mat4x4_identity = identity<mat<4, 4, f32>>()
staticconstexpr

◆ sw

swizzle_definitions ice::math::sw
staticconstexpr