Vector2D Length Property Delta Engine Documentation

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

public float Length { get; }

Property Value

Type: Single
Remarks

Tests: DeltaEngine.Tests.Datatypes.Vector2DTests
Examples

2 unit tests call DeltaEngine.Datatypes.Vector2D.Length
[Test]
public void Length()
{
    Assert.AreEqual(5, new Vector2D(-3, 4).Length);
    Assert.AreEqual(13, new Vector2D(5, -12).Length);
}
[Test]
public void LengthSquared()
{
    Assert.AreEqual(5, new Vector2D(1, -2).LengthSquared);
    Assert.AreEqual(8.5f, new Vector2D(-1.5f, 2.5f).LengthSquared);
}
See Also