2
0
mirror of https://github.com/esiur/esiur-dotnet.git synced 2025-06-27 13:33:13 +00:00
This commit is contained in:
2022-11-12 15:57:16 +03:00
parent 1637f453fb
commit 68d0ca1873
4 changed files with 52 additions and 34 deletions

View File

@ -35,9 +35,9 @@ namespace Esiur.Analysis.Statistics
public static double RMS(this double[] x)
{
var r = Math.Sqrt(x.Sum(x => x * x) / x.Length);
if (double.IsNaN(r))
Console.WriteLine();
var r = Math.Sqrt(x.Sum(x =>(float) x * (float) x) / x.Length);
//if (double.IsNaN(r) || double.IsInfinity(r))
// Console.WriteLine();
return r;
}