60 std::swap( coords.
x, coords.
y );
69 const int stagger_idx = ( ( sr ? coords.
y : coords.
x ) % stagger );
74 point += stagger_delta * copysign( stagger_idx,
m_stagger ) / stagger;
92 std::cout <<
"Subtracting " <<
VECTOR2I( arrayExtentX, arrayExtentY ) / 2 << std::endl;
93 point -=
VECTOR2I( arrayExtentX, arrayExtentY ) / 2;
144 return { new_pos - aPos, angle };
wxString GetItemNumber(int n) const
Get the position number (name) for the n'th axis point.
static constexpr EDA_ANGLE ANGLE_0
EDA_ANGLE abs(const EDA_ANGLE &aAngle)
long m_nPts
number of point in the array
EDA_ANGLE m_angle
angle between points, or 0 for each point separated by this value (decideg)
wxString GetItemNumber(int n) const override
Get the position number (name) for the n'th array point.
int GetArraySize() const override
The number of points in this array.
TRANSFORM GetTransform(int aN, const VECTOR2I &aPos) const override
Get the transform of the n-th point in the array.
bool m_horizontalThenVertical
VECTOR2I getGridCoords(int n) const
bool m_reverseNumberingAlternate
wxString GetItemNumber(int n) const override
Get the position number (name) for the n'th array point.
VECTOR2I gtItemPosRelativeToItem0(int n) const
int GetArraySize() const override
The number of points in this array.
TRANSFORM GetTransform(int aN, const VECTOR2I &aPos) const override
Get the transform of the n-th point in the array.
void RotatePoint(int *pX, int *pY, const EDA_ANGLE &aAngle)
Calculate the new point of coord coord pX, pY, for a rotation center 0, 0.
VECTOR2< int32_t > VECTOR2I