X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=ETL%2Ftrunk%2FETL%2F_angle.h;h=eb7710b2137be280ea485d9acc8a0a8bc44950fd;hb=84a3dfe5cc1fafe126a639db7d233ac3a93883f1;hp=78e91baba524b8645472becf07647d9032466b22;hpb=6be6303c608af39940d01b411021e81c7fff63d2;p=synfig.git diff --git a/ETL/trunk/ETL/_angle.h b/ETL/trunk/ETL/_angle.h index 78e91ba..eb7710b 100644 --- a/ETL/trunk/ETL/_angle.h +++ b/ETL/trunk/ETL/_angle.h @@ -130,6 +130,7 @@ public: return ret.mod(); } +#ifdef ETL_WRAP_ANGLES /*! Returns true if the shortest angle from the left-hand to the right-hand side is counter-clockwise */ @@ -175,6 +176,47 @@ public: bool operator!=(const angle &rhs)const { return std::abs(dist(rhs).v)>ANGLE_EPSILON; } +#else // ETL_WRAP_ANGLES + /*! Returns true if the left-hand + side is less than the + right-hand side */ + bool + operator<(const angle &rhs)const + { return v < rhs.v; } + + /*! Returns true if the left-hand + side is greater than the + right-hand side */ + bool + operator>(const angle &rhs)const + { return v > rhs.v; } + + /*! Returns true if the left-hand + side is less or equal to the + right-hand side */ + bool + operator<=(const angle &rhs)const + { return v <= rhs.v; } + + /*! Returns true if the left-hand + side is greater than or equal + to the right-hand side */ + bool + operator>=(const angle &rhs)const + { return v >= rhs.v; } + + /*! Returns true if the angles + are the same, or close */ + bool + operator==(const angle &rhs)const + { return std::abs(v - rhs.v)ANGLE_EPSILON; } +#endif // ETL_WRAP_ANGLES //! Absolute Angle Function /*! This function will return the