Vector2D GetRotation Method Delta Engine Documentation

Namespace: DeltaEngine.Datatypes
Assembly: DeltaEngine (in DeltaEngine.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public float GetRotation()

Return Value

Type: Single
Remarks

Tests: DeltaEngine.Tests.Datatypes.Vector2DTests
Examples

1 unit tests call DeltaEngine.Datatypes.Vector2D.GetRotation
[Test]
public void GetRotation()
{
    Assert.AreEqual(0, new Vector2D(1, 0).GetRotation());
    Assert.AreEqual(90, new Vector2D(0, 1).GetRotation());
    Assert.AreEqual(180, new Vector2D(-1, 0).GetRotation());
    Assert.AreEqual(-90, new Vector2D(0, -1).GetRotation());
    Assert.AreEqual(45, new Vector2D(1, 1).GetRotation());
}
See Also