|
Thunderbots Project
|
#include <angle_segment.h>
Public Member Functions | |
| AngleSegment (Angle angle_top, Angle angle_bottom) | |
| const Angle & | getAngleTop () const |
| void | setAngleTop (const Angle &angle_top) |
| const Angle & | getAngleBottom () const |
| void | setAngleBottom (const Angle &angle_bottom) |
| double | getDeltaInDegrees () const |
| bool | operator== (const AngleSegment &other) const |
| bool | operator!= (const AngleSegment &other) const |
| bool | operator< (const AngleSegment &other) const |
| bool | operator> (const AngleSegment &other) const |
NOTE: We use the top angle for all operators. These custom operators allow us to make sorting for calcbestshot more performant.
|
explicit |
Constructs an AngleSegment represented by a top angle and bottom angle
| angle_top | the most positive angle |
| angle_bottom | the most negative angle |
| const Angle & getAngleBottom | ( | ) | const |
Gets the bottom (most negative) angle of the angle segment
| const Angle & getAngleTop | ( | ) | const |
Gets the top (most positive) angle of the angle segment
| double getDeltaInDegrees | ( | ) | const |
Gets the abs delta angle in degrees between the two angles that describe this angle segment
| bool operator!= | ( | const AngleSegment & | other | ) | const |
Compares another AngleSegment's top angle
| other | the other AngleSegment to compare to |
| bool operator< | ( | const AngleSegment & | other | ) | const |
Compares another AngleSegment's top angle
| other | the other AngleSegment to compare to |
| bool operator== | ( | const AngleSegment & | other | ) | const |
Compares another AngleSegment's top angle
| other | the other AngleSegment to compare to |
| bool operator> | ( | const AngleSegment & | other | ) | const |
Compares another AngleSegment's top angle
| other | the other AngleSegment to compare to |
| void setAngleBottom | ( | const Angle & | angle_bottom | ) |
Sets the bottom (most negative) angle of the angle segment
| angle_bottom | the bottom angle of the angle segment |
| void setAngleTop | ( | const Angle & | angle_top | ) |
Sets the top (most positive) angle of the angle segment
| angle_top | the top angle of the angle segment |