共用方式為


Matrix.Rotate(Double) 方法

定義

使這個 Matrix 結構繞著原點旋轉指定的角度。

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

參數

angle
Double

旋轉的角度。

範例

下列範例示範如何旋轉 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; 
}

適用於

另請參閱