Toggle navigation
Hot Examples
EN
EN
RU
DE
FR
ES
PT
IT
JP
ZH
KO
C#
PHP
C#
Java
Go
C++
Python
JS
TS
Search
Home
System
SingleExtensions
Round2ToInt
System.SingleExtensions.Round2ToInt C# (CSharp) Method
SingleExtensions Class Documentation
Show file
Open project: SteamTools-Team/SteamTools
Round2ToInt()
public
static
method
(四舍五入)将值舍入到最接近的整数或指定的小数位数
public
static
Round2ToInt
(
float
f
) :
int
f
float
return
int
public static int Round2ToInt(this float f) => (int)MathF.Round(f, MidpointRounding.AwayFromZero); }
SingleExtensions
CeilingToInt
FloorToInt
Round2ToInt
RoundToInt