You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
package com.fanruan.api.util; |
|
|
|
/** |
|
* @author richie |
|
* @version 10.0 |
|
* Created by richie on 2019/10/28 |
|
* 数学计算相关的工具类 |
|
*/ |
|
public class MathKit { |
|
|
|
/** |
|
* 四舍五入取靠近如11、11.5、12的值 |
|
* |
|
* @param number 值 |
|
*/ |
|
public static float round5(float number) { |
|
return (float) (Math.round(number * 2)) / 2; |
|
} |
|
}
|
|
|