Matrix.Rotate(Double) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
以指定角度繞著該 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;
}