Move Vectormath main
C++20 game and graphics mathematics
Loading...
Searching...
No Matches
Vec4.hpp File Reference
#include <algorithm>
#include <cassert>
#include <cmath>
#include <cstddef>
#include <cstdint>
#include <type_traits>
#include <mv/math/Vec2.hpp>
#include <mv/math/Vec3.hpp>
#include <mv/math/detail/VectorOps.hpp>

Go to the source code of this file.

Classes

class  mv::math::Vec4< T >
 

Namespaces

namespace  mv
 
namespace  mv::math
 

Typedefs

using mv::math::Vec4f = Vec4< float >
 
using mv::math::Vec4d = Vec4< double >
 
using mv::math::Vec4i8 = Vec4< std::int8_t >
 
using mv::math::Vec4u8 = Vec4< std::uint8_t >
 
using mv::math::Vec4i16 = Vec4< std::int16_t >
 
using mv::math::Vec4u16 = Vec4< std::uint16_t >
 
using mv::math::Vec4i32 = Vec4< std::int32_t >
 
using mv::math::Vec4u32 = Vec4< std::uint32_t >
 
using mv::math::Vec4i64 = Vec4< std::int64_t >
 
using mv::math::Vec4u64 = Vec4< std::uint64_t >
 
using mv::math::Vec4i = Vec4i32
 
using mv::math::Vec4u = Vec4u32
 

Functions

template<typename T >
T mv::math::Dot (const Vec4< T > &left, const Vec4< T > &right) noexcept
 
template<typename T >
T mv::math::LengthSquared (const Vec4< T > &value) noexcept
 
template<typename T >
requires std::is_floating_point_v<T>
bool mv::math::IsNearlyEqual (const Vec4< T > &left, const Vec4< T > &right, Tolerance< T > tolerance=Tolerance< T >::Default()) noexcept
 
template<typename T >
requires std::is_floating_point_v<T>
bool mv::math::IsNearlyZero (const Vec4< T > &value, T absoluteTolerance=Tolerance< T >::Default().Absolute) noexcept
 
template<typename T >
requires std::is_floating_point_v<T>
T mv::math::Length (const Vec4< T > &value) noexcept
 
template<typename T >
T mv::math::DistanceSquared (const Vec4< T > &left, const Vec4< T > &right) noexcept
 
template<typename T >
requires std::is_floating_point_v<T>
T mv::math::Distance (const Vec4< T > &left, const Vec4< T > &right) noexcept
 
template<typename T >
Vec4< T > mv::math::Min (const Vec4< T > &left, const Vec4< T > &right) noexcept
 
template<typename T >
Vec4< T > mv::math::Max (const Vec4< T > &left, const Vec4< T > &right) noexcept
 
template<typename T >
Vec4< T > mv::math::Clamp (const Vec4< T > &value, const Vec4< T > &minimum, const Vec4< T > &maximum) noexcept
 
template<typename T >
Vec4< T > mv::math::Clamp (const Vec4< T > &value, T minimum, T maximum) noexcept
 
template<typename T >
requires (std::is_signed_v<T> || std::is_floating_point_v<T>)
Vec4< T > mv::math::Abs (const Vec4< T > &value) noexcept
 
template<typename T >
requires (std::is_signed_v<T> || std::is_floating_point_v<T>)
Vec4< T > mv::math::Sign (const Vec4< T > &value) noexcept
 
template<typename T >
requires std::is_floating_point_v<T>
Vec4< T > mv::math::LerpUnclamped (const Vec4< T > &from, const Vec4< T > &to, T amount) noexcept
 
template<typename T >
requires std::is_floating_point_v<T>
Vec4< T > mv::math::Lerp (const Vec4< T > &from, const Vec4< T > &to, T amount) noexcept