mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 08:43:09 +00:00
Don't need floor() in timeman.cpp
For positive numbers result is equivalent: http://stackoverflow.com/questions/3300290/cast-to-int-vs-floor Spotted by Joseph Ellis. No functional change.
This commit is contained in:
parent
93e3b06fe2
commit
9f2a64abd2
1 changed files with 1 additions and 1 deletions
|
@ -63,7 +63,7 @@ namespace {
|
||||||
double ratio1 = (TMaxRatio * thisMoveImportance) / (TMaxRatio * thisMoveImportance + otherMovesImportance);
|
double ratio1 = (TMaxRatio * thisMoveImportance) / (TMaxRatio * thisMoveImportance + otherMovesImportance);
|
||||||
double ratio2 = (thisMoveImportance + TStealRatio * otherMovesImportance) / (thisMoveImportance + otherMovesImportance);
|
double ratio2 = (thisMoveImportance + TStealRatio * otherMovesImportance) / (thisMoveImportance + otherMovesImportance);
|
||||||
|
|
||||||
return int(floor(myTime * std::min(ratio1, ratio2)));
|
return int(myTime * std::min(ratio1, ratio2));
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
Loading…
Add table
Reference in a new issue