Declaration of Math's API's Object : Vector2D.
More...
#include <Utility/String/NRE_String.hpp>
#include <Utility/Interfaces/Stringable/NRE_Stringable.hpp>
#include "../../NRE_Math.hpp"
#include <cassert>
#include "NRE_Vector2D.tpp"
Go to the source code of this file.
|
| NRE |
| The NearlyRealEngine's global namespace.
|
|
| Math |
| Math's API.
|
|
| std |
| The stl standard namespace.
|
|
|
template<class T > |
using | NRE::Math::Point2D = Vector2D< T > |
|
|
template<class T , class K , typename = UseIfArithmetic<K>> |
constexpr Vector2D< std::common_type_t< T, K > > | NRE::Math::operator* (K k, Vector2D< T > const &u) |
|
template<class T > |
Vector2D< T > | NRE::Math::normalize (Vector2D< T > const &u) |
|
template<class T , class K , typename = UseIfArithmetic<K>> |
Vector2D< std::common_type_t< T, K > > | NRE::Math::pow (Vector2D< T > const &u, K k) |
|
template<class T , class K > |
Vector2D< std::common_type_t< T, K > > | NRE::Math::pow (Vector2D< T > const &u, Vector2D< K > const &p) |
|
template<class T , class K > |
constexpr Vector2D< std::common_type_t< T, K > > | NRE::Math::reflect (Vector2D< T > const &u, Vector2D< K > const &n) |
|
Declaration of Math's API's Object : Vector2D.
- Author
- Louis ABEL
- Date
- 27/03/2019
- Copyright
- CC-BY-NC-SA
template<class T >
Vector2D<T> NRE::Math::normalize |
( |
Vector2D< T > const & |
u | ) |
|
Return a normalized version of the given vector
- Parameters
-
- Returns
- the normalized vector
template<class T , class K , typename = UseIfArithmetic<K>>
constexpr Vector2D<std::common_type_t<T, K> > NRE::Math::operator* |
( |
K |
k, |
|
|
Vector2D< T > const & |
u |
|
) |
| |
Compute the vector resulting in the multiplication of u by k
- Parameters
-
u | the vector |
k | the multiplication factor |
- Returns
- the computed vector
template<class T , class K , typename = UseIfArithmetic<K>>
Vector2D<std::common_type_t<T, K> > NRE::Math::pow |
( |
Vector2D< T > const & |
u, |
|
|
K |
k |
|
) |
| |
Return a vector with components raised to the given power
- Parameters
-
u | the vector to raise |
k | the power to which to raise the vector |
- Returns
- the raised vector
template<class T , class K >
Vector2D<std::common_type_t<T, K> > NRE::Math::pow |
( |
Vector2D< T > const & |
u, |
|
|
Vector2D< K > const & |
p |
|
) |
| |
Return a vector with components raised to the given power
- Parameters
-
u | the vector to raise |
p | the power to which to raise the vector |
- Returns
- the raised vector
template<class T , class K >
constexpr Vector2D<std::common_type_t<T, K> > NRE::Math::reflect |
( |
Vector2D< T > const & |
u, |
|
|
Vector2D< K > const & |
n |
|
) |
| |
Reflect the given incidence vector with the given normal
- Parameters
-
u | the vector to reflect |
n | the normal |
- Returns
- the reflected vector