rotateByPiMultiple static method

Geometry rotateByPiMultiple(
  1. Geometry g,
  2. double multipleOfPi
)

Rotate a geometry by an multiple of Pi radians

Implementation

static Geometry rotateByPiMultiple(
    Geometry g,
    // Angle (multiple of Pi)
    double multipleOfPi) {
  Coordinate centre = envelopeCentre(g)!;
  AffineTransformation trans = AffineTransformation.rotationInstanceTXY(
      multipleOfPi * math.pi, centre.x, centre.y);
  return trans.transformGeom(g);
}