rotate method
Implementation
Point rotate(double degrees, {Point center = Point.zero}) {
final radians = degrees * math.pi / 180;
final off = this - center;
final cos = math.cos(radians);
final sin = math.sin(radians);
return Point(off.x * cos - off.y * sin, off.x * sin + off.y * cos) + center;
}