rotateAround method

Point rotateAround(
  1. Point center,
  2. double angle
)

Returns a rotated version around a center point.

Implementation

Point rotateAround(Point center, double angle) {
  final translated = this - center;
  final rotated = translated.rotate(angle);
  return rotated + center;
}