claw  1.9.0
Public Types | Public Member Functions | Public Attributes | List of all members
claw::math::coordinate_2d< T > Class Template Reference

Coordinates in a two dimensional space. More...

#include <coordinate_2d.hpp>

Inheritance diagram for claw::math::coordinate_2d< T >:
Inheritance graph
[legend]
Collaboration diagram for claw::math::coordinate_2d< T >:
Collaboration graph
[legend]

Public Types

typedef T value_type
 The type of the values we store.
 
typedef coordinate_2d< value_typeself_type
 The type of the current class.
 

Public Member Functions

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 &center, 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_typeoperator+= (const self_type &vect)
 
self_typeoperator-= (const self_type &vect)
 
self_type operator* (const value_type &v) const
 
self_type operator/ (const value_type &v) const
 
self_typeoperator*= (const value_type &v)
 
self_typeoperator/= (const value_type &v)
 

Public Attributes

value_type x
 X-coordinate.
 
value_type y
 Y-coordinate.
 

Detailed Description

template<typename T>
class claw::math::coordinate_2d< T >

Coordinates in a two dimensional space.

Author
Julien Jorge

Definition at line 42 of file coordinate_2d.hpp.


The documentation for this class was generated from the following file: