C# Class System.SingleExtensions

Show file Open project: SteamTools-Team/SteamTools

Public Methods

Method Description
CeilingToInt ( float f ) : int

(进一法)返回大于或等于指定数字的最小整数值

FloorToInt ( float f ) : int

(向下取整)返回小于或等于指定数字的最大整数值

Round2ToInt ( float f ) : int

(四舍五入)将值舍入到最接近的整数或指定的小数位数

RoundToInt ( float f ) : int

(五舍六入)将值舍入到最接近的整数或指定的小数位数

RoundToInt ( float f, MidpointRounding mode ) : int

将值舍入到最接近的整数或指定的小数位数

Method Details

CeilingToInt() public static method

(进一法)返回大于或等于指定数字的最小整数值
public static CeilingToInt ( float f ) : int
f float
return int

FloorToInt() public static method

(向下取整)返回小于或等于指定数字的最大整数值
public static FloorToInt ( float f ) : int
f float
return int

Round2ToInt() public static method

(四舍五入)将值舍入到最接近的整数或指定的小数位数
public static Round2ToInt ( float f ) : int
f float
return int

RoundToInt() public static method

(五舍六入)将值舍入到最接近的整数或指定的小数位数
public static RoundToInt ( float f ) : int
f float
return int

RoundToInt() public static method

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