java中Math方法

mac2022-06-30  93

java.lang.Math.max(参数1,参数2)是一个静态的工具方法,主要用来比较两个相同类型参数的大小,支持的类型有double,float,int,long四种类型。

Math.sqrt()//计算平方根Math.cbrt()//计算立方根 Math.pow(a, b)//计算a的b次方 Math.max( , );//计算最大值 Math.min( , );//计算最小值

转载于:https://www.cnblogs.com/sgbe/p/11412579.html

最新回复(0)