float to decimal place?

I have a couple of floats, whose values are usually something like 44.93875 is there a function that will give me just the 44.93 part? and remove the rest of the digits?

Something like this probably

float x = 44.93875f;
x *= 100;
x = Mathf.Floor(x);
x /= 100;
Debug.Log(x); // 44.93

thanks, I will give that a go. I had tried multiplying it by 100 and dividing by 10 to try get better numbers, but that never worked. I hadnt thought of using floor.

With Unity 2021.2 and .NET standard 2.1 there will also be MathF.Round.
This is different than Mathf.Round that Unity has in the UnityEngine namespace.
Though that will Round the float to 44.94

If that is a problem then the example from @RadRedPanda will suffice.

I’m kind of uncertain why it is missing the MidpointRounding.ToZero enum though. That would’ve Rounded it down to 44.93.
It would’ve been so much easier if there was a MathF.Floor(value, digits). But sadly that doesn’t exist.