SA_Maths
Sapphire Suite's C++ Maths Library
Loading...
Searching...
No Matches
Classes | Typedefs | Functions
Vector2.hpp File Reference

Vector 2 type implementation. More...

#include <cstdint>
#include <SA/Maths/Debug.hpp>
#include <SA/Maths/Angle/Degree.hpp>
#include <SA/Maths/Algorithms/Cos.hpp>
#include <SA/Maths/Algorithms/Tan.hpp>
#include <SA/Maths/Algorithms/Sqrt.hpp>
#include <SA/Maths/Algorithms/Lerp.hpp>
#include <SA/Maths/Algorithms/Equals.hpp>
#include <SA/Maths/Space/Vector2.inl>

Go to the source code of this file.

Classes

struct  SA::Vec2< T >
 Vector 2 Sapphire's class. More...
 

Typedefs

using SA::Vec2i = Vec2<int32_t>
 Alias for int32 Vec2.
 
using SA::Vec2ui = Vec2<uint32_t>
 Alias for uint32 Vec2.
 
using SA::Vec2f = Vec2<float>
 Alias for float Vec2.
 
using SA::Vec2d = Vec2<double>
 Alias for double Vec2.
 
template<typename T >
using SA::Vector2 = Vec2<T>
 Template alias of Vec2.
 
using SA::Vector2i = Vector2<int32_t>
 Alias for int32 Vector2.
 
using SA::Vector2ui = Vector2<uint32_t>
 Alias for uint32 Vector2.
 
using SA::Vector2f = Vector2<float>
 Alias for float Vector2.
 
using SA::Vector2d = Vector2<double>
 Alias for double Vector2.
 

Functions

template<typename T >
constexpr Vec2< T > SA::operator* (typename std::remove_cv< T >::type _lhs, const Vec2< T > &_rhs) noexcept
 Scale each vector axis by _lhs.
 
template<typename T >
Vec2< T > SA::operator/ (typename std::remove_cv< T >::type _lhs, const Vec2< T > &_rhs)
  Inverse Scale each vector axis by _lhs.
 

Detailed Description

Vector 2 type implementation.

Function Documentation

◆ operator*()

template<typename T >
constexpr Vec2< T > SA::operator* ( typename std::remove_cv< T >::type _lhs,
const Vec2< T > & _rhs )
constexprnoexcept

Scale each vector axis by _lhs.

Parameters
[in]_lhsScale value to apply on all axis.
[in]_rhsVector to scale.
Returns
new vector scaled.

◆ operator/()

template<typename T >
Vec2< T > SA::operator/ ( typename std::remove_cv< T >::type _lhs,
const Vec2< T > & _rhs )

Inverse Scale each vector axis by _lhs.

Parameters
[in]_lhsInverse scale value to apply on all axis.
[in]_rhsVector to scale.
Returns
new vector inverse-scaled.