Add aggregate API

This commit is contained in:
2020-07-23 20:36:20 -04:00
parent f8a6c71dd0
commit e810c4a240
4 changed files with 88 additions and 0 deletions

View File

@@ -1,4 +1,5 @@
using System;
using DecimalMath;
namespace ChrisKaczor.HomeMonitor.Weather.Service
{
@@ -8,5 +9,10 @@ namespace ChrisKaczor.HomeMonitor.Weather.Service
{
return item.CompareTo(start) >= 0 && item.CompareTo(end) <= 0;
}
public static decimal Truncate(this decimal value, int decimalPlaces)
{
return decimal.Truncate(value * DecimalEx.Pow(10, decimalPlaces)) / DecimalEx.Pow(10, decimalPlaces);
}
}
}