📅  最后修改于: 2022-03-11 14:52:48.389000             🧑  作者: Mango
double num = 4.333;
int round_up = Math.ceil(num); //round up
//Console will return: round_up will be 5
int round_down = Math.floor(num); //round down
//Console will return: round_up will be 4