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 4,319 times
1

KKot
- 161
- 3
- 9
-
1val df = DecimalFormat("#.##") df.format(your_value) – Merkost Jan 04 '22 at 09:17