@Test
    public void testGenerateComplementBasis() {
        final Vector3f u = new Vector3f();
        final Vector3f v = new Vector3f();
        final Vector3f w = new Vector3f(-7.0f, Float.NaN, Float.NaN);

        Vector3f.generateComplementBasis(u, v, w);

        assertNotNull(v);
        assertEquals(Float.NaN, v.x, 0.0f);
        assertEquals(Float.NaN, v.y, 0.0f);
        assertEquals(Float.NaN, v.z, 0.0f);
        assertNotNull(u);
        assertEquals(0.0f, u.x, 0.0f);
        assertEquals(Float.NaN, u.y, 0.0f);
        assertEquals(Float.NaN, u.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