[JAVA]Mathメソッド
abs():絶対値
Math.abs(-5); // 5
Math.abs(-3.14); // 3.14
Ceil():より大きな整数を二重精度に復元Math.ceil(5.3); // 6.0
Math.ceil(-5.3); // -5.0
floor():より小さな整数を二重精度に復元Math.floor(5.3); // 5.0
Math.floor(-5.3); // -6.0
print():最近の整数の実数値を返します.Math.rint(5.3); // 5.0
Math.rint(5.7); // 6.0
round():四捨五入して長形に戻るMath.round(5.3); // 5
Math.round(-5.3); // 5
max():2つの数値のうち大きい値を返します.Math.max(5, 9); // 9
min():2つの数の小さい値を返しますMath.min(5, 9); // 5
pow(a,b):aのb乗Math.pow(5, 2); // 25.0
sqrt():ルートMath.sqrt(25); // 5
random():乱順の作成(int)Math.random()*(끝 정수 - 시작 정수 + 1) + 시작 정수)
Reference
この問題について([JAVA]Mathメソッド), 我々は、より多くの情報をここで見つけました https://velog.io/@heyhighbyee/JAVA-Math-메서드テキストは自由に共有またはコピーできます。ただし、このドキュメントのURLは参考URLとして残しておいてください。
Collection and Share based on the CC Protocol