简体   繁体   English

Math。(E | PI)和StrictMath有什么区别?

[英]What are the differences between Math.(E|PI) and those of StrictMath?

I just found that java.lang.StrictMath has E and PI which each is also available in java.lang.Math . 我刚刚发现java.lang.StrictMath具有EPI ,它们在java.lang.Math也都可用。

Are there any differences between them? 它们之间有什么区别吗?

I check the source( Math , StrictMath ) and found they are the same values. 我检查了源( MathStrictMath ),发现它们是相同的值。

No, of course not. 不,当然不。 They're constants, you don't need to store them with different levels of precision. 它们是常量,您不需要以不同的精度存储它们。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM