Hello,
Problem:
When I do a division with the resultant value in float, I get values more than 3-4 decimal places. I would have to print this on the console.
What should I do in order to print it to just 2 decimal places.
Code:
Debug.Log("Distance travelled" + distance + " m");
The NEED :
Considering the above code, the value distance prints itself to 4 decimals places. i.e.
I would like to have it printed as 4.56 rather than 4.56234.
THANK YOU VERY MUCH IN ADVANCE