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; 
}

适用于

另请参阅