Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages

# RS::AngleRadians< T > Class Template Reference

Template class for representing angles in radians. More...

Collaboration diagram for RS::AngleRadians< T >:

[legend]
List of all members.

## Public Member Functions

Default constructor, the value of the angle is T().

Construct and AngleDegrees with the value ang.

Copy constructor.

AngleRadians (const AngleDegrees< T > &)
Conversion constructor that converts an AngleDegrees to an AngleRadians.

getDeg () const
Get the angle in degrees.

Assignment operators.
AngleRadians< T > & operator= (const AngleDegrees< T > &)
AngleRadians< T > & operator= (const T &)
Arithmetic operators.
I don't think I have to define all the operators for T too, since the automatic type conversion will convert T to AngleRadians<T>.

But the efficiency is a little bit better.

AngleRadians< T > operator- () const
AngleRadians< T > operator+ (const T &) const
AngleRadians< T > operator- (const T &) const
AngleRadians< T > operator * (const T &) const
AngleRadians< T > operator/ (const T &) const
AngleRadians< T > & operator+= (const T &)
AngleRadians< T > & operator-= (const T &)
AngleRadians< T > & operator *= (const T &)
AngleRadians< T > & operator/= (const T &)
Increment and decrement operators.
AngleRadians< T > & operator++ ()
AngleRadians< T > & operator-- ()
bool operator! () const
bool operator== (const AngleRadians< T > &) const
bool operator== (const T &) const
bool operator!= (const AngleRadians< T > &) const
bool operator!= (const T &) const
bool operator> (const AngleRadians< T > &) const
bool operator> (const T &) const
bool operator>= (const AngleRadians< T > &) const
bool operator>= (const T &) const
bool operator< (const AngleRadians< T > &) const
bool operator< (const T &) const
bool operator<= (const AngleRadians< T > &) const
bool operator<= (const T &) const

## Protected Member Functions

void normalize ()
Function that normalizes an angle to the interval [-PI, PI].

## Protected Attributes

a
The actual representation of the angle value.

## Detailed Description

### template<typename T> class RS::AngleRadians< T >

Template class for representing angles in radians.

The template argument only defines what type the angles should be represented by. The only demands on the template argument T is that the trigonometric and arithmetic functions are defined on it.

Todo:
Make a single template of both AngleDegrees and AngleRadians with a second parameter which defines what the standard representation is (radians or degrees).
Unit:
Library
Revision
1.8
Author
s02davro
Date
2002/08/31 14:50:27

Definition at line 99 of file AngleRadians.h.

The documentation for this class was generated from the following file:
Generated on Mon Aug 29 08:22:13 2011 for RoboSoc by 1.3-rc3