Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

AngPi Class Reference

Circular arithmetic on angles between 0 and pi (180 degrees). More...

#include <Measures.h>


Detailed Description

Circular arithmetic on angles between 0 and pi (180 degrees).

Definition at line 45 of file Measures.h.

List of all members.

Public Member Functions

 AngPi (void)
 AngPi (orientation_t const &v)
 constructor, value defaults to 0
AngPi operator+ (AngPi const &arg) const
AngPi operator- (AngPi const &arg) const
AngPi operator* (orientation_t const &arg) const
AngPi operator/ (orientation_t const &arg) const
AngPioperator= (AngPi const &arg)
AngPioperator= (orientation_t const &arg)
AngPioperator+= (orientation_t const &arg)
AngPioperator-= (orientation_t const &arg)
AngPioperator*= (orientation_t const &arg)
AngPioperator/= (orientation_t const &arg)
 operator orientation_t () const

Protected Member Functions

void normalize ()
 conversion operator for going back to the primitive type

Protected Attributes

orientation_t value
 holds the angle, should be kept normalized at all times

Friends

AngPi angdist (AngPi const &arg1, AngPi const &arg2)
 Angular distance: value is between 0 and pi/2.

Constructor & Destructor Documentation

AngPi::AngPi ( void   ) 

Definition at line 48 of file Measures.h.

Referenced by operator*(), operator+(), operator-(), and operator/().

AngPi::AngPi ( orientation_t const &  v  ) 

constructor, value defaults to 0

conversion operator allows implicit construction from primitive

Definition at line 49 of file Measures.h.


Member Function Documentation

void AngPi::normalize (  )  [protected]

conversion operator for going back to the primitive type

modifies value to put it back in range

Definition at line 22 of file Measures.cc.

Referenced by AngPi(), operator*=(), operator+=(), operator-=(), operator/=(), and operator=().

AngPi::operator orientation_t (  )  const

Definition at line 63 of file Measures.h.

AngPi AngPi::operator* ( orientation_t const &  arg  )  const

Definition at line 53 of file Measures.h.

AngPi& AngPi::operator*= ( orientation_t const &  arg  ) 

Definition at line 60 of file Measures.h.

AngPi AngPi::operator+ ( AngPi const &  arg  )  const

Definition at line 51 of file Measures.h.

AngPi& AngPi::operator+= ( orientation_t const &  arg  ) 

Definition at line 58 of file Measures.h.

AngPi AngPi::operator- ( AngPi const &  arg  )  const

Definition at line 52 of file Measures.h.

AngPi& AngPi::operator-= ( orientation_t const &  arg  ) 

Definition at line 59 of file Measures.h.

AngPi AngPi::operator/ ( orientation_t const &  arg  )  const

Definition at line 54 of file Measures.h.

AngPi& AngPi::operator/= ( orientation_t const &  arg  ) 

Definition at line 61 of file Measures.h.

AngPi& AngPi::operator= ( orientation_t const &  arg  ) 

Definition at line 57 of file Measures.h.

AngPi& AngPi::operator= ( AngPi const &  arg  ) 

Definition at line 56 of file Measures.h.


Friends And Related Function Documentation

AngPi angdist ( AngPi const &  arg1,
AngPi const &  arg2 
) [friend]

Angular distance: value is between 0 and pi/2.

Definition at line 41 of file Measures.cc.


Member Data Documentation

holds the angle, should be kept normalized at all times

Definition at line 67 of file Measures.h.

Referenced by angdist(), normalize(), operator orientation_t(), operator*(), operator*=(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/=(), and operator=().


The documentation for this class was generated from the following files:

Tekkotsu v5.1CVS
Generated Mon May 9 04:59:04 2016 by Doxygen 1.6.3