class LuceneDocumentAdapterUtils {

    public static double determineBoots(final double rank,
                                        final double origin,
                                        final double step,
                                        final double min,
                                        final double max) {
        if (rank == origin) {
            return 1.0d;
        }

        final double calc = 1.0d + (origin - rank) / step;
        if (calc < min) {
            return min;
        }
        if (calc > max) {
            return max;
        }
        return calc;
        
    }

    private  LuceneDocumentAdapterUtils();

}