34 return KiROUND( aAngle / M_PI_4 ) * M_PI_4;
165 ccwAngle += 2 * M_PI;
167 double cwAngle = std::abs( ccwAngle - 2 * M_PI );
169 if( std::min( ccwAngle, cwAngle ) >=
M_PI_2 )
VECTOR2I GetEndRadiusEnd() const
Get the radius of the arc (valid if step >= SET_START)
bool setEnd(const VECTOR2I &aCursor)
VECTOR2I GetStartRadiusEnd() const
Get the coordinates of the arc end point.
double GetStartAngle() const
Get the angle of the vector leading to the end point (valid if step >= SET_ANGLE)
double GetSubtended() const
void setGeometryChanged()
< Mark the geometry as changed for clients to notice
Waiting to lock in the arc start point.
VECTOR2I GetOrigin() const
< Get the center point of the arc (valid when state > SET_ORIGIN)
Waiting to lock in origin point.
double GetRadius() const
Get the angle of the vector leading to the start point (valid if step >= SET_START)
double Angle() const
Compute the angle of the vector.
VECTOR2< T > Rotate(double aAngle) const
Rotate the vector by a given angle.
bool setStart(const VECTOR2I &aEnd)
Set a point of the second radius line (collinear with arc end)
Waiting to lock in the arc end point.
bool acceptPoint(const VECTOR2I &aPt) override
The arc to be clockwise from start.
void ToggleClockwise()
Set angle snapping (for the next point)
void SetClockwise(bool aCw)
Reverse the current are direction.
static DIRECTION_45::AngleType angle(const VECTOR2I &a, const VECTOR2I &b)
constexpr ret_type KiROUND(fp_type v)
Round a floating point number to an integer using "round halfway cases away from zero".
bool setOrigin(const VECTOR2I &aOrigin)
< Set the center point of the arc
T EuclideanNorm() const
Compute the Euclidean norm of the vector, which is defined as sqrt(x ** 2 + y ** 2).
static double snapAngle(double aAngle)
< Snap an angle to the nearest 45 degrees