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 69 of file arc_assistant.cpp.

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

References RAD2DECIDEG().

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