56 explicit Angle(
bool trim =
false) noexcept
66 double Rad() const noexcept
87 double Deg() const noexcept
89 return rad_ * 180.0 / CVB_M_PI;
99 rad_ = deg* CVB_M_PI / 180.0;
133 return rad_ == angle.rad_;
144 return !(*
this == angle);
155 return rad_ < angle.rad_;
166 return (*
this == angle) || (*
this < angle);
177 return (*
this != angle) && !(*
this < angle);
189 return !(*
this < angle);
201 trim_ &= angle.trim_;
214 trim_ &= angle.trim_;
251 while (rad_ > CVB_M_PI)
252 rad_ -= CVB_M_PI * 2;
253 while (rad_ <= -CVB_M_PI)
254 rad_ += CVB_M_PI * 2;
413 return cos(angle.Rad());
426 return cosh(angle.Rad());
440 return sin(angle.Rad());
453 return sinh(angle.Rad());
466 return tan(angle.Rad());
479 return tanh(angle.Rad());
492 return ((0.0 < angle.Rad()) - (angle.Rad() < 0.0));
Angle Abs(Angle angle) noexcept
Absolute value of an angle.
Definition: angle.hpp:343
double Rad() const noexcept
Get the value in radians.
Definition: angle.hpp:66
double Cos(Angle angle) noexcept
Returns the cosine of an angle.
Definition: angle.hpp:411
double Tan(Angle angle) noexcept
Returns the tangent of an angle.
Definition: angle.hpp:464
void SetDeg(double deg) noexcept
Set the value in degrees.
Definition: angle.hpp:97
Angle Atan(double d) noexcept
Returns the angle whose tangent is the specified number.
Definition: angle.hpp:382
Angle & operator+=(const Angle &angle) noexcept
Adds and assigns to this angle.
Definition: angle.hpp:198
AffineMatrix2D operator+(const AffineMatrix2D &lhs, const AffineMatrix2D &rhs) noexcept
Add two affine matrices.
Definition: affine_matrix_2d.hpp:217
void SetRad(double rad) noexcept
Set the value in radians.
Definition: angle.hpp:76
static Angle FromRadians(double rad, bool trim=false) noexcept
Create an angle in radians.
Definition: angle.hpp:44
AffineMatrix2D operator/(const AffineMatrix2D &lhs, const double &rhs)
Divide affine matrix by scalar.
Definition: affine_matrix_2d.hpp:301
Angle & operator -=(const Angle &angle) noexcept
Subtracts and assigns to this angle.
Definition: angle.hpp:211
double Sin(Angle angle) noexcept
Returns the sine of an angle.
Definition: angle.hpp:438
int Sign(Angle angle) noexcept
Returns a value indicating the sign of an Angle.
Definition: angle.hpp:490
bool operator>=(const Angle &angle) const noexcept
Compares to an other angle.
Definition: angle.hpp:187
bool operator<(const Angle &angle) const noexcept
Compares to an other angle.
Definition: angle.hpp:153
Angle Acos(double d) noexcept
Returns the angle whose cosine is the specified number.
Definition: angle.hpp:356
Root namespace for the Image Manager interface.
Definition: version.hpp:11
static Angle FromDegrees(double deg, bool trim=false) noexcept
Create an angle in degrees.
Definition: angle.hpp:30
bool operator>(const Angle &angle) const noexcept
Compares to an other angle.
Definition: angle.hpp:175
Angle & operator *=(const double &value) noexcept
Multiplies this angle with the given value.
Definition: angle.hpp:224
Angle & operator/=(const double &value) noexcept
Divides this angle by the given value.
Definition: angle.hpp:236
double Sinh(Angle angle) noexcept
Returns the hyperbolic sine of an angle.
Definition: angle.hpp:451
double Cosh(Angle angle) noexcept
Returns the hyperbolic cosine of an angle.
Definition: angle.hpp:424
AffineMatrix2D operator *(const AffineMatrix2D &lhs, const AffineMatrix2D &rhs) noexcept
Multiply two affine matrices.
Definition: affine_matrix_2d.hpp:245
Angle Asin(double d) noexcept
Returns the angle whose sine is the specified number.
Definition: angle.hpp:369
bool operator<=(const Angle &angle) const noexcept
Compares to an other angle.
Definition: angle.hpp:164
Angle(bool trim=false) noexcept
Generate a 0° angle.
Definition: angle.hpp:56
bool IsTrimmed() const noexcept
Get trimming of the angle's value to the range -PI...PI.
Definition: angle.hpp:109
void SetIsTrimmed(bool trim) noexcept
Set trimming of the value of the angle to the range -PI...PI.
Definition: angle.hpp:119
Angle Min(Angle a, Angle b) noexcept
Returns the smaller of two angles.
Definition: angle.hpp:521
double Deg() const noexcept
Get the value in degrees.
Definition: angle.hpp:87
double Tanh(Angle angle) noexcept
Returns the hyperbolic tangent of an angle.
Definition: angle.hpp:477
Angle Atan2(double y, double x) noexcept
Returns the angle whose tangent is the quotient of two specified numbers.
Definition: angle.hpp:397
bool operator!=(const Angle &angle) const noexcept
Compares to an other angle.
Definition: angle.hpp:142
AffineMatrix2D operator-(const AffineMatrix2D &lhs, const AffineMatrix2D &rhs) noexcept
Subtract two affine matrices.
Definition: affine_matrix_2d.hpp:231
Object for convenient and type - safe handling of angles.
Definition: angle.hpp:18
bool operator==(const Angle &angle) const noexcept
Compares to an other angle.
Definition: angle.hpp:131
Angle Max(Angle a, Angle b) noexcept
Returns the bigger of two angles.
Definition: angle.hpp:504