val yield = (((sun * air)/ (cel+pco))*100).toDouble()
I have an assignment like this. As a result, it shows many numbers after the dot, for example 12.3456712345. I just want it to show as 12.34.
Asked
Active
Viewed 879 times
1
KKot
- 65
- 1
- 5
-
val df = DecimalFormat("#.##") df.format(your_value) – Merkost Jan 04 '22 at 09:17