ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki

# Math::Angle Class Reference

`#include <angle.h>`

List of all members.

## Public Member Functions

Angle (float degrees=0)
Construct an angle object.
Angle (const Angle &a)
Construct and angle object, copying an already existing one.
Anglenormalize (float low)
Normalize the angle in a [x; x + 360] range and return the object.
AngleclampDegrees (float mag)
Clamp the angle to range [-mag, mag].
AngleclampDegrees (float min, float max)
Clamp the angle to range [-min, max].
void setDegrees (float degrees)
float getDegrees () const
float getDegrees (float low) const
Returns the degrees of the angle, in the defined range.
Returns the radianss of the angle, in the defined range.
float getCosine () const
float getSine () const
float getTangent () const
Angleoperator= (const Angle &a)
Angleoperator= (float degrees)
Angleoperator+= (const Angle &a)
Angleoperator+= (float degrees)
Angleoperator-= (const Angle &a)
Angleoperator-= (float degrees)

## Static Public Member Functions

Build an angle object.
static Angle arcCosine (float x)
static Angle arcSine (float x)
static Angle arcTangent (float x)
static Angle arcTangent2 (float y, float x)

float _degrees

## Detailed Description

Definition at line 34 of file angle.h.

## Constructor & Destructor Documentation

 Math::Angle::Angle ( float degrees = `0` )

Construct an angle object.

Parameters:
 degrees The angle, in degrees. Default is 0.

Definition at line 30 of file angle.cpp.

 Math::Angle::Angle ( const Angle & a )

Construct and angle object, copying an already existing one.

Parameters:
 a The angle to copy.

Definition at line 34 of file angle.cpp.

## Member Function Documentation

 Angle Math::Angle::arcCosine ( float x ) ` [static]`

Definition at line 150 of file angle.cpp.

 Angle Math::Angle::arcSine ( float x ) ` [static]`

Definition at line 156 of file angle.cpp.

 Angle Math::Angle::arcTangent ( float x ) ` [static]`

Definition at line 162 of file angle.cpp.

 Angle Math::Angle::arcTangent2 ( float y, float x ) ` [static]`

Definition at line 168 of file angle.cpp.

 Angle & Math::Angle::clampDegrees ( float mag )

Clamp the angle to range [-mag, mag].

Parameters:
 mag The maximum distance from 0, in degrees.

Definition at line 45 of file angle.cpp.

 Angle & Math::Angle::clampDegrees ( float min, float max )

Clamp the angle to range [-min, max].

Parameters:
 min The lower bound of the range, in degrees. max The upper bound of the range, in degrees.

Definition at line 55 of file angle.cpp.

 Angle Math::Angle::fromRadians ( float radians ) ` [static]`

Build an angle object.

Parameters:

Definition at line 146 of file angle.cpp.

 float Math::Angle::getCosine ( ) const

Definition at line 98 of file angle.cpp.

 float Math::Angle::getDegrees ( float low ) const

Returns the degrees of the angle, in the defined range.

Parameters:
 low The lower bound of the range, in degrees.

Definition at line 81 of file angle.cpp.

 float Math::Angle::getDegrees ( ) const

Definition at line 73 of file angle.cpp.

 float Math::Angle::getRadians ( float low ) const

Returns the radianss of the angle, in the defined range.

Parameters:
 low The lower bound of the range, in degrees.

Definition at line 93 of file angle.cpp.

Definition at line 77 of file angle.cpp.

 float Math::Angle::getSine ( ) const

Definition at line 102 of file angle.cpp.

 float Math::Angle::getTangent ( ) const

Definition at line 106 of file angle.cpp.

 Angle & Math::Angle::normalize ( float low )

Normalize the angle in a [x; x + 360] range and return the object.

Parameters:
 low The lower bound of the range, in degrees.

Definition at line 39 of file angle.cpp.

 Angle & Math::Angle::operator+= ( float degrees )

Definition at line 128 of file angle.cpp.

 Angle & Math::Angle::operator+= ( const Angle & a )

Definition at line 122 of file angle.cpp.

 Angle & Math::Angle::operator-= ( float degrees )

Definition at line 140 of file angle.cpp.

 Angle & Math::Angle::operator-= ( const Angle & a )

Definition at line 134 of file angle.cpp.

 Angle & Math::Angle::operator= ( const Angle & a )

Definition at line 110 of file angle.cpp.

 Angle & Math::Angle::operator= ( float degrees )

Definition at line 116 of file angle.cpp.

 void Math::Angle::setDegrees ( float degrees )

Definition at line 65 of file angle.cpp.

Definition at line 69 of file angle.cpp.

## Member Data Documentation

 float Math::Angle::_degrees` [private]`

Definition at line 114 of file angle.h.

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

Generated on Sat Sep 19 2020 05:05:49 for ResidualVM by  1.7.1