ReSCue - Retrieval System for Curves
Main Page   Class Hierarchy   Compound List   File List   Compound Members  

rescue::unit_circle_angle Template Class Reference

This class allows to handle angles represented by points on the unit circle. More...

#include <angle.h>

List of all members.

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


Detailed Description

template<class arithmetic> template class rescue::unit_circle_angle

This class allows to handle angles represented by points on the unit circle.

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


Member Function Documentation

template<classarithmetic>
double rescue::unit_circle_angle<arithmetic>::rad ( ) const [inline]
 

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 RESCUE__IGNORE_RAD .


The documentation for this class was generated from the following file:
ReSCue - Retrieval System for Curves
Universität Bonn, Institut für Informatik III, 2001