mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Refactor and code cleanup.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user