currentScore = 0.6;
double floor = Math.floor(currentScore);
if (floor + 0.5 < currentScore) {
currentScore = floor + 1;
} else if (floor + 0.5==currentScore+0.5){
currentScore = floor;
}else {
currentScore = floor + 0.5;
}
当currentScore = 0.6输出结果为1
当currentScore = 0.4输出结果为0.5