private static float getLowestRoot(float a, float b, float c, float maxR) {
        float determinant = b * b - 4f * a * c;
        if (determinant < 0) {
            return Float.NaN;
        }

        float sqrtDet = FastMath.sqrt(determinant);
        float r1 = (-b - sqrtDet) / (2f * a);
        float r2 = (-b + sqrtDet) / (2f * a);

        if (r1 > r2) {
            float temp = r2;
            r2 = r1;
            r1 = temp;
        }

        if (r1 > 0 && r1 < maxR) {
            return r1;
        }

        if (r2 > 0 && r2 < maxR) {
            return r2;
        }

        return Float.NaN;
    }
No longer public.

@author Kirill Vainer
jme3-core/src/main/java/com/jme3/collision/SweepSphere.java