Matrix.Rotate(Double) Matrix.Rotate(Double) Matrix.Rotate(Double) Matrix.Rotate(Double) Method

定義

使這個 Matrix 結構繞著原點旋轉指定的角度。Applies a rotation of the specified angle about the origin of this Matrix structure.

public:
 void Rotate(double angle);
public void Rotate (double angle);
member this.Rotate : double -> unit
Public Sub Rotate (angle As Double)

參數

angle
Double Double Double Double

旋轉的角度。The angle of rotation.

範例

下列範例顯示如何旋轉MatrixThe following example shows how to rotate a Matrix.

private Matrix rotateExample()
{
    
    // Creating a Matrix structure.
    Matrix myMatrix = new Matrix(5, 10, 15, 20, 25, 30);
    
    // Rotate the matrix 90 degrees about the origin.
    // myMatrix becomes equal to (-10, 5, -20, 15, -30, 25).
    myMatrix.Rotate(90);
    
    return myMatrix; 

}

適用於

另請參閱