KrisLibrary
1.0.0
|
A contiguous range of angles. More...
#include <angle.h>
Public Member Functions | |
void | setPoint (Real a) |
void | setRange (Real a, Real b) |
sets the range from a CCW to b | |
void | setMinRange (Real a, Real b) |
sets the smallest range containing both a and b | |
void | setEmpty () |
void | setCircle () |
void | setCompliment (const AngleInterval &i) |
void | setIntersection (const AngleInterval &i1, const AngleInterval &i2) |
void | setUnion (const AngleInterval &i1, const AngleInterval &i2) |
void | setCosGreater (Real y) |
set the range [a,b] of x s.t. cos(x) >= y | |
void | setSinGreater (Real y) |
set the range [a,b] of x s.t. sin(x) >= y | |
void | setCosLess (Real y) |
set the range [a,b] of x s.t. cos(x) <= y | |
void | setSinLess (Real y) |
set the range [a,b] of x s.t. sin(x) <= y | |
void | inplaceCompliment () |
void | inplaceIntersection (const AngleInterval &i) |
void | inplaceUnion (const AngleInterval &i) |
void | inplaceShift (Real theta) |
bool | contains (Real a) const |
bool | contains (const AngleInterval &i) const |
bool | intersects (const AngleInterval &i) const |
void | normalize () |
Real | clamp (Real a) const |
bool | isEmpty () const |
bool | isFull () const |
bool | isPoint () const |
Public Attributes | |
Real | c |
Real | d |
A contiguous range of angles.
Represents an interval [a,b] by an offset (c) and a range (d). If a is clockwise from b, c=a, d=b-a (angular difference) otherwise, c=b, d=a-b. null set is represented as c=infty.
void Math::AngleInterval::setIntersection | ( | const AngleInterval & | i1, |
const AngleInterval & | i2 | ||
) |
Returns the smallest contiguous interval that contains the intersection (because it may have several components)
References Math::AngleCCWDiff().
void Math::AngleInterval::setUnion | ( | const AngleInterval & | i1, |
const AngleInterval & | i2 | ||
) |
Returns the smallest contiguous interval that contains the union (because it may have several components)
References Math::AngleCCWDiff(), and Math::AngleNormalize().