栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Java

java.lang.Math

Java 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

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 doublecbrt(double a)(立方根cube root)一个双精度值double的立方根
static doublesqrt(double a)平方根
static doublehypot(double x, double y)sqrt(x2 +y2)
static doubleceil(double a)返回大于等于参数的最小double值
static doublefloor(double a)返回小于等于参数的最大double值
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)角度转换为弧度
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/270548.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号