OGLplus (0.52.0) a C++ wrapper for OpenGL

Class implementing planar angle-related functionality. More...

#include </home/chochlik/devel/oglplus/include/oglplus/math/angle.hpp>

Public Member Functions

 Angle (void)
 Constructs a zero angle.
 
 Angle (const Angle &)=default
 Angle is copy constructible.
 
 Angle (Angle &&)=default
 Angle is move constructible.
 
template<typename U >
 Angle (const Angle< U > &other)
 Copy construction from angles using different underlying type.
 
T Value (void) const
 Returns the value of the angle in radians.
 
T ValueInDegrees (void) const
 Returns the value of the angle in degrees.
 
T ValueInRightAngles (void) const
 Returns the value of the angle in number of right angles.
 
T ValueInFullCircles (void) const
 Returns the value of the angle in number of full circles.
 
Angle Negated (void) const
 Negation.
 
Angleoperator+= (const Angle &b)
 Addition operator.
 
Angleoperator-= (const Angle &b)
 Subtraction operator.
 
Angleoperator*= (T mult)
 Multiplication by constant operator.
 
Angleoperator/= (T div)
 Division by constant operator.
 
T Sin (void) const
 Returns the sine of the angle.
 
T Cos (void) const
 Returns the cosine of the angle.
 
T Tan (void) const
 Returns the tangent of the angle.
 

Static Public Member Functions

static Angle Radians (T val_rad)
 Constructs a new angle from value in radians.
 
static Angle Degrees (T val_deg)
 Constructs a new angle from value in degrees.
 
static Angle ArcSin (T x)
 Constructs a new angle using arc sine.
 
static Angle ArcCos (T x)
 Constructs a new angle using arc cosine.
 

Friends

bool operator== (const Angle &a, const Angle &b)
 Equality comparison.
 
bool operator!= (const Angle &a, const Angle &b)
 Inequality comparison.
 
bool operator< (const Angle &a, const Angle &b)
 Less than comparison.
 
bool operator> (const Angle &a, const Angle &b)
 Greater than comparison.
 
bool operator<= (const Angle &a, const Angle &b)
 Less than/equal comparison.
 
bool operator>= (const Angle &a, const Angle &b)
 Greater than/equal comparison.
 
Angle Negate (const Angle &angle)
 Negation.
 
Angle operator- (const Angle &angle)
 Negation operator.
 
Angle Add (const Angle &a, const Angle &b)
 Addition.
 
Angle operator+ (const Angle &a, const Angle &b)
 Addition operator.
 
Angle Subtract (const Angle &a, const Angle &b)
 Subtraction.
 
Angle operator- (const Angle &a, const Angle &b)
 Subtraction operator.
 
Angle Multiply (const Angle &a, T mult)
 Multiplication by constant.
 
Angle operator* (const Angle &a, T mult)
 Multiplication by constant operator.
 
Angle operator* (T mult, const Angle &a)
 Multiplication by constant operator.
 
Angle Divide (const Angle &a, T div)
 Division by constant.
 
Angle operator/ (const Angle &a, T div)
 Division by constant operator.
 
T Ratio (const Angle &a, const Angle &b)
 Angle ratio.
 
T operator/ (const Angle &a, const Angle &b)
 Ratio operator.
 
T Sin (const Angle &a)
 Returns the sine of the angle.
 
T Cos (const Angle &a)
 Returns the cosine of the angle.
 
T Tan (const Angle &a)
 Returns the tangent of the angle.
 

Detailed Description

template<typename T>
class oglplus::Angle< T >

Class implementing planar angle-related functionality.

Angle is a lightweight class allowing more natural construction and usage of planar angle values. The storage requirements are the same as for the template parameter type T, but the Angle template gives the T type special meaning and implements a set of angle-related member and friend functions. There are also several associated free functions for creating new instances of Angle.

See Also
oglplus::Radians
oglplus::Degrees
oglplus::FullCircles
oglplus::RightAngles
oglplus::ArcSin
oglplus::ArcCos
oglplus::ArcTan
Examples:
standalone/001_shape2dot.cpp.

The documentation for this class was generated from the following files:
  • /home/chochlik/devel/oglplus/include/oglplus/fwd.hpp
  • /home/chochlik/devel/oglplus/include/oglplus/math/angle.hpp

Copyright © 2010-2014 Matúš Chochlík, University of Žilina, Žilina, Slovakia.
<matus.chochlik -at- fri.uniza.sk>
<chochlik -at -gmail.com>
Documentation generated on Mon Sep 22 2014 by Doxygen (version 1.8.6).