Simple-Vector v1.3.0
|
#include "Algorithm.hpp"
#include "Concepts.hpp"
#include "Functional.hpp"
#include <algorithm>
#include <array>
#include <cassert>
#include <cmath>
#include <concepts>
#include <execution>
#include <ranges>
Go to the source code of this file.
Classes | |
class | sl::vec::Vector< T, VDimensions > |
A mathematically vector implementation. More... | |
struct | sl::vec::vector_traits< Vector< T, VDimensions > > |
Specialization for Vector. More... | |
struct | sl::vec::is_vectorial< Vector< T, VDimensions > > |
Specialization for Vector which registers Vector with all its template variations as vectorial. More... | |
Namespaces | |
namespace | sl |
namespace | sl::vec |
Functions | |
template<class... T> | |
sl::vec::Vector (T &&...) -> Vector< std::common_type_t< T... >, sizeof...(T)> | |
Vector deduction guide to make aggregate-like construction easier. More... | |
template<vectorial TVector, add_assignable< TVector > T2> | |
constexpr TVector | sl::vec::operator+ (TVector lhs, T2 &&rhs) |
Sum operator. More... | |
template<vectorial TVector, sub_assignable< TVector > T2> | |
constexpr TVector | sl::vec::operator- (TVector lhs, T2 &&rhs) |
Minus operator. More... | |
template<vectorial TVector, mul_assignable< TVector > T2> | |
constexpr TVector | sl::vec::operator* (TVector lhs, T2 &&rhs) |
Multiplication operator. More... | |
template<vectorial TVector, mul_assignable< TVector > T2> | |
constexpr TVector | sl::vec::operator* (T2 &&lhs, TVector rhs) |
Commutative multiplication operator. More... | |
template<vectorial TVector, div_assignable< TVector > T2> | |
constexpr TVector | sl::vec::operator/ (TVector lhs, T2 &&rhs) |
Division operator. More... | |
template<vectorial TVector, mod_assignable< TVector > T2> | |
constexpr TVector | sl::vec::operator% (TVector lhs, T2 &&rhs) |
Modulo operator. More... | |
template<vectorial TVector1, vectorial TVector2> requires mulable<vector_value_t<TVector2>, vector_value_t<TVector1>> | |
constexpr vector_value_t< TVector1 > | sl::vec::dot_product (const TVector1 &lhs, const TVector2 &rhs) |
Calculates the dot product of to Vectors. More... | |
template<vectorial TVector> | |
constexpr vector_value_t< TVector > | sl::vec::length_squared (const TVector &vector) |
Calculates the squared length of a Vector. More... | |
template<vectorial TVector> | |
constexpr auto | sl::vec::length (const TVector &vector) |
Calculates the length of a Vector. More... | |
template<vectorial TVector> requires std::floating_point<vector_value_t<TVector>> | |
constexpr TVector | sl::vec::normalized (TVector vec) |
Calculates the normalization of a Vector. More... | |
template<vectorial TVector> | |
constexpr TVector | sl::vec::projected (const TVector &vector, TVector target) |
Projects vector onto the target Vector. More... | |
template<vectorial TVector, class T > requires std::is_arithmetic_v<T> | |
constexpr TVector | sl::vec::lerp (TVector vector1, const TVector &vector2, T t) |
Computes the linear interpolation between both vectors for the parameter t (or extrapolation, when t is outside the range [0,1]). More... | |
template<vectorial TVector> requires std::floating_point<vector_value_t<TVector>> | |
constexpr TVector | sl::vec::inversed (TVector vector) |
Computes the inverse of the vector (1./v[0], 1./v[1], ...). More... | |