C# Class GameMath.Round

Afficher le fichier Open project: npruehs/game-math

Méthodes publiques

Méthode Description
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.

Method Details

Ceil() public static méthode

Returns the smallest integer greater than or equal to the specified number.
public static Ceil ( double x ) : int
x double /// Number to ceil. ///
Résultat int

Floor() public static méthode

Returns the largest integer less than or equal to the specified number.
public static Floor ( double x ) : int
x double /// Number to floor. ///
Résultat int

Nearest() public static méthode

Rounds the specified number to the nearest integer.
public static Nearest ( double x ) : int
x double /// Number to round. ///
Résultat int

Truncate() public static méthode

Returns the integral part of the specified number.
public static Truncate ( double x ) : int
x double /// Number to truncate. ///
Résultat int