@ SuppressWarnings ( "checkstyle:magicnumber" ) public void setRotation ( double angle ) { final double [ ] tmpScale = new double [ 3 ] ; final double [ ] tmpRot = new double [ 9 ] ; getScaleRotate2x2 ( tmpScale , tmpRot ) ; final double cos = Math . cos ( angle ) ; final double sin = Math . sin ( angle ) ; // R * S this . m00 = tmpScale [ 0 ] * cos ; this . m01 = tmpScale [ 1 ] * - sin ; this . m10 = tmpScale [ 0 ] * sin ; this . m11 = tmpScale [ 1 ] * cos ; // S * R // this.m00 = tmp_scale[0] * cos; // this.m01 = tmp_scale[0] * -sin; // this.m10 = tmp_scale[1] * sin; // this.m11 = tmp_scale[1] * cos; }
Change the rotation of this matrix . Performs an SVD normalization of this matrix for determining and preserving the scaling .