public void Sprite_BoundingRectangleAfterRotation_Test() { var graphicsDevice = TestHelper.CreateGraphicsDevice(); var texture = Substitute.For <Texture2D>(graphicsDevice, 50, 200); var sprite = new Sprite(texture) { Rotation = MathHelper.ToRadians(90) }; AssertExtensions.AreApproximatelyEqual(new RectangleF(-100, -25, 200, 50), sprite.BoundingRectangle); }
public void BoundaryPointAt(CircleF circle, float angle, Point2 expectedPoint) { var actualPoint = circle.BoundaryPointAt(angle); AssertExtensions.AreApproximatelyEqual(expectedPoint, actualPoint); }