rotateByPiMultipleAroundPoint static method
Rotate a geometry around a point by an multiple of Pi radians
Implementation
static Geometry rotateByPiMultipleAroundPoint(
Geometry g,
Geometry? pt,
/// Angle (multiple of Pi)
double multipleOfPi) {
Coordinate loc;
if (pt == null) {
loc = new Coordinate(0, 0);
} else {
loc = pt.getCoordinates()[0];
}
AffineTransformation trans = AffineTransformation.rotationInstanceTXY(
multipleOfPi * math.pi, loc.x, loc.y);
return trans.transformGeom(g);
}