Refactor and code cleanup.

This commit is contained in:
2016-07-28 22:25:26 +01:00
parent c93d469da9
commit a63ba13b6b
199 changed files with 3614 additions and 3744 deletions

View File

@@ -484,7 +484,9 @@ namespace DiscImageChef.Commands
double entropy = 0;
foreach(ulong l in entTable)
{
#pragma warning disable IDE0004 // Without this specific cast, it gives incorrect values
double frequency = (double)l / (double)bufferSize;
#pragma warning restore IDE0004 // Without this specific cast, it gives incorrect values
entropy += -(frequency * Math.Log(frequency, 2));
}
end = DateTime.Now;