Vector2DTests RotationTo Method Delta Engine Documentation

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

public void RotationTo()
Examples

[Test]
public void RotationTo()
{
    var v = Vector2D.UnitX;
    var rotation = v.RotationTo(Vector2D.Zero);
    Assert.AreEqual(0, rotation);
    Assert.IsTrue(v.RotateAround(Vector2D.Zero, 90.0f).IsNearlyEqual(Vector2D.UnitY));
    rotation = Vector2D.UnitY.RotationTo(Vector2D.Zero);
    Assert.AreEqual(90, rotation);
}
See Also