public void DistanceTest() { //Arrange var c = new Cube(100); var s = new Sphere(35); var sub = new Subtraction(c, s); var p = new Vec3(20, 30, 50); //Act var dist = sub.Distance(p); //Assert Assert.Equal(0, dist, 5); }
public void DistanceTestInsideCloseToCube() { //Arrange var c = new Cube(100); var s = new Sphere(35); var sub = new Subtraction(c, s); var p = new Vec3(15, 20, 45); //Act var dist = sub.Distance(p); //Assert Assert.Equal(-5, dist, 5); }