C# Класс GameMath.Round

Показать файл Открыть проект

Открытые методы

Метод Описание
Ceil ( double x ) : int

Returns the smallest integer greater than or equal to the specified number.

Floor ( double x ) : int

Returns the largest integer less than or equal to the specified number.

Nearest ( double x ) : int

Rounds the specified number to the nearest integer.

Truncate ( double x ) : int

Returns the integral part of the specified number.

Описание методов

Ceil() публичный статический Метод

Returns the smallest integer greater than or equal to the specified number.
public static Ceil ( double x ) : int
x double /// Number to ceil. ///
Результат int

Floor() публичный статический Метод

Returns the largest integer less than or equal to the specified number.
public static Floor ( double x ) : int
x double /// Number to floor. ///
Результат int

Nearest() публичный статический Метод

Rounds the specified number to the nearest integer.
public static Nearest ( double x ) : int
x double /// Number to round. ///
Результат int

Truncate() публичный статический Метод

Returns the integral part of the specified number.
public static Truncate ( double x ) : int
x double /// Number to truncate. ///
Результат int