public static int test_0_simple_packed_invsqrt () { Vector4f a = new Vector4f (16, 4, 100, 25); //this function has VERY low precision a = a.InvSqrt (); if (a.X < (1/4f - 0.01f) || a.X > (1/4f + 0.01f)) return 1; if (a.Y < (1/2f - 0.01f) || a.Y > (1/2f + 0.01f)) return 2; if (a.Z < (1/10f - 0.01f) || a.Z > (1/10f + 0.01f)) return 3; if (a.W < (1/5f - 0.01f) || a.W > (1/5f + 0.01f)) return 4; return 0; }