public void ByPointVectorDistance_NullInput1() { var v = Vector.ByCoordinates(1, 0, 0); Assert.Throws(typeof(System.ArgumentNullException), () => ReferencePoint.ByPointVectorDistance(null, v, 0)); var p = Point.ByCoordinates(0, -10, 23.1); Assert.Throws(typeof(System.ArgumentNullException), () => ReferencePoint.ByPointVectorDistance(p, null, 0.5)); }
public void ByPointVectorDistance_ShouldPlaceReferencePointCorrectly() { var p = Point.ByCoordinates(0, -10, 23.1); var v = Vector.ByCoordinates(1, 0, 0); var d = 5; var rp = ReferencePoint.ByPointVectorDistance(p, v, d); var pt = p.Add(v.Scale(5)); rp.Point.ShouldBeApproximately(pt); InternalPosition(rp).ShouldBeApproximately(pt.InHostUnits()); }