I am trying to remove the last decimal point from a floating value but I am not sure how to do this. For example: 3.567, I want the result to be 3.56.
I am trying to do this but it rounds off the value, that is, the value changes to 3.40 instead. I do not want this. How do I solve it to remove the last or 3rd decimal value ?
float value = 3.567f;
value = Mathf.Round (value * 10f) * 0.1f;