Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: OSGMath.h
- ===================================================================
- --- OSGMath.h (revision 91664)
- +++ OSGMath.h (working copy)
- @@ -70,6 +70,22 @@
- return a.x() * b.y() - b.x() * a.y();
- }
- +/**
- + * wrapAngle - Приводит значение угла к соответствующему значению из полуинтервала [-Pi, Pi)
- + */
- +inline double wrapAngle(double angle)
- +{
- + return angle - 2 * M_PI * floor((angle + M_PI) / (2 * M_PI));
- }
- +/**
- + * wrapAngle0_2Pi - Приводит значение угла к соответствующему значению из полуинтервала [0, 2*Pi)
- + */
- +inline double wrapAngle0_2Pi(double angle)
- +{
- + return angle - 2 * M_PI * floor(angle / (2 * M_PI));
- +}
- +
- +}
- +
- #endif
- \ No newline at end of file
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement