Namespace: DeltaEngine.Tests.Datatypes
Assembly: DeltaEngine.Tests (in DeltaEngine.Tests.dll) Version: 1.1.1.0 (1.1.1)
Assembly: DeltaEngine.Tests (in DeltaEngine.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax
Examples
[Test] public void ReflectIfHittingBorderAtCorners() { var direction = Vector2D.One; var borders = Rectangle.One; var bottomRightArea = new Rectangle(Vector2D.One, Size.Half); direction.ReflectIfHittingBorder(bottomRightArea, borders); Assert.AreEqual(-Vector2D.One, direction); var topLeftArea = new Rectangle(Vector2D.Zero, Size.Zero); direction.ReflectIfHittingBorder(topLeftArea, borders); Assert.AreEqual(Vector2D.One, direction); }
See Also