Class Cartesian#

Class Documentation#

class Cartesian#

The Cartesian class.

Cartesian represents a tupel from the R² as cartesian coordinate.

Public Functions

inline Cartesian(double x = 0, double y = 0)#

Cartesian.

Creates a cartesian coordinate from given x and y value.

Parameters:
  • x – the x value

  • y – the y value

inline bool operator==(const Cartesian &rhs) const#

operator ==

Equal to operator checking for equality of x and y.

Parameters:

rhs – the other Cartesian

Returns:

if equal or not

inline const double &x() const#

x

Access function for this Cartesian’s x value as readonly.

Returns:

a constant reference to this Cartesians x value

inline double &x()#

x

Access function for this Cartesian’s x value.

Returns:

a reference to this Cartesians x value

inline const double &y() const#

y

Access function for this Cartesian’s y value as readonly.

Returns:

a constant reference to this Cartesians y value

inline double &y()#

y

Access function for this Cartesian’s y value.

Returns:

a reference to this Cartesians y value

Public Static Functions

static inline Cartesian interpolate(const Cartesian &p1, const Cartesian &p2, double p)#

interpolate

Returns an Cartesian whose radius and Angle are (1-p) percent of p1’s and p percent of p2’s radius and Angle. To be consistent, p should be in [0,1].

Parameters:
Returns:

the interpolated Cartesian

static inline Cartesian center(const Cartesian &p1, const Cartesian &p2)#

center

Returns a Cartesian centered between two given Cartesian.

Parameters:
Returns:

the centered Cartesian