Class degrees

Inheritance Relationships

Base Type

Class Documentation

class degrees : public rcppsw::er::stringizable

Used to store an angle value in degrees (duh).

Public Functions

explicit degrees(const radians &r)

Initialize from the specified value in RADIANS.

inline explicit degrees(double value)

Initialize from the specified value in DEGREES.

degrees(void) = default
inline bool operator!=(const degrees &other) const
inline double operator()(void) const
inline degrees operator*(double value) const
inline degrees &operator*=(double value)
inline degrees operator+(const degrees &other) const
inline degrees &operator+(void)
inline degrees &operator+=(const degrees &other)
inline degrees &operator+=(double value)
inline degrees operator-(const degrees &other) const
inline degrees operator-(void) const
inline degrees &operator-=(const degrees &other)
inline degrees &operator-=(double value)
inline double operator/(const degrees &other) const
inline degrees operator/(double value) const
inline degrees &operator/=(double value)
inline bool operator<(const degrees &other) const
inline bool operator<=(const degrees &other) const
inline bool operator==(const degrees &other) const
inline bool operator>(const degrees &other) const
inline bool operator>=(const degrees &other) const
inline void set(double value)

Set the current value in degrees.

Parameters:

value – In DEGREES.

inline degrees &signed_normalize(void)

Normalizes the value in the range [-180, 180].

virtual std::string to_str(void) const override

Return a string representation of the degrees object of the form ‘deg(XX) -> rad(YY)’.

inline degrees &unsigned_normalize(void)

Normalizes the value in the range [0, 360].

inline double v(void) const

Get the raw value of the angle.

Public Static Attributes

static const double kDEGREES_TO_RADIANS

Friends

inline friend std::istream &operator>>(std::istream &is, degrees &d)