feisty meow concerns codebase  2.140
geometric::angle< contents > Class Template Reference

#include <angle.h>

Inheritance diagram for geometric::angle< contents >:
Collaboration diagram for geometric::angle< contents >:

Public Member Functions

 DEFINE_CLASS_NAME ("angle")
 
 angle (contents inital_rotation=0, angular_units unit=RADIANS)
 constructs a new angle with "initial_rotation" in the "unit". More...
 
void set (contents a, angular_units unit)
 sets the angle to a new rotation "a" in the "unit". More...
 
contents get (angular_units unit) const
 retrieves the current angular measure. More...
 
angle operator- (void) const
 returns the negation of this angle. More...
 
angle operator+ (const angle &to_add) const
 
angle operator- (const angle &to_subtract) const
 
angle operator* (contents to_multiply) const
 
angle operator/ (contents to_divide) const
 
angleoperator+= (const angle &to_add)
 
angleoperator-= (const angle &to_subtract)
 
angleoperator*= (contents to_multiply)
 
angleoperator/= (contents to_divide)
 
contents sine () const
 returns the sin function of this angle. More...
 
contents cosine () const
 returns the cos function of this angle. More...
 
contents tangent () const
 returns the tan function of this angle. More...
 
virtual int packed_size () const
 Estimates the space needed for the packed structure. More...
 
virtual void pack (basis::byte_array &packed_form) const
 packs the angle for shipping in bytes. More...
 
virtual bool unpack (basis::byte_array &packed_form)
 unpacks the angle from the "packed_form". More...
 

Static Public Member Functions

static angle arctangent (contents opposite, contents adjacent, basis::outcome &retval)
 returns the atan of the angle. More...
 
static angle arccosine (contents adjacent, contents hypotenuse, basis::outcome &retval)
 returns the acos of the angle. More...
 
static angle arcsine (contents opposite, contents hypotenuse, basis::outcome &retval)
 returns the asin of the angle. More...
 

Detailed Description

template<class contents>
class geometric::angle< contents >

Definition at line 33 of file angle.h.

Constructor & Destructor Documentation

◆ angle()

template<class contents >
geometric::angle< contents >::angle ( contents  inital_rotation = 0,
angular_units  unit = RADIANS 
)

constructs a new angle with "initial_rotation" in the "unit".

Definition at line 109 of file angle.h.

Member Function Documentation

◆ arccosine()

template<class contents >
angle< contents > geometric::angle< contents >::arccosine ( contents  adjacent,
contents  hypotenuse,
basis::outcome retval 
)
static

returns the acos of the angle.

Definition at line 206 of file angle.h.

References bounds_return, and geometric::RADIANS.

◆ arcsine()

template<class contents >
angle< contents > geometric::angle< contents >::arcsine ( contents  opposite,
contents  hypotenuse,
basis::outcome retval 
)
static

returns the asin of the angle.

Definition at line 217 of file angle.h.

References bounds_return, and geometric::RADIANS.

◆ arctangent()

template<class contents >
angle< contents > geometric::angle< contents >::arctangent ( contents  opposite,
contents  adjacent,
basis::outcome retval 
)
static

returns the atan of the angle.

the outcome will be set to OKAY if the function operated successfully. otherwise it will be set to BAD_INPUT.

Definition at line 228 of file angle.h.

References geometric::RADIANS.

◆ cosine()

template<class contents >
contents geometric::angle< contents >::cosine

returns the cos function of this angle.

Definition at line 155 of file angle.h.

Referenced by geometric::point< numeric_type >::rotate(), and geometric::point< numeric_type >::set().

◆ DEFINE_CLASS_NAME()

template<class contents >
geometric::angle< contents >::DEFINE_CLASS_NAME ( "angle< contents >"  )

◆ get()

template<class contents >
contents geometric::angle< contents >::get ( angular_units  unit) const

retrieves the current angular measure.

Definition at line 202 of file angle.h.

Referenced by geometric::circle::location(), and geometric::ellipse::location().

◆ operator*()

template<class contents >
angle< contents > geometric::angle< contents >::operator* ( contents  to_multiply) const

Definition at line 124 of file angle.h.

◆ operator*=()

template<class contents >
angle< contents > & geometric::angle< contents >::operator*= ( contents  to_multiply)

Definition at line 144 of file angle.h.

References eml_to_txt::f.

◆ operator+()

template<class contents >
angle< contents > geometric::angle< contents >::operator+ ( const angle< contents > &  to_add) const

Definition at line 116 of file angle.h.

◆ operator+=()

template<class contents >
angle< contents > & geometric::angle< contents >::operator+= ( const angle< contents > &  to_add)

Definition at line 136 of file angle.h.

◆ operator-() [1/2]

template<class contents >
angle< contents > geometric::angle< contents >::operator- ( const angle< contents > &  to_subtract) const

Definition at line 120 of file angle.h.

◆ operator-() [2/2]

template<class contents >
angle< contents > geometric::angle< contents >::operator- ( void  ) const

returns the negation of this angle.

Definition at line 112 of file angle.h.

◆ operator-=()

template<class contents >
angle< contents > & geometric::angle< contents >::operator-= ( const angle< contents > &  to_subtract)

Definition at line 140 of file angle.h.

◆ operator/()

template<class contents >
angle< contents > geometric::angle< contents >::operator/ ( contents  to_divide) const

Definition at line 132 of file angle.h.

◆ operator/=()

template<class contents >
angle< contents > & geometric::angle< contents >::operator/= ( contents  to_divide)

Definition at line 148 of file angle.h.

References eml_to_txt::f.

◆ pack()

template<class contents >
void geometric::angle< contents >::pack ( basis::byte_array packed_form) const
virtual

packs the angle for shipping in bytes.

Implements basis::packable.

Definition at line 170 of file angle.h.

References structures::attach().

◆ packed_size()

template<class contents >
int geometric::angle< contents >::packed_size ( ) const
virtual

Estimates the space needed for the packed structure.

Implements basis::packable.

Definition at line 161 of file angle.h.

References basis::array< contents >::length(), and structures::pack().

◆ set()

template<class contents >
void geometric::angle< contents >::set ( contents  a,
angular_units  unit 
)

sets the angle to a new rotation "a" in the "unit".

Definition at line 198 of file angle.h.

◆ sine()

template<class contents >
contents geometric::angle< contents >::sine

returns the sin function of this angle.

Definition at line 152 of file angle.h.

Referenced by geometric::point< numeric_type >::rotate(), and geometric::point< numeric_type >::set().

◆ tangent()

template<class contents >
contents geometric::angle< contents >::tangent

returns the tan function of this angle.

Definition at line 158 of file angle.h.

Referenced by geometric::ellipse::location().

◆ unpack()

template<class contents >
bool geometric::angle< contents >::unpack ( basis::byte_array packed_form)
virtual

unpacks the angle from the "packed_form".

Implements basis::packable.

Definition at line 174 of file angle.h.

References structures::detach().


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