I have a float that represents the players times. I used this command to truncate it, so it doesn’t have a bunch of decimals.
lastTime = Mathf.Round(lastTime * 1000f) / 1000f;
but if the third decimal is a zero, say 17.890
, it just becomes 17.89
Is there a way to ensure that it is always 3 digits after the DP ?
Edit: I have a list of floats, and I want them to all have 3 decimal points for consistency.
No strings involved.