]> git.sesse.net Git - stockfish/blobdiff - src/evaluate.cpp
Remove some useless casts
[stockfish] / src / evaluate.cpp
index 0fef0258b1de329d7d6bede6a11d933cb6ba6f69..e1a000c6323d081a2458285083c2c38a4b0910b8 100644 (file)
@@ -915,12 +915,12 @@ namespace Eval {
     Weights[KingDangerUs]   = weight_option("Cowardice", "Cowardice", WeightsInternal[KingDangerUs]);
     Weights[KingDangerThem] = weight_option("Aggressiveness", "Aggressiveness", WeightsInternal[KingDangerThem]);
 
-    const int MaxSlope = 30;
-    const int Peak = 1280;
+    const double MaxSlope = 30;
+    const double Peak = 1280;
 
     for (int t = 0, i = 1; i < 100; ++i)
     {
-        t = std::min(Peak, std::min(int(0.4 * i * i), t + MaxSlope));
+        t = std::min(Peak, std::min(0.4 * i * i, t + MaxSlope));
 
         KingDanger[1][i] = apply_weight(make_score(t, 0), Weights[KingDangerUs]);
         KingDanger[0][i] = apply_weight(make_score(t, 0), Weights[KingDangerThem]);