diff options
| author | JacobPalecki <[email protected]> | 2020-09-22 19:59:47 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-09-22 19:59:47 -0700 |
| commit | 77f420cf45a1a0bee00602965e687097367e2a70 (patch) | |
| tree | fa088af8f2feb54df5bcb6a036715fd32d0511e8 /grapher/Models/Calculations/AccelChartData.cs | |
| parent | Merge pull request #21 from JacobPalecki/GUI (diff) | |
| parent | Update credits (diff) | |
| download | rawaccel-77f420cf45a1a0bee00602965e687097367e2a70.tar.xz rawaccel-77f420cf45a1a0bee00602965e687097367e2a70.zip | |
Merge pull request #22 from JacobPalecki/GUI
Replace SigmoidGain with Motivity & Cleanup
Diffstat (limited to 'grapher/Models/Calculations/AccelChartData.cs')
| -rw-r--r-- | grapher/Models/Calculations/AccelChartData.cs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/grapher/Models/Calculations/AccelChartData.cs b/grapher/Models/Calculations/AccelChartData.cs index fbf1944..54685a2 100644 --- a/grapher/Models/Calculations/AccelChartData.cs +++ b/grapher/Models/Calculations/AccelChartData.cs @@ -23,6 +23,14 @@ namespace grapher.Models.Calculations public SortedDictionary<double, double> AccelPoints { get; } + public double MaxAccel { get; set; } + + public double MinAccel { get; set; } + + public double MaxGain { get; set; } + + public double MinGain { get; set; } + public SortedDictionary<double, double> VelocityPoints { get; } public SortedDictionary<double, double> GainPoints { get; } @@ -54,7 +62,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 +88,7 @@ namespace grapher.Models.Calculations } velIdx = Math.Min(velIdx, VelocityPoints.Count - 1); + velIdx = Math.Max(velIdx, 0); return velIdx; } |