Namespace: DeltaEngine.ScreenSpaces
Assembly: DeltaEngine (in DeltaEngine.dll) Version: 1.1.1.0 (1.1.1)
Tests: DeltaEngine.Tests.ScreenSpaces.QuadraticScreenSpaceTests
1 unit tests call DeltaEngine.ScreenSpaces.QuadraticScreenSpace.Right
Assembly: DeltaEngine (in DeltaEngine.dll) Version: 1.1.1.0 (1.1.1)
Syntax
Property Value
Type: SingleRemarks
Examples
[Test] public void ToQuadraticWithNonSquareWindow() { window.ViewportPixelSize = new Size(100, 75); var screen = new QuadraticScreenSpace(window); Assert.AreEqual(0, screen.Left); Assert.AreEqual(0.125f, screen.Top); Assert.AreEqual(1, screen.Right); Assert.AreEqual(0.875f, screen.Bottom); Assert.AreEqual(new Rectangle(0, 0.125f, 1, 0.75f), screen.Viewport); Assert.AreEqual(new Vector2D(1f, 0.875f), screen.FromPixelSpace(new Vector2D(100, 75))); Assert.AreEqual(Vector2D.Half, screen.FromPixelSpace(new Vector2D(50, 37.5f))); Assert.IsTrue(screen.FromPixelSpace(new Size(10, 10)).IsNearlyEqual(new Size(0.1f, 0.1f))); }
See Also