1、 成员变量
a) public static final double PI
b) public static final double E
2、成员方法(注意返回值类型)
a) public static int abs(int a);绝对值
b) public static double floor(double a)向下取整
c) public static double ceil(double a)向上取整
d) public static int max(int a,int b) a、b的最大值
e) public static int min(int a,int b) a、b的最小值
f) public static double pow(doublie a,double b) a的b次幂
g) public static double random()随机数0.0到1.0不包括右边包括左边
h) public static int round(float a)四舍五入
i) public static double sqrt(double a)返回正平方根
Java中的Math类
最新推荐文章于 2024-07-23 09:53:09 发布