Two dimensional vector. More...
#include <vector_2d.hpp>
Public Types | |
typedef T | value_type |
The type of the values we store. | |
typedef vector_2d< value_type > | self_type |
The type of the current class. | |
typedef coordinate_2d< value_type > | super |
The type of the parent class. | |
![]() | |
typedef T | value_type |
The type of the values we store. | |
typedef coordinate_2d< value_type > | self_type |
The type of the current class. | |
Public Member Functions | |
template<class U> | |
vector_2d (const coordinate_2d< U > &that) | |
template<class U> | |
vector_2d (const coordinate_2d< U > &p1, const coordinate_2d< U > &p2) | |
vector_2d (const value_type &_x, const value_type &_y) | |
value_type | length () const |
void | normalize () |
self_type | get_orthonormal_clockwise () const |
self_type | get_orthonormal_anticlockwise () const |
value_type | dot_product (const self_type &vect) const |
![]() | |
template<typename U> | |
coordinate_2d (const coordinate_2d< U > &that) | |
coordinate_2d (const value_type &_x, const value_type &_y) | |
template<typename U> | |
coordinate_2d< U > | cast_value_type_to () const |
void | set (const value_type &_x, const value_type &_y) |
value_type | distance (const self_type &p) const |
void | rotate (const self_type ¢er, double angle) |
double | slope_angle (const self_type &to) const |
bool | operator== (const self_type &vect) const |
bool | operator!= (const self_type &vect) const |
self_type | operator+ (const self_type &vect) const |
self_type | operator- (const self_type &vect) const |
self_type & | operator+= (const self_type &vect) |
self_type & | operator-= (const self_type &vect) |
self_type | operator* (const value_type &v) const |
self_type | operator/ (const value_type &v) const |
self_type & | operator*= (const value_type &v) |
self_type & | operator/= (const value_type &v) |
Additional Inherited Members | |
![]() | |
value_type | x |
X-coordinate. | |
value_type | y |
Y-coordinate. | |
Two dimensional vector.
Definition at line 44 of file vector_2d.hpp.
typedef vector_2d<value_type> claw::math::vector_2d< T >::self_type |
The type of the current class.
Definition at line 51 of file vector_2d.hpp.
typedef coordinate_2d<value_type> claw::math::vector_2d< T >::super |
The type of the parent class.
Definition at line 54 of file vector_2d.hpp.
typedef T claw::math::vector_2d< T >::value_type |
The type of the values we store.
Definition at line 48 of file vector_2d.hpp.