public void TestStaticFn_Normalise_iii ()
{
Double epsilon; Maths.Epsilon(out epsilon);
for( Int32 i = 0; i < 100; ++ i)
{
Vector3 a = GetNextRandomVector3();
Double l = a.Length();
Vector3 expected = a;
Vector3 b; Vector3.Normalise(ref a, out b);
Vector3 result1 = b * l;
AssertEqualWithinReason(result1, expected);
Vector3 c = a;
// The normalise function takes both a ref and out parameter,
// need to check that if we pass in the same value as both
// parameters we get the same results.
Vector3.Normalise(ref c, out c);
Vector3 result2 = c * l;
AssertEqualWithinReason(result2, expected);
}
}