diff options
| author | Jacob Palecki <[email protected]> | 2020-09-22 02:28:35 -0700 |
|---|---|---|
| committer | Jacob Palecki <[email protected]> | 2020-09-22 02:28:35 -0700 |
| commit | 8e58892723ee10792c7d3db275da826f98d01677 (patch) | |
| tree | 25d5c35fba0734f891737aa038e882f318296353 /grapher/Models/Calculations/AccelChartData.cs | |
| parent | Merge remote-tracking branch 'upstream/Experiment' into GUI (diff) | |
| download | rawaccel-8e58892723ee10792c7d3db275da826f98d01677.tar.xz rawaccel-8e58892723ee10792c7d3db275da826f98d01677.zip | |
Mostly works
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; } |