//#define XERR
#include "density.ih"

uint16_t Density::indexOf(double prob) const
{
    return find_if(d_cumBirads.begin(), d_cumBirads.end(), 
                [&](double cumProb)
                {
                    return prob <= cumProb;
                }
            ) - d_cumBirads.begin();
}
