#include "PRMap.h"
unsigned int PRMap::lookup(const Age &age, const unsigned int &points)
{
if (points >= m_PRs.size())
return 0;
}
auto ageIndex = [&]() -> size_t {
if (m_ages.empty())
if (age < m_ages.front())
if (m_ages.back() < age)
return m_ages.size() - 2;
for (size_t index = 1; index < m_ages.size(); ++index)
if (age < m_ages.at(index))
return index - 1;
}();
if (ageIndex >= m_PRs.at(points).size())
return m_PRs.at(points).at(ageIndex);