Small trivial cleanups

closes https://github.com/official-stockfish/Stockfish/pull/2801

No functional change
This commit is contained in:
Joost VandeVondele
2020-07-11 16:59:33 +02:00
committed by Stéphane Nicolet
parent 3542033342
commit 5f1843c9cb
17 changed files with 96 additions and 95 deletions

View File

@@ -211,7 +211,7 @@ namespace {
double b = (((bs[0] * m + bs[1]) * m + bs[2]) * m) + bs[3];
// Transform eval to centipawns with limited range
double x = Utility::clamp(double(100 * v) / PawnValueEg, -1000.0, 1000.0);
double x = std::clamp(double(100 * v) / PawnValueEg, -1000.0, 1000.0);
// Return win rate in per mille (rounded to nearest)
return int(0.5 + 1000 / (1 + std::exp((a - x) / b)));