summaryrefslogtreecommitdiff
path: root/grapher/Models/Calculations/AccelChartData.cs
diff options
context:
space:
mode:
authora1xd <[email protected]>2020-12-03 22:42:29 -0500
committera1xd <[email protected]>2020-12-03 22:42:29 -0500
commitc221eb3d62ccbd7f2a5203abd3e0eae8e9bf31e8 (patch)
tree10f984c905084eae140d7eb15eb81592f50d537f /grapher/Models/Calculations/AccelChartData.cs
parentfix chart range not updating on disable (diff)
downloadrawaccel-c221eb3d62ccbd7f2a5203abd3e0eae8e9bf31e8.tar.xz
rawaccel-c221eb3d62ccbd7f2a5203abd3e0eae8e9bf31e8.zip
add changes from review
rename some vars prefer exceptions over assert refactor poll rate field usage in MouseWatcher
Diffstat (limited to 'grapher/Models/Calculations/AccelChartData.cs')
-rw-r--r--grapher/Models/Calculations/AccelChartData.cs6
1 files changed, 4 insertions, 2 deletions
diff --git a/grapher/Models/Calculations/AccelChartData.cs b/grapher/Models/Calculations/AccelChartData.cs
index 48374c1..71ee927 100644
--- a/grapher/Models/Calculations/AccelChartData.cs
+++ b/grapher/Models/Calculations/AccelChartData.cs
@@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
-using System.Diagnostics;
using System.Linq;
namespace grapher.Models.Calculations
@@ -81,7 +80,10 @@ namespace grapher.Models.Calculations
public int GetVelocityIndex(double outVelocityValue)
{
- Debug.Assert(outVelocityValue >= 0);
+ if (outVelocityValue < 0)
+ {
+ throw new ArgumentException($"invalid velocity: {outVelocityValue}");
+ }
var log = Math.Log10(outVelocityValue);
if (log < -2)