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 >:

## Public Types

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<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_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)

## 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.

## Member Typedef Documentation

## self_type

template<typename T>

typedef coordinate_2d<value_type> claw::math::coordinate_2d< T >::self_type

The type of the current class.

Definition at line 49 of file coordinate_2d.hpp.

## value_type

template<typename T>

typedef T claw::math::coordinate_2d< T >::value_type

The type of the values we store.

Definition at line 46 of file coordinate_2d.hpp.

## Member Data Documentation

## x

template<typename T>

value_type claw::math::coordinate_2d< T >::x

X-coordinate.

Definition at line 82 of file coordinate_2d.hpp.

Referenced by claw::graphic::image::fill(), claw::math::coordinate_traits< claw::math::coordinate_2d< T > >::get_x(), claw::math::coordinate_traits< claw::math::vector_2d< T > >::get_x(), claw::graphic::image::merge(), claw::graphic::image::partial_copy(), and claw::graphic::xbm::writer::save().

## y

template<typename T>

value_type claw::math::coordinate_2d< T >::y

Y-coordinate.

Definition at line 85 of file coordinate_2d.hpp.

Referenced by claw::graphic::image::fill(), claw::math::coordinate_traits< claw::math::coordinate_2d< T > >::get_y(), claw::math::coordinate_traits< claw::math::vector_2d< T > >::get_y(), claw::graphic::image::merge(), claw::graphic::image::partial_copy(), and claw::graphic::xbm::writer::save().

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

- coordinate_2d.hpp