public void OrthonormalBasisTest()
        {
            var p = new CSP();

            p.MaxSteps = 10000000;
            var v1 = new Vector3Variable("v1", p, box);
            var v2 = new Vector3Variable("v2", p, box);
            var v3 = new Vector3Variable("v3", p, box);

            v1.Magnitude.MustEqual(1);
            v2.Magnitude.MustEqual(1);
            v3.Magnitude.MustEqual(1);
            v1.MustBePerpendicular(v2);
            v2.MustBePerpendicular(v3);
            v3.MustBePerpendicular(v1);

            for (int count = 0; count < 10; count++)
            {
                p.NewSolution();
                double magnitude = Math.Sqrt(v1.X * v1.X + v1.Y * v1.Y + v1.Z * v1.Z);
                Assert.IsTrue(MathUtil.NearlyEqual(magnitude, 1), "Magnitude not unity; was: " + magnitude);
                double dotProduct = v1.X * v2.X + v1.Y * v2.Y + v1.Z * v2.Z;
                Assert.IsTrue(MathUtil.NearlyEqual(dotProduct, 0), "Dot product not zero; was: " + dotProduct);

                magnitude = Math.Sqrt(v2.X * v2.X + v2.Y * v2.Y + v2.Z * v2.Z);
                Assert.IsTrue(MathUtil.NearlyEqual(magnitude, 1), "Magnitude not unity; was: " + magnitude);
                dotProduct = v2.X * v3.X + v2.Y * v3.Y + v2.Z * v3.Z;
                Assert.IsTrue(MathUtil.NearlyEqual(dotProduct, 0), "Dot product not zero; was: " + dotProduct);

                magnitude = Math.Sqrt(v3.X * v3.X + v3.Y * v3.Y + v3.Z * v3.Z);
                Assert.IsTrue(MathUtil.NearlyEqual(magnitude, 1), "Magnitude not unity; was: " + magnitude);
                dotProduct = v3.X * v1.X + v3.Y * v1.Y + v3.Z * v1.Z;
                Assert.IsTrue(MathUtil.NearlyEqual(dotProduct, 0), "Dot product not zero; was: " + dotProduct);
            }
        }