@Test
    public void testNegate() {
        final Vector3f target = new Vector3f(-1.0f, 2.0f, -0.0f);
        final Vector3f retval = target.negate();

        assertNotNull(retval);
        assertEquals(1.0f, retval.x, 0.0f);
        assertEquals(-2.0f, retval.y, 0.0f);
        assertEquals(0.0f, retval.z, 0.0f);

        final Vector3f retval2 = retval.negate();

        assertEquals(retval2, target);
    }
Verify that distance() doesn't always overflow when distanceSquared >
Float.MAX_VALUE .
jme3-core/src/test/java/com/jme3/math/Vector3fTest.java