三角函数
Math.sin(1/6.0);
Math.cosh(1/6.0);
Math.acos(1/6.0);
Math.asin(1/6.0);
Math.toDegrees(1/6.0);//弧度转换为角度
Math.toRadians(60);//角度转换为弧度
指数函数
Math.sqrt(-1);//开方
Math.exp(1);//e的指数
Math.log(1);//1的e为底对数
Math.log10(1);//10为底的对数
Math.pow(1, 2);//任何指数
取整
Math.round(1.5d);//四舍五入
Math.floor(1.5d);//向下取整
Math.ceil(1.5d);//向上取整
Math.rint(1.5d);//向最近的取整,如果为1.5这种则往偶数方向取整
min、max、abs、random
Math.max(1, 2);//返回最大值
Math.min(3, 4);//返回最小值
Math.abs(-5);//返回绝对值
Math.random();//返回0.0-1.0的double值