System.SingleExtensions.RoundToInt C# (CSharp) Method

RoundToInt() public static method

将值舍入到最接近的整数或指定的小数位数
public static RoundToInt ( float f, MidpointRounding mode ) : int
f float
mode MidpointRounding 在两个数字之间时如何舍入的规范
return int
        public static int RoundToInt(this float f, MidpointRounding mode) => (int)MathF.Round(f, mode);

Same methods

SingleExtensions::RoundToInt ( float f ) : int