KiCad PCB EDA Suite
arc_assistant.cpp File Reference

Go to the source code of this file.

Functions

double getNormDeciDegFromRad (double aRadians)
 Get deci-degrees from radians, normalised to +/- 360. More...
 

Function Documentation

◆ getNormDeciDegFromRad()

double getNormDeciDegFromRad ( double  aRadians)

Get deci-degrees from radians, normalised to +/- 360.

The normalisation is such that a negative angle will stay negative.

Definition at line 72 of file arc_assistant.cpp.

73 {
74  double degs = RAD2DECIDEG( aRadians );
75 
76  // normalise to +/- 360
77  while( degs < -3600.0 )
78  degs += 3600.0;
79 
80  while( degs > 3600.0 )
81  degs -= 3600.0;
82 
83  return degs;
84 }
double RAD2DECIDEG(double rad)
Definition: trigo.h:213

References RAD2DECIDEG().

Referenced by KIGFX::PREVIEW::ARC_ASSISTANT::ViewDraw().