# fastangle Class Reference

Optimized abstraction of the concept of an angle. More...

`#include <_fastangle.h>`

Inheritance diagram for fastangle:

List of all members.

## Public Types

typedef double | value_type
typedef radians | rad
typedef degrees | deg
typedef rotations | rot

## Public Member Functions

fastangle | operator+ (const fastangle &rhs) const
| Stored in rotations.
fastangle | operator- (const fastangle &rhs) const
| fastangle Subtraction Operator
fastangle | operator* (const unit &rhs) const
| fastangle Scalar Multiplication Operator
fastangle | operator/ (const unit &rhs) const
const fastangle & | operator+= (const fastangle &rhs)
const fastangle & | operator-= (const fastangle &rhs)
const fastangle & | operator*= (const unit &rhs)
const fastangle & | operator/= (const unit &rhs)
fastangle | operator- () const
| fastangle Negation
fastangle | operator~ () const
| 180 degree rotation operator
bool | operator< (const fastangle &rhs) const
bool | operator> (const fastangle &rhs) const
bool | operator<= (const fastangle &rhs) const
bool | operator>= (const fastangle &rhs) const
bool | operator== (const fastangle &rhs) const
bool | operator!= (const fastangle &rhs) const
fastangle | dist (const fastangle &rhs) const
| fastangle Difference Function
fastangle | mod () const
| Rotation Modulus.
bool | operator! () const

## Static Public Member Functions

static fastangle | zero ()

## Protected Types

typedef fixed_base < ETL_FIXED_TYPE, ETL_FASTANGLE_LOOKUP_RES > | unit

## Protected Attributes

unit | v

## Friends

class | radians
class | degrees
class | rotations
class | sin
class | cos
class | tan

## Classes

class | cos
| fastangle representation as a cosine function More...
class | degrees
| fastangle representation in degrees More...
class | radians
| fastangle representation in radians More...
class | rotations
| fastangle representation in rotations More...
class | sin
| fastangle representation as a sine function More...
class | tan
| fastangle representation as a tangent function More...

## Detailed Description

Optimized abstraction of the concept of an angle.

========================================================================

A more detailed description needs to be written.

Definition at line 57 of file _fastangle.h.

## Member Typedef Documentation

typedef double fastangle::value_type

Definition at line 60 of file _fastangle.h.

typedef fixed_base<ETL_FIXED_TYPE,ETL_FASTANGLE_LOOKUP_RES> fastangle::unit `[protected]`

Definition at line 63 of file _fastangle.h.

typedef radians fastangle::rad

Definition at line 279 of file _fastangle.h.

typedef degrees fastangle::deg

Definition at line 280 of file _fastangle.h.

typedef rotations fastangle::rot

Definition at line 281 of file _fastangle.h.

## Member Function Documentation

fastangle fastangle::operator+ | ( | const fastangle & | rhs | ) | const`[inline]`

Stored in rotations.

fastangle Addition Operator

Definition at line 75 of file _fastangle.h.

References v.

fastangle fastangle::operator- | ( | const fastangle & | rhs | ) | const`[inline]`

fastangle Subtraction Operator

See also:
  fastangle dist(const fastangle &)

Definition at line 85 of file _fastangle.h.

References v.

fastangle fastangle::operator* | ( | const unit & | rhs | ) | const`[inline]`

fastangle Scalar Multiplication Operator

This operator will multiply the given fastangle by the given scalar value.

Definition at line 96 of file _fastangle.h.

References v.

fastangle fastangle::operator/ | ( | const unit & | rhs | ) | const`[inline]`

Definition at line 104 of file _fastangle.h.

References v.

const fastangle& fastangle::operator+= | ( | const fastangle & | rhs | ) | `[inline]`

Definition at line 112 of file _fastangle.h.

References v.

const fastangle& fastangle::operator-= | ( | const fastangle & | rhs | ) | `[inline]`

Definition at line 119 of file _fastangle.h.

References v.

const fastangle& fastangle::operator*= | ( | const unit & | rhs | ) | `[inline]`

Definition at line 126 of file _fastangle.h.

References v.

const fastangle& fastangle::operator/= | ( | const unit & | rhs | ) | `[inline]`

Definition at line 133 of file _fastangle.h.

References v.

fastangle fastangle::operator- | ( |  | ) | const`[inline]`

fastangle Negation

Definition at line 141 of file _fastangle.h.

References v.

fastangle fastangle::operator~ | ( |  | ) | const`[inline]`

180 degree rotation operator

Returns the fastangle directly opposite of the given fastangle, and will yield a result between 0 and 2PI

Definition at line 153 of file _fastangle.h.

References f, floor(), and v.

bool fastangle::operator< | ( | const fastangle & | rhs | ) | const`[inline]`

Returns true if the shortest fastangle between the left-hand and right-hand side is clockwise

Definition at line 164 of file _fastangle.h.

References v.

bool fastangle::operator> | ( | const fastangle & | rhs | ) | const`[inline]`

Returns true if the shortest fastangle between the left-hand and right-hand side is counter-clockwise

Definition at line 172 of file _fastangle.h.

References v.

bool fastangle::operator<= | ( | const fastangle & | rhs | ) | const`[inline]`

Returns true if the shortest fastangle between the left-hand and right-hand side is clockwise, or if the angles are refer to the same point on the unit circle.

Definition at line 182 of file _fastangle.h.

References v.

bool fastangle::operator>= | ( | const fastangle & | rhs | ) | const`[inline]`

Returns true if the shortest fastangle between the left-hand and right-hand side is counter-clockwise, or if the angles are refer to the same point on the unit circle.

Definition at line 192 of file _fastangle.h.

References v.

bool fastangle::operator== | ( | const fastangle & | rhs | ) | const`[inline]`

Returns true if the angles are refer to the same point on the unit circle.

Definition at line 200 of file _fastangle.h.

References v.

bool fastangle::operator!= | ( | const fastangle & | rhs | ) | const`[inline]`

Returns false if the angles are refer to the same point on the unit circle.

Definition at line 208 of file _fastangle.h.

References v.

fastangle fastangle::dist | ( | const fastangle & | rhs | ) | const`[inline]`

fastangle Difference Function

This function will return the shortest physical distance between two angles, from -PI/2 to PI/2

Warning:
  Not yet tested

See also:
  fastangle operator-(const fastangle &)

Reimplemented in fastangle::radians, fastangle::degrees, fastangle::rotations, fastangle::sin, fastangle::cos, and fastangle::tan.

Definition at line 219 of file _fastangle.h.

References floor(), and v.

Referenced by fastangle::tan::dist(), fastangle::cos::dist(), fastangle::sin::dist(), fastangle::rotations::dist(), fastangle::degrees::dist(), and fastangle::radians::dist().

fastangle fastangle::mod | ( |  | ) | const`[inline]`

Rotation Modulus.

This function will return the value of the fastangle between 0 and 2PI

Reimplemented in fastangle::radians, fastangle::degrees, fastangle::rotations, fastangle::sin, fastangle::cos, and fastangle::tan.

Definition at line 231 of file _fastangle.h.

References floor(), and v.

Referenced by fastangle::tan::mod(), fastangle::cos::mod(), fastangle::sin::mod(), fastangle::rotations::mod(), fastangle::degrees::mod(), and fastangle::radians::mod().

static fastangle fastangle::zero | ( |  | ) | `[inline, static]`

Definition at line 239 of file _fastangle.h.

References v.

bool fastangle::operator! | ( |  | ) | const`[inline]`

Definition at line 246 of file _fastangle.h.

References v.

## Friends And Related Function Documentation

friend class radians `[friend]`

Definition at line 262 of file _fastangle.h.

friend class degrees `[friend]`

Definition at line 269 of file _fastangle.h.

friend class rotations `[friend]`

Definition at line 270 of file _fastangle.h.

friend class sin `[friend]`

Definition at line 271 of file _fastangle.h.

friend class cos `[friend]`

Definition at line 272 of file _fastangle.h.

friend class tan `[friend]`

Definition at line 273 of file _fastangle.h.

## Member Data Documentation

unit fastangle::v `[protected]`

Definition at line 65 of file _fastangle.h.

Referenced by fastangle::cos::cos(), fastangle::degrees::degrees(), dist(), fastangle::tan::get(), fastangle::cos::get(), fastangle::sin::get(), fastangle::rotations::get(), fastangle::degrees::get(), fastangle::radians::get(), mod(), operator!(), operator!=(), operator*(), operator*=(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/=(), operator<(), operator<=(), operator==(), operator>(), operator>=(), operator~(), fastangle::radians::radians(), fastangle::rotations::rotations(), fastangle::sin::sin(), fastangle::tan::tan(), and zero().

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

- _fastangle.h