diff options
Diffstat (limited to 'grapher/Models/Calculations/AccelChartData.cs')
| -rw-r--r-- | grapher/Models/Calculations/AccelChartData.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/grapher/Models/Calculations/AccelChartData.cs b/grapher/Models/Calculations/AccelChartData.cs index fbf1944..5225e08 100644 --- a/grapher/Models/Calculations/AccelChartData.cs +++ b/grapher/Models/Calculations/AccelChartData.cs @@ -54,7 +54,6 @@ namespace grapher.Models.Calculations { var velIdx = GetVelocityIndex(outVelocityValue); - velIdx = Math.Min(velIdx, VelocityPoints.Count - 1); values = (VelocityPoints.ElementAt(velIdx).Key, AccelPoints.ElementAt(velIdx).Value, GainPoints.ElementAt(velIdx).Value); OutVelocityToPoints.Add(outVelocityValue, values); return values; @@ -81,6 +80,7 @@ namespace grapher.Models.Calculations } velIdx = Math.Min(velIdx, VelocityPoints.Count - 1); + velIdx = Math.Max(velIdx, 0); return velIdx; } |