@@ -0,0 +1,728 @@
+package com.hackoeur.jglm;%0A%0Aimport org.junit.Assert;%0Aimport org.junit.Test;%0A%0Aimport com.hackoeur.jglm.support.FastMath;%0A%0A/**%0A * @author James Royalty%0A */%0Apublic class InvSqrtTest %7B%0A%09@Test%0A%09public void testFastInvSqrt() %7B%0A        final float x = 133511f;%0A        final float fastInvSqrt = FastMath.invSqrtFast(x);%0A        final float computedInvSqrt = (float) (1 / StrictMath.sqrt(x));%0A        %0A        Assert.assertEquals(fastInvSqrt, computedInvSqrt, 0.000000001f);%0A%09%7D%0A%09%0A%09@Test%0A%09public void testFastSqrt() %7B%0A%09%09final float x = 133511f;%0A        final float fastSqrt = FastMath.sqrtFast(x);%0A        final float computedSqrt = (float) StrictMath.sqrt(x);%0A        %0A        Assert.assertEquals(fastSqrt, computedSqrt, 0.0001f);%0A%09%7D%0A%7D%0A

Test case for inverse sqrt.