code: public void rotate(double theta) {
  		// Copied from AWT API
  		final double sin = Math.sin(theta);
  		if (sin == 1.) {
  			rotate90();
  		} else if (sin == -1.) {
  			rotate270();
  		} else {
  			final double cos = Math.cos(theta);
  			if (cos == -1.) {
  				rotate180();
  			} else if (cos != 1.) {
  				double m0 = this.m00;
  				double m1 = this.m01;
  				this.m00 =  cos * m0 + sin * m1;
  				this.m01 = -sin * m0 + cos * m1;
  				m0 = this.m10;
  				m1 = this.m11;
  				this.m10 =  cos * m0 + sin * m1;
  				this.m11 = -sin * m0 + cos * m1;
  			}
  		}
  	}
docs: Rotate the object (theta).
  
  <p>This function is equivalent to:
  <pre>
  this = this *  [   cos(theta)    -sin(theta)    0   ]
  [   sin(theta)    cos(theta)     0   ]
  [   0             0              1   ]
  </pre>
  
  @param theta the rotation angle, in radians.