Size AspectRatio Property Delta Engine Documentation

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

public float AspectRatio { get; }

Property Value

Type: Single
Remarks

Tests: DeltaEngine.Tests.Datatypes.SizeTests
Examples

1 unit tests call DeltaEngine.Datatypes.Size.AspectRatio
[Test]
public void AspectRatio()
{
    var portrait = new Size(0.5f, 1.0f);
    Size square = Size.One;
    var landscape = new Size(1.0f, 0.5f);
    Assert.AreEqual(0.5f, portrait.AspectRatio);
    Assert.AreEqual(1.0f, square.AspectRatio);
    Assert.AreEqual(2.0f, landscape.AspectRatio);
}
See Also