rotationInstanceSinCos static method

AffineTransformation rotationInstanceSinCos(
  1. double sinTheta,
  2. double cosTheta
)

Creates a transformation for a rotation 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 @return a transformation for the rotation

Implementation

static AffineTransformation rotationInstanceSinCos(
    double sinTheta, double cosTheta) {
  AffineTransformation trans = new AffineTransformation();
  trans.setToRotationSinCos(sinTheta, cosTheta);
  return trans;
}