public int GetIterationsFromYear(int year)
{
if (year > StartYear)
{
var diff = (year - StartYear) / 2;
var mul = (int)Math.Pow(2, diff);
int count = StartCount * mul;
// if we go negative, then we wrapped (expected in year ~2044).
// Int32.Max is best we can do at this point
if (count < 0) count = Int32.MaxValue;
return count;
}
return StartCount;
}