mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-09-16 07:12:27 +02:00
RobustToolbox projects should be named Robust.* This PR changes the RobustToolbox projects from SS14.* to Robust.* Updates SS14.* prefixes/namespaces to Robust.* Updates SpaceStation14.sln to RobustToolbox.sln Updates MSBUILD/SS14.* to MSBUILD/Robust.* Updates CSProject and MSBuild references for the above Updates git_helper.py Removes Runserver and Runclient as they are unusable
26 lines
724 B
C#
26 lines
724 B
C#
using NUnit.Framework;
|
|
using Robust.Shared.Maths;
|
|
|
|
namespace Robust.UnitTesting.Shared.Maths
|
|
{
|
|
[TestFixture]
|
|
[Parallelizable(ParallelScope.All | ParallelScope.Fixtures)]
|
|
[TestOf(typeof(Ray))]
|
|
class Ray_Test
|
|
{
|
|
[Test]
|
|
public void RayIntersectsBoxTest()
|
|
{
|
|
var box = new Box2(new Vector2(5, 5), new Vector2(10, -5));
|
|
var ray = new Ray(new Vector2(0, 1), Vector2.UnitX, 1);
|
|
|
|
var result = ray.Intersects(box, out var dist, out var hitPos);
|
|
|
|
Assert.That(result, Is.True);
|
|
Assert.That(dist, Is.EqualTo(5));
|
|
Assert.That(hitPos.X, Is.EqualTo(5));
|
|
Assert.That(hitPos.Y, Is.EqualTo(1));
|
|
}
|
|
}
|
|
}
|