double GetTimePoint(double time, CatchTimePointType timePointType) { double r = double.NaN; try { foreach (var tmpt in CatchTimePoints[timePointType].Keys) { if (tmpt <= time) { r = CatchTimePoints[timePointType][tmpt]; } else { break; } } } catch (Exception) { // ignored } return(r); }
void AddOrAssign(CatchTimePointType type, double offset, double value) { if (CatchTimePoints[type].ContainsKey(offset)) { CatchTimePoints[type][offset] = value; } else { CatchTimePoints[type].Add(offset, value); } }