rotationInstanceSinCosXY static method

AffineTransformation rotationInstanceSinCosXY(
  1. double sinTheta,
  2. double cosTheta,
  3. double x,
  4. double y,
)

Creates a transformation for a rotation about the point (x,y) by an angle theta, specified by the sine and cosine of the angle. This allows providing exact values for sin(theta) and cos(theta) for the common case of rotations of multiples of quarter-circles.

@param sinTheta the sine of the rotation angle @param cosTheta the cosine of the rotation angle @param x the x-ordinate of the rotation point @param y the y-ordinate of the rotation point @return a transformation for the rotation

Implementation

static AffineTransformation rotationInstanceSinCosXY(
    double sinTheta, double cosTheta, double x, double y) {
  AffineTransformation trans = new AffineTransformation();
  trans.setToRotationSinCosXY(sinTheta, cosTheta, x, y);
  return trans;
}