Use Math.PI and Math.E for Scientific Calculations

Many scientific/trigonometric/mathematical applications need the values of ‘pi’ and ‘e’ (the basis of natural logarithms) for calculations. The math class in the java.lang package has two static double constants that represent values that are closer than any other to these. They can be used in calculations.

Since they are static, they can be used as Math.PI and math.E.

Share the Post:
Share on facebook
Share on twitter
Share on linkedin

Overview

Recent Articles: