public static float Round(float a, int n){ int scale = 10 ^ n; float k = Mathf.Round(a * scale); k = k / scale; return k; } }