java.lang.Math

java.lang.Math主要介绍

都是静态static的,所以直接使用类名Math调用。
比如:Math.sin(a)

Modifier and TypeFieldDescription
static final doubleE自然对数函数的底数e
static final doublePI圆周率π
Modifier and TypeMethodDescription
static doubleabs(double a) (绝对值absolute vaule)返回双精度值double的绝对值
static floatabs(float a)返回浮点值float的绝对值。
static intabs(int a)返回整数值int的绝对值
static longabs(long a)返回长值long的绝对值。
static doubleacos(double a)y=arccosx(y的范围0.0~pi)
static doubleasin(double a)y=arcsinx(y的范围-pi/2~pi/2)
static doubleatan(double a)y=arctanx(y的范围-pi/2~pi/2)
static doublecos(double a)y=cosx
static doublesin(double a)y=sinx
static doubletan(double a)y=tanx
static longround(double a)对参数进行四舍五入取整运算
static intround(float a)对参数进行四舍五入取整运算
static doublecbrt(double a)(立方根cube root)一个双精度值double的立方根
static doublesqrt(double a)平方根
static doublehypot(double x, double y)sqrt(x2 +y2)
static doubleceil(double a)对参数进行正无穷方向取整
static doublefloor(double a)对参数进行负无穷方向取整
static doubleexp(double a)ea
static doubleexpm1(double x)ex -1
static doublepow(double a, double b)ab
static doublelog(double a)返回以e为底的对数值,即ln a
static doublelog10(double a)返回以10为底的对数值
static doublelog1p(double x)ln(x + 1)
static doublemax(double a, double b)两个数之中的更大值
static floatmax(float a, float b)两个数之中的更大值
static intmax(int a, int b)两个数之中的更大值
static longmax(long a, long b)两个数之中的更大值
static doublemin(double a, double b)两个数之中的更小值
static floatmin(float a, float b)两个数之中的更小值
static intmin(int a, int b)两个数之中的更小值
static longmin(long a, long b)两个数之中的更小值
static doublerandom()返回一个正double值,范围在0.0~1.0
static doubletoDegrees(double angrad)弧度转换为角度
static doubletoRadians(double angdeg)角度转换为弧度
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值