summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
0e34953)
//! 180 degree rotation operator
/*! Returns the angle directly opposite of
the given angle, and will yield a result
//! 180 degree rotation operator
/*! Returns the angle directly opposite of
the given angle, and will yield a result
ret.v = v+PI;
return ret.mod();
}
ret.v = v+PI;
return ret.mod();
}
#ifdef ETL_WRAP_ANGLES
/*! Returns true if the shortest
#ifdef ETL_WRAP_ANGLES
/*! Returns true if the shortest
//! Angle Difference Function
/*! This function will return the
shortest physical distance between
//! Angle Difference Function
/*! This function will return the
shortest physical distance between
ret.v-=rot_floor(ret.v);
return ret;
}
ret.v-=rot_floor(ret.v);
return ret;
}
+#else // ETL_WRAP_ANGLES
+ //! Angle Difference Function
+ /*! This function will return the
+ difference between
+ two angles, just like
+ \sa angle operator-(const angle &) */
+ angle
+ dist(const angle &rhs)const
+ { return angle(*this)-=rhs; }
+
+ //! Rotation Modulus
+ /*! This function will return the
+ value of the angle */
+ angle
+ mod()const
+ {
+ angle ret(*this);
+ return ret;
+ }
+#endif // ETL_WRAP_ANGLES
//! Zero Rotation (0 degrees)
static angle
//! Zero Rotation (0 degrees)
static angle
static value_type rot_floor(value_type x)
{ return static_cast<value_type>(std::floor(x/(PI*2))*PI*2); }
static value_type rot_floor(value_type x)
{ return static_cast<value_type>(std::floor(x/(PI*2))*PI*2); }
+#endif // ETL_WRAP_ANGLES