mirror of
https://github.com/AlexMacocian/MonoGame.Extended.git
synced 2026-07-26 00:45:20 +00:00
* Tiled Rework * fix failing tests * really fix failing tests
36 lines
920 B
C#
36 lines
920 B
C#
using System;
|
|
using Microsoft.Xna.Framework;
|
|
using MonoGame.Extended.Particles.Profiles;
|
|
using NUnit.Framework;
|
|
|
|
namespace MonoGame.Extended.Tests.Particles.Profiles
|
|
{
|
|
[TestFixture]
|
|
public class PointProfileTests
|
|
{
|
|
[Test]
|
|
public void ReturnsZeroOffset()
|
|
{
|
|
var subject = new PointProfile();
|
|
|
|
Vector2 offset, heading;
|
|
subject.GetOffsetAndHeading(out offset, out heading);
|
|
|
|
Assert.AreEqual(0f, offset.X);
|
|
Assert.AreEqual(0f, offset.Y);
|
|
}
|
|
|
|
[Test]
|
|
public void ReturnsHeadingAsUnitVector()
|
|
{
|
|
var subject = new PointProfile();
|
|
|
|
Vector2 offset, heading;
|
|
subject.GetOffsetAndHeading(out offset, out heading);
|
|
|
|
var length = Math.Sqrt(heading.X * heading.X + heading.Y * heading.Y);
|
|
Assert.AreEqual(1f, length, 0.000001);
|
|
}
|
|
|
|
}
|
|
} |