C# 클래스 GameMath.Round

파일 보기 프로젝트 열기: npruehs/game-math

공개 메소드들

메소드 설명
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