From 8e58892723ee10792c7d3db275da826f98d01677 Mon Sep 17 00:00:00 2001 From: Jacob Palecki Date: Tue, 22 Sep 2020 02:28:35 -0700 Subject: Mostly works --- grapher/Models/Calculations/AccelChartData.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'grapher/Models/Calculations/AccelChartData.cs') 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; } -- cgit v1.2.3 From 720a45289b2342c62eebb0e1cee3c4b88c9fe696 Mon Sep 17 00:00:00 2001 From: Jacob Palecki Date: Tue, 22 Sep 2020 14:01:05 -0700 Subject: Scaling improvement, remove y data from xy combined --- grapher/Models/Calculations/AccelChartData.cs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'grapher/Models/Calculations/AccelChartData.cs') diff --git a/grapher/Models/Calculations/AccelChartData.cs b/grapher/Models/Calculations/AccelChartData.cs index 5225e08..54685a2 100644 --- a/grapher/Models/Calculations/AccelChartData.cs +++ b/grapher/Models/Calculations/AccelChartData.cs @@ -23,6 +23,14 @@ namespace grapher.Models.Calculations public SortedDictionary AccelPoints { get; } + public double MaxAccel { get; set; } + + public double MinAccel { get; set; } + + public double MaxGain { get; set; } + + public double MinGain { get; set; } + public SortedDictionary VelocityPoints { get; } public SortedDictionary GainPoints { get; } -- cgit v1.2.3