Vector2D.hpp File Reference
#include <etk/math/Vector3D.hpp>
#include <etk/types.hpp>
#include <cmath>

Go to the source code of this file.

Classes

class  etk::Vector2D< T >
 

Namespaces

 etk
 

Typedefs

using vec2 = etk::Vector2D< float >
 
using ivec2 = etk::Vector2D< int32_t >
 
using uivec2 = etk::Vector2D< uint32_t >
 
using bvec2 = etk::Vector2D< bool >
 

Functions

vec2 vec2ClipInt32 (const vec2 &_val)
 
vec2 vec2ClipInt64 (const vec2 &_val)
 
vec2 vec2rotate (const vec2 &_obj, const vec2 &_point, float _angle)
 

Detailed Description

Author
Edouard DUPIN
Note
License: APACHE v2.0 (see license file)

Typedef Documentation

§ bvec2

using bvec2 = etk::Vector2D<bool>

wrapper on etk::Vector2D<bool> to have the same naming has OpenGL shader

§ ivec2

using ivec2 = etk::Vector2D<int32_t>

wrapper on etk::Vector2D<int32_t> to have the same naming has OpenGL shader

§ uivec2

using uivec2 = etk::Vector2D<uint32_t>

wrapper on etk::Vector2D<uint32_t> to have the same naming has OpenGL shader

§ vec2

using vec2 = etk::Vector2D<float>

wrapper on etk::Vector2D<float> to have the same naming has OpenGL shader

Function Documentation

§ vec2ClipInt32()

vec2 vec2ClipInt32 ( const vec2 _val)
inline

Limit at integer value the input vector: vec3(1.2, -2.9) ==> vec3(1.0, -2.0)

Parameters
[in]_valinput vector to limit
Returns
reduced range of vector

§ vec2ClipInt64()

vec2 vec2ClipInt64 ( const vec2 _val)
inline

Limit at integer value the input vector: vec3(1.2, -2.9) ==> vec3(1.0, -2.0)

Parameters
[in]_valinput vector to limit
Returns
reduced range of vector

§ vec2rotate()

vec2 vec2rotate ( const vec2 _obj,
const vec2 _point,
float  _angle 
)

Rotate the vector at a specific position with a specific angle.

Parameters
[in]_objVector to rotate
[in]_pointPoit to do the rotation
[in]_angleAngle in radian to rotate the vector
Returns
New vector wit totation applyed