public float distance(Vector3f v) {
        /*
         * Use double-precision arithmetic to reduce the chance of overflow
         * (when distanceSquared > Float.MAX_VALUE) or underflow (when
         * distanceSquared is < Float.MIN_VALUE).
         */
        double dx = x - v.x;
        double dy = y - v.y;
        double dz = z - v.z;
        double distanceSquared = dx * dx + dy * dy + dz * dz;
        float result = (float) Math.sqrt(distanceSquared);

        return result;
    }
Returns the distance between this vector and the argument. The current
instance is unaffected.

@param v the vector to compare (not null, unaffected)
@return the Euclidean distance (not negative)
jme3-core/src/main/java/com/jme3/math/Vector3f.java