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

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

References RAD2DECIDEG().

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