Exemplo n.º 1
0
        public void EdgeLength_from_Vector3_has_equal_component_values()
        {
            var vector     = new Vector3(10f, 20f, 30f);
            var edgeLength = EdgeLength.FromUnityVector(vector);

            Assert.AreApproximatelyEqual((float)edgeLength.X, vector.x);
            Assert.AreApproximatelyEqual((float)edgeLength.Y, vector.y);
            Assert.AreApproximatelyEqual((float)edgeLength.Z, vector.z);
        }
 /// <summary>
 ///     Extension method for converting a Unity Vector to an EdgeLength.
 /// </summary>
 public static EdgeLength ToEdgeLength(this Vector3 unityVector)
 {
     return(EdgeLength.FromUnityVector(unityVector));
 }