Added optimized methods for point and polyline rotation.

Existing methods for rotation were optimized by calculating the sin/cos values once only.
Added an operator- for points.
This commit is contained in:
bubnikv 2016-04-10 19:06:46 +02:00
parent c8ff517389
commit 7d54e28e30
4 changed files with 54 additions and 4 deletions

View file

@ -22,6 +22,7 @@ class MultiPoint
void scale(double factor);
void translate(double x, double y);
void translate(const Point &vector);
void rotate(double angle);
void rotate(double angle, const Point &center);
void reverse();
Point first_point() const;