Ported from the playground branch. Various documentation and optimization.

This commit is contained in:
bubnikv 2016-09-13 13:30:00 +02:00
parent a5b7f14dfa
commit 620c6c7378
38 changed files with 586 additions and 92 deletions

View file

@ -44,6 +44,8 @@ class Point
void translate(const Vector &vector);
void rotate(double angle);
void rotate(double angle, const Point &center);
Point rotated(double angle) const { Point res(*this); res.rotate(angle); return res; }
Point rotated(double angle, const Point &center) const { Point res(*this); res.rotate(angle, center); return res; }
bool coincides_with(const Point &point) const { return this->x == point.x && this->y == point.y; }
bool coincides_with_epsilon(const Point &point) const;
int nearest_point_index(const Points &points) const;