148 int* major,
int* minor)
const;
236 gap.xcoord =
xcoord - pt.xcoord;
237 gap.ycoord =
ycoord - pt.ycoord;
252 uint8_t to_direction()
const;
259 static uint8_t binary_angle_plus_pi(
double angle);
262 static double angle_from_direction(uint8_t
direction);
268 const FCOORD& dir_vector)
const;
275 return xcoord == other.xcoord &&
ycoord == other.ycoord;
279 return xcoord != other.xcoord ||
ycoord != other.ycoord;
311 void unrotate(
const FCOORD &vec);
538 auto tmp =
static_cast<int16_t
>(std::floor(
xcoord * vec.
x() -
558 result.xcoord = -src.ycoord;
559 result.ycoord = src.xcoord;
576 result.xcoord = -src.xcoord;
577 result.ycoord = -src.ycoord;
594 sum.xcoord = op1.xcoord + op2.xcoord;
595 sum.ycoord = op1.ycoord + op2.ycoord;
610 op1.xcoord += op2.xcoord;
611 op1.ycoord += op2.ycoord;
628 sum.xcoord = op1.xcoord - op2.xcoord;
629 sum.ycoord = op1.ycoord - op2.ycoord;
644 op1.xcoord -= op2.xcoord;
645 op1.ycoord -= op2.ycoord;
660 return op1.xcoord * op2.xcoord + op1.ycoord * op2.ycoord;
673 return op1.xcoord * op2.ycoord - op1.ycoord * op2.xcoord;
688 result.xcoord = op1.xcoord * scale;
689 result.ycoord = op1.ycoord * scale;
700 result.xcoord = op1.xcoord * scale;
701 result.ycoord = op1.ycoord * scale;
734 result.xcoord = op1.xcoord / scale;
735 result.ycoord = op1.ycoord / scale;
void rotate(const FCOORD &vec)
friend ICOORD operator+(const ICOORD &, const ICOORD &)
add
float angle() const
find angle
float pt_to_pt_sqdist(const FCOORD &pt) const
sq dist between pts
void set_x(int16_t xin)
rewrite function
void set_x(float xin)
rewrite function
float angle() const
find angle
float length() const
find length
float pt_to_pt_sqdist(const ICOORD &pt) const
sq dist between pts
ICOORD()
empty constructor
void set_y(float yin)
rewrite function
void set_with_shrink(int x, int y)
Set from the given x,y, shrinking the vector to fit if needed.
float pt_to_pt_dist(const FCOORD &pt) const
Distance between pts.
bool DeSerialize(bool swap, FILE *fp)
int16_t y() const
access_function
void set_y(int16_t yin)
rewrite function
void setup_render(ICOORD *major_step, ICOORD *minor_step, int *major, int *minor) const
float sqlength() const
find sq length
friend ICOORD & operator/=(ICOORD &, int16_t)
divide
friend ICOORD & operator+=(ICOORD &, const ICOORD &)
add
void rotate(const FCOORD vec)
float sqlength() const
find sq length
friend int32_t operator*(const ICOORD &, const ICOORD &)
cross product
bool Serialize(FILE *fp) const
int16_t x() const
access function
friend ICOORD & operator*=(ICOORD &, int16_t)
multiply
bool operator!=(const ICOORD &other) const
test inequality
int direction(EDGEPT *point)
friend ICOORD operator!(const ICOORD &)
rotate 90 deg anti
float pt_to_pt_dist(const ICOORD &pt) const
Distance between pts.
friend ICOORD operator-(const ICOORD &)
unary minus
#define ELISTIZEH(CLASSNAME)
float length() const
find length
ICOORDELT(int16_t xin, int16_t yin)
bool operator==(const ICOORD &other) const
test equality
friend ICOORD & operator-=(ICOORD &, const ICOORD &)
subtract
ICOORD(int16_t xin, int16_t yin)
~ICOORD()=default
destructor
void unrotate(const FCOORD &vec)
static ICOORDELT * deep_copy(const ICOORDELT *src)
FCOORD(float xvalue, float yvalue)
friend int32_t operator%(const ICOORD &, const ICOORD &)
scalar product
friend ICOORD operator/(const ICOORD &, int16_t)
divide
ICOORDELT(ICOORD icoord)
constructor from ICOORD