#include <angle.h>
Public Types | |
enum | { regular, two_pi } |
Public Methods | |
unit_circle_angle () | |
unit_circle_angle (const unit_circle_angle<arithmetic>& uca) | |
unit_circle_angle (bool angle_two_pi) | |
arithmetic | sin () const |
arithmetic | cos () const |
void | bisect () |
Computes half angle. | |
bool | operator== (const unit_circle_angle<arithmetic>& B) const |
unit_circle_angle<arithmetic>& | operator= (const unit_circle_angle<arithmetic>& uca) |
int | quadrant () const |
Determines the quadrant the angle is contained in on the unit circle; return vale 0 for NE, 1 for NW, 2 for SW, 3 for SE. | |
unit_circle_angle<arithmetic>& | operator-= (const unit_circle_angle<arithmetic>& B) |
unit_circle_angle<arithmetic>& | operator+= (const unit_circle_angle<arithmetic>& B) |
unit_circle_angle<arithmetic> | operator+ (const unit_circle_angle<arithmetic>& B) const |
unit_circle_angle<arithmetic> | operator- (const unit_circle_angle<arithmetic>& B) const |
unit_circle_angle (const arithmetic& sin1, const arithmetic& cos1) | |
bool | operator< (const unit_circle_angle<arithmetic>& A) const |
bool | operator<= (const unit_circle_angle<arithmetic>& A) const |
bool | between (const unit_circle_angle<arithmetic>& lower, const unit_circle_angle<arithmetic>& upper) const |
double | rad () const |
Computes the radian angle between 0 and 2*Pi. More... | |
Public Attributes | |
arithmetic | s |
arithmetic | c |
enum rescue::unit_circle_angle:: { ... } | type |
All functionality is implemented without evaluating trigonometric functions or inverse trigonometric functions.
The template parameter arithmetic
determines the type to be used for all computations. This need to supply the operations +,-,*,/,sqrt()
and sign()
. Thus, double
, float
and Leda's real
can be used.
The function rad()
converts the point on the unit circle to a value between o and 2*pi. This is sometimes helpful for debugging; in order to switch this method off, use the preprocessor-directive
#define
RESCUE__IGNORE_RAD
|
Computes the radian angle between 0 and 2*Pi.
Since this requires trigonometric functions and is thus not comatible with all arithmetic data types, it can be deactivated by defining |