diff options
| author | Jacob Palecki <[email protected]> | 2020-09-21 00:08:19 -0700 |
|---|---|---|
| committer | Jacob Palecki <[email protected]> | 2020-09-21 00:08:19 -0700 |
| commit | ba642cd8c8e63ec3778fa17ecbcd7964074aaba1 (patch) | |
| tree | bb7baaf0e076b64538b7d408cec47045c63a3a8a /grapher/Models/Calculations/AccelChartData.cs | |
| parent | Attempt to get separate x/y working (diff) | |
| download | rawaccel-ba642cd8c8e63ec3778fa17ecbcd7964074aaba1.tar.xz rawaccel-ba642cd8c8e63ec3778fa17ecbcd7964074aaba1.zip | |
separate x/y mostly works
Diffstat (limited to 'grapher/Models/Calculations/AccelChartData.cs')
| -rw-r--r-- | grapher/Models/Calculations/AccelChartData.cs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/grapher/Models/Calculations/AccelChartData.cs b/grapher/Models/Calculations/AccelChartData.cs index c943643..907eb0e 100644 --- a/grapher/Models/Calculations/AccelChartData.cs +++ b/grapher/Models/Calculations/AccelChartData.cs @@ -63,7 +63,7 @@ namespace grapher.Models.Calculations public (double, double, double) ValuesAtIndex(int index) { - return (VelocityPoints.ElementAt(index).Value, AccelPoints.ElementAt(index).Value, GainPoints.ElementAt(index).Value); + return (AccelPoints.ElementAt(index).Value, VelocityPoints.ElementAt(index).Value, GainPoints.ElementAt(index).Value); } public int GetVelocityIndex(double outVelocityValue) @@ -75,6 +75,8 @@ namespace grapher.Models.Calculations velIdx = ~velIdx; } + velIdx = Math.Min(velIdx, VelocityPoints.Count - 1); + return velIdx; } |