@Test
    public void testMaxLocal3() {
        final Vector3f target = new Vector3f(0.0f, Float.NEGATIVE_INFINITY, -1.32931e+36f);

        final Vector3f retval = target.maxLocal(new Vector3f(-0.0f, Float.POSITIVE_INFINITY, 1.32923e+36f));

        assertEquals(target, retval);

        assertNotNull(retval);
        assertEquals(0.0f, retval.x, 0.0f);
        assertEquals(Float.POSITIVE_INFINITY, retval.y, 0.0f);
        assertEquals(1.32923e+36f, retval.z, 0.0f);
    }
Verify that distance() doesn't always overflow when distanceSquared >
Float.MAX_VALUE .
jme3-core/src/test/java/com/jme3/math/Vector3fTest.java