ETL  0.04.19
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Attributes | Friends | List of all members
fastangle Class Reference

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

#include <_fastangle.h>

Inheritance diagram for fastangle:
fastangle::cos fastangle::degrees fastangle::radians fastangle::rotations fastangle::sin fastangle::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...

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 fastangleoperator+= (const fastangle &rhs)
const fastangleoperator-= (const fastangle &rhs)
const fastangleoperator*= (const unit &rhs)
const fastangleoperator/= (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

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.

Definition at line 63 of file _fastangle.h.

Definition at line 279 of file _fastangle.h.

Definition at line 280 of file _fastangle.h.

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::tan, fastangle::cos, fastangle::sin, fastangle::rotations, fastangle::degrees, and fastangle::radians.

Definition at line 219 of file _fastangle.h.

References floor(), and v.

fastangle fastangle::mod ( ) const
inline

Rotation Modulus.

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

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

Definition at line 231 of file _fastangle.h.

References floor(), and v.

static fastangle fastangle::zero ( )
inlinestatic

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

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