Camera2DScreenSpaceTests IfCameraNotAdjustedItBehavesIdenticallyToQuadraticScreenSpace Method Delta Engine Documentation

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

public void IfCameraNotAdjustedItBehavesIdenticallyToQuadraticScreenSpace()
Examples

[Test]
public void IfCameraNotAdjustedItBehavesIdenticallyToQuadraticScreenSpace()
{
    var q = new QuadraticScreenSpace(window);
    var c = new Camera2DScreenSpace(window);
    Assert.IsTrue(
        c.FromPixelSpace(new Vector2D(1, 2)).IsNearlyEqual(q.FromPixelSpace(new Vector2D(1, 2))));
    Assert.IsTrue(
        c.FromPixelSpace(new Size(-3, 4)).IsNearlyEqual(q.FromPixelSpace(new Size(-3, 4))));
    Assert.IsTrue(
        c.ToPixelSpace(new Vector2D(2, 6)).IsNearlyEqual(q.ToPixelSpace(new Vector2D(2, 6))));
    Assert.IsTrue(c.ToPixelSpace(new Size(-2, 0)).IsNearlyEqual(q.ToPixelSpace(new Size(-2, 0))));
}
See Also