30 #ifndef __CLAW_MATH_COORDINATE_TRAITS_HPP__
31 #define __CLAW_MATH_COORDINATE_TRAITS_HPP__
46 template<
typename C >
67 static value_type
get_x(
const coordinate_type& c )
76 static value_type
get_y(
const coordinate_type& c )
89 return coordinate_type(x, y);
112 static value_type
get_x(
const coordinate_type& c )
121 static value_type
get_y(
const coordinate_type& c )
134 return coordinate_type(x, y);
142 #endif // __CLAW_MATH_COORDINATE_TRAITS_HPP__
T value_type
The type of the values we store.
Coordinates in a two dimensional space.
claw::math::coordinate_2d< T > coordinate_type
The type of the coordinate.
static value_type get_x(const coordinate_type &c)
Get the component of a coordinate on the x-axis.
static coordinate_type make_coordinate(value_type x, value_type y)
Create a new coordinate from with the components sets to the provided values.
static value_type get_y(const coordinate_type &c)
Get the component of a coordinate on the y-axis.
static coordinate_type make_coordinate(value_type x, value_type y)
Create a new coordinate from with the components sets to the provided values.
Coordinates in a two dimensional space.
static value_type get_y(const coordinate_type &c)
Get the component of a coordinate on the y-axis.
coordinate_type::value_type value_type
The type of the components of the coordinate.
The coordinate traits provide an access to the members of the structures representing a coordinate in...
T value_type
The type of the values we store.
coordinate_type::value_type value_type
The type of the components of the coordinate.
value_type y
Y-coordinate.
claw::math::vector_2d< T > coordinate_type
The type of the coordinate.
This is the main namespace.
static value_type get_x(const coordinate_type &c)
Get the component of a coordinate on the x-axis.
value_type x
X-coordinate.