public void rotate ( double angle ) { double s = Math . sin ( angle ) ; double c = Math . cos ( angle ) ; double temp1 = m00 ; double temp2 = m01 ; m00 = c * temp1 + s * temp2 ; m01 = - s * temp1 + c * temp2 ; temp1 = m10 ; temp2 = m11 ; m10 = c * temp1 + s * temp2 ; m11 = - s * temp1 + c * temp2 ; }
Implementation roughly based on AffineTransform .