VisiLibity v1 Source Code 1.0
Public Member Functions | Private Attributes | List of all members
VisiLibity::Angle Class Reference

angle in radians represented by a value in the interval [0,2*M_PI] More...

#include <visilibity.hpp>

Public Member Functions

 Angle ()
 default More...
 
 Angle (double data_temp)
 construct from real value, mod into interval [0, 2*M_PI)
 
 Angle (double rise_temp, double run_temp)
 construct using 4 quadrant inverse tangent into [0, 2*M_PI), where 0 points along the x-axis
 
double get () const
 get radians
 
void set (double data_temp)
 set angle, mod into interval [0, 2*PI)
 
void set_to_2pi ()
 set angle data to 2*M_PI More...
 
void randomize ()
 set to new random angle in [0, 2*M_PI)
 

Private Attributes

double angle_radians_
 

Detailed Description

angle in radians represented by a value in the interval [0,2*M_PI]

Remarks
the intended interpretation is that angles 0 and 2*M_PI correspond to the positive x-axis of the coordinate system

Constructor & Destructor Documentation

◆ Angle()

VisiLibity::Angle::Angle ( )
inline

default

Remarks
data defaults to NAN so that checking whether the data are numbers can be used as a precondition in functions

Member Function Documentation

◆ set_to_2pi()

void VisiLibity::Angle::set_to_2pi ( )
inline

set angle data to 2*M_PI

Remarks
sometimes it is necessary to set the angle value to 2*M_PI instead of 0, so that the lex. inequalities behave appropriately during a radial line sweep

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