public static int test_0_vector4f_rcp () { Vector4f a = new Vector4f (1, 2, 4, 8); Vector4f c = a.Reciprocal (); //Test with ranges due to the terrible precision. if (c.X < (1 - 0.01f) || c.X > (1 + 0.01f)) return 1; if (c.Y < (0.5 - 0.01f) || c.Y > (0.5 + 0.01f)) return 2; if (c.Z < (0.25 - 0.01f) || c.Z > (0.25 + 0.01f)) return 3; if (c.W < (0.125 - 0.01f) || c.W > (0.125 + 0.01f)) return 4; return 0; }