Class CoordinateConverter#
Defined in File Coordinates.h
Class Documentation#
-
class CoordinateConverter#
Converter between polar and cartesian coordinates.
CoordinateConverter simulates a fixed width/height coordinate system. It can convert polar and cartesian coordinates.
Public Functions
-
inline CoordinateConverter(size_t width, size_t height)#
a converter for coordinates
Creates a new coordinate system with given width and height. The center coordinate is at (width / 2, height / 2).
- Parameters:
width – the coordinate system width
height – the coordinate system system
-
inline double get_center_x() const#
Returns the x value of the center coordinate.
- Returns:
the center’s x value
-
inline double get_center_y() const#
Returns the y value of the center coordinate.
- Returns:
the center’s y value
-
inline CoordinateConverter(size_t width, size_t height)#