DvDt: fix double comparison against zero

master
Harald Wolff 2020-02-04 21:44:16 +01:00
parent ee46186da5
commit e8b0c8c4af
1 changed files with 1 additions and 1 deletions

View File

@ -29,7 +29,7 @@ namespace ln.types
{
DateTime now = DateTime.Now;
double interval = (now - lastTimestamp).TotalSeconds;
if (interval != 0.0)
if (Math.Abs(interval) > double.Epsilon)
{
double dV = value - lastValue;
Current = dV / interval;