summaryrefslogtreecommitdiff
path: root/grapher/Models/Calculations/AccelChartData.cs
diff options
context:
space:
mode:
Diffstat (limited to 'grapher/Models/Calculations/AccelChartData.cs')
-rw-r--r--grapher/Models/Calculations/AccelChartData.cs5
1 files changed, 5 insertions, 0 deletions
diff --git a/grapher/Models/Calculations/AccelChartData.cs b/grapher/Models/Calculations/AccelChartData.cs
index 60d4c89..71ee927 100644
--- a/grapher/Models/Calculations/AccelChartData.cs
+++ b/grapher/Models/Calculations/AccelChartData.cs
@@ -80,6 +80,11 @@ namespace grapher.Models.Calculations
public int GetVelocityIndex(double outVelocityValue)
{
+ if (outVelocityValue < 0)
+ {
+ throw new ArgumentException($"invalid velocity: {outVelocityValue}");
+ }
+
var log = Math.Log10(outVelocityValue);
if (log < -2)
{