C# Class Patcher.Rules.Compiled.Helpers.Math

Provides useful mathematical functions.
Show file Open project: unforbidable/patcher

Public Methods

Method Description
Ceiling ( float a ) : int

Returns the smallest integer value which is greater or equal to the specified floating point number.

Floor ( float a ) : int

Returns the largest integer value which is lesser or equal to the specified floating point number.

Max ( float a, float b ) : float

Retrieves the greater of the specified floating point numbers.

Max ( int a, int b ) : int

Retrieves the greater of the specified integers.

Max ( short a, short b ) : short

Retrieves the greater of the specified short integers.

Min ( float a, float b ) : float

Retrieves the lesser of the specified floating point numbers.

Min ( int a, int b ) : int

Retrieves the lesser of the specified integers.

Min ( short a, short b ) : short

Retrieves the lesser of the specified short integers.

Round ( float a ) : int

Rounds the specified floating point value to the nearest integer value.

Method Details

Ceiling() public static method

Returns the smallest integer value which is greater or equal to the specified floating point number.
public static Ceiling ( float a ) : int
a float Floating point value to ceil.
return int

Floor() public static method

Returns the largest integer value which is lesser or equal to the specified floating point number.
public static Floor ( float a ) : int
a float Floating point value to floor.
return int

Max() public static method

Retrieves the greater of the specified floating point numbers.
public static Max ( float a, float b ) : float
a float First floating point number to compare.
b float Second floating point number to compare.
return float

Max() public static method

Retrieves the greater of the specified integers.
public static Max ( int a, int b ) : int
a int First integer to compare.
b int Second integer to compare.
return int

Max() public static method

Retrieves the greater of the specified short integers.
public static Max ( short a, short b ) : short
a short First short integer to compare.
b short Second short integer to compare.
return short

Min() public static method

Retrieves the lesser of the specified floating point numbers.
public static Min ( float a, float b ) : float
a float First floating point number to compare.
b float Second floating point number to compare.
return float

Min() public static method

Retrieves the lesser of the specified integers.
public static Min ( int a, int b ) : int
a int First integer to compare.
b int Second integer to compare.
return int

Min() public static method

Retrieves the lesser of the specified short integers.
public static Min ( short a, short b ) : short
a short First short integer to compare.
b short Second short integer to compare.
return short

Round() public static method

Rounds the specified floating point value to the nearest integer value.
public static Round ( float a ) : int
a float Floating point value to round.
return int