hey,
is it possible to 'cut' the end off a float? i have a slider and want it to only give values that are like 0.0, 0.1, 0.2 .etc is this possible?
thanks
hey,
is it possible to 'cut' the end off a float? i have a slider and want it to only give values that are like 0.0, 0.1, 0.2 .etc is this possible?
thanks
If you want to do it to the float itself:
yourFloat = Mathf.Round(yourFloat * 10) / 10;
If you want to round the displayed string:
yourFloat.ToString("F1")