|
sandbox
|
Generic fixed-size vector type. More...
#include <algorithm>#include <array>#include <cmath>#include <concepts>#include <ranges>#include <utility>#include <libsbx/utility/make_array.hpp>#include <libsbx/utility/assert.hpp>#include <libsbx/utility/zip.hpp>#include <libsbx/utility/hash.hpp>#include <libsbx/math/concepts.hpp>#include <libsbx/math/traits.hpp>#include <libsbx/math/constants.hpp>#include <libsbx/math/algorithm.hpp>#include <libsbx/math/vector.ipp>Go to the source code of this file.
Classes | |
| class | sbx::math::basic_vector< Size, Type > |
| Fixed-size vector type. More... | |
Namespaces | |
| namespace | libsbx |
Functions | |
| template<std::size_t Size, scalar Lhs, scalar Rhs> | |
| constexpr auto | sbx::math::operator== (const basic_vector< Size, Lhs > &lhs, const basic_vector< Size, Rhs > &rhs) noexcept -> bool |
| Equality comparison for vectors. More... | |
| template<std::size_t Size, scalar Lhs, scalar Rhs> | |
| constexpr auto | sbx::math::operator+ (basic_vector< Size, Lhs > lhs, const basic_vector< Size, Rhs > &rhs) noexcept -> basic_vector< Size, Lhs > |
| Vector addition. More... | |
| template<std::size_t Size, scalar Lhs, scalar Rhs> | |
| constexpr auto | sbx::math::operator- (basic_vector< Size, Lhs > lhs, const basic_vector< Size, Rhs > &rhs) noexcept -> basic_vector< Size, Lhs > |
| Vector subtraction. More... | |
| template<std::size_t Size, scalar Lhs, scalar Rhs> | |
| constexpr auto | sbx::math::operator* (basic_vector< Size, Lhs > lhs, Rhs scalar) noexcept -> basic_vector< Size, Lhs > |
| Scalar multiplication. More... | |
| template<std::size_t Size, scalar Lhs, scalar Rhs> | |
| constexpr auto | sbx::math::operator/ (basic_vector< Size, Lhs > lhs, Rhs scalar) noexcept -> basic_vector< Size, Lhs > |
| Scalar division. More... | |
Generic fixed-size vector type.
This header defines a statically sized vector template parameterized by component count and scalar type.
The vector stores its components contiguously and supports basic arithmetic, interpolation, normalization, and utility operations such as component-wise min/max and absolute value.
|
constexprnoexcept |
Scalar multiplication.
| Size | Component count. |
| Lhs | Left-hand scalar type. |
| Rhs | Right-hand scalar type. |
| lhs | Left-hand side vector. |
| scalar | Scalar multiplier. |
|
constexprnoexcept |
Vector addition.
| Size | Component count. |
| Lhs | Left-hand scalar type. |
| Rhs | Right-hand scalar type. |
| lhs | Left-hand side vector. |
| rhs | Right-hand side vector. |
|
constexprnoexcept |
Vector subtraction.
| Size | Component count. |
| Lhs | Left-hand scalar type. |
| Rhs | Right-hand scalar type. |
| lhs | Left-hand side vector. |
| rhs | Right-hand side vector. |
|
constexprnoexcept |
Scalar division.
| Size | Component count. |
| Lhs | Left-hand scalar type. |
| Rhs | Right-hand scalar type. |
| lhs | Left-hand side vector. |
| scalar | Scalar divisor. |
|
constexprnoexcept |
Equality comparison for vectors.
| Size | Component count. |
| Lhs | Left-hand scalar type. |
| Rhs | Right-hand scalar type. |
| lhs | Left-hand side vector. |
| rhs | Right-hand side vector. |