Removed Entropy Events. Those would slow down.
All checks were successful
🚀 Pack skyscraper8 / make-zip (push) Successful in 4m50s

This commit is contained in:
Fey 2026-02-01 16:11:38 +01:00
parent 8aa9ac82d4
commit 6d3f352bc5
2 changed files with 1 additions and 21 deletions

View File

@ -2,7 +2,7 @@
"profiles": {
"skyscraper8": {
"commandName": "Project",
"commandLineArgs": "\"F:\\utena\\0008W_Thor\\recap-max-sx8\\skyscraper_20251029_2110_0008W_10841_V_24497.ts\"",
"commandLineArgs": "cscan tcp://127.0.0.1:6969",
"remoteDebugEnabled": false
},
"Container (Dockerfile)": {

View File

@ -56,21 +56,6 @@ namespace skyscraper8.Skyscraper.Math
newEntropy -= p_i * System.Math.Log2(p_i);
}
//Raise events if we feel like it
if (EntropyRising != null || EntropyFalling != null)
{
if (newEntropy != Entropy)
{
double oldEntropy = Entropy;
double oldPercentage = Percentage;
double newPercentage = (newEntropy / 8.0) * 100.0;
if (newEntropy > Entropy)
EntropyRising?.Invoke(oldEntropy, newEntropy, oldPercentage, newPercentage);
else if (newEntropy < Entropy)
EntropyFalling?.Invoke(oldEntropy, newEntropy, oldPercentage, newPercentage);
}
}
_entropy = newEntropy;
}
@ -104,10 +89,5 @@ namespace skyscraper8.Skyscraper.Math
return (Entropy / 8.0) * 100.0;
}
}
public delegate void EntropyCallback(double oldEntropy, double newEntropy, double oldPercentage, double newPercentage);
public event EntropyCallback EntropyRising;
public event EntropyCallback EntropyFalling;
}
}