71 if( aVector.
x == 0.0 && aVector.
y == 0.0 )
75 else if( aVector.
y == 0.0 )
82 else if( aVector.
x == 0.0 )
84 if( aVector.
y >= 0.0 )
89 else if( aVector.
x == aVector.
y )
91 if( aVector.
x >= 0.0 )
96 else if( aVector.
x == -aVector.
y )
98 if( aVector.
x >= 0.0 )
155 if( thisNormalized.
AsDegrees() == -90.0 )
175 if(
test.m_value == 0.0 ||
test.m_value == 180.0 )
177 else if(
test.m_value == 45.0 ||
test.m_value == 135.0 )
179 else if(
test.m_value == 225.0 ||
test.m_value == 315.0 )
181 else if(
test.m_value == 90.0 )
183 else if(
test.m_value == 270.0 )
194 if(
test.m_value == 0.0 )
196 else if(
test.m_value == 180.0 )
198 else if(
test.m_value == 90.0 ||
test.m_value == 270.0 )
200 else if(
test.m_value == 45.0 ||
test.m_value == 315.0 )
202 else if(
test.m_value == 135.0 ||
test.m_value == 225.0 )
287 double rounded =
KiROUND( angle.
AsDegrees() * pow( 10.0, digits ) ) / pow( 10.0, digits );
constexpr BOX2I KiROUND(const BOX2D &aBoxD)
EDA_ANGLE NormalizeNegative()
constexpr EDA_ANGLE(double aAngleInDegrees)
Construct an EDA_ANGLE in degrees.
int AsTenthsOfADegree() const
bool IsParallelTo(EDA_ANGLE aAngle) const
bool IsHorizontal() const
static EDA_ANGLE Arctan2(double y, double x)
EDA_ANGLE KeepUpright() const
EDA_ANGLE & operator-=(const EDA_ANGLE &aAngle)
EDA_ANGLE Round(int digits) const
EDA_ANGLE & operator+=(const EDA_ANGLE &aAngle)
EDA_ANGLE(const VECTOR2D &aVector)
EDA_ANGLE(double aValue, EDA_ANGLE_T aAngleType)
Angles can be created in degrees, 1/10ths of a degree, or radians, and read as any of the angle types...
static constexpr double DEGREES_TO_RADIANS
bool IsCardinal90() const
double m_value
value in degrees
static EDA_ANGLE Arctan(double x)
static EDA_ANGLE Arcsin(double x)
EDA_ANGLE Normalized() const
static EDA_ANGLE Arccos(double x)
EDA_ANGLE operator/(const EDA_ANGLE &aAngleA, double aOperator)
bool operator>(const EDA_ANGLE &aAngleA, const EDA_ANGLE &aAngleB)
bool operator>=(const EDA_ANGLE &aAngleA, const EDA_ANGLE &aAngleB)
EDA_ANGLE operator*(const EDA_ANGLE &aAngleA, double aOperator)
static constexpr EDA_ANGLE ANGLE_0
static constexpr EDA_ANGLE ANGLE_90
bool operator<=(const EDA_ANGLE &aAngleA, const EDA_ANGLE &aAngleB)
EDA_ANGLE operator-(const EDA_ANGLE &aAngle)
bool operator<(const EDA_ANGLE &aAngleA, const EDA_ANGLE &aAngleB)
static constexpr EDA_ANGLE ANGLE_VERTICAL
bool operator==(const EDA_ANGLE &aAngleA, const EDA_ANGLE &aAngleB)
static constexpr EDA_ANGLE ANGLE_HORIZONTAL
static constexpr EDA_ANGLE ANGLE_45
static constexpr EDA_ANGLE ANGLE_270
static constexpr EDA_ANGLE FULL_CIRCLE
static constexpr EDA_ANGLE ANGLE_360
static constexpr EDA_ANGLE ANGLE_180
EDA_ANGLE operator+(const EDA_ANGLE &aAngleA, const EDA_ANGLE &aAngleB)
static constexpr EDA_ANGLE ANGLE_135
bool operator!=(const EDA_ANGLE &aAngleA, const EDA_ANGLE &aAngleB)
std::ostream & operator<<(std::ostream &aStream, const EDA_TEXT &aText)
EDA_ANGLE abs(const EDA_ANGLE &aAngle)