C# Class System.Globalization.CCMath

A class that provides mathematical functions.

We are breaking the .Net naming conventions to be compatible to the "Calendrical Calculations" bool.

Show file Open project: runefs/Marvin Class Usage Examples

Public Methods

Method Description
amod ( double x, double y ) : double

An adjusted remainder function as defined in "Calendrical Calculations".

amod ( int x, int y ) : int

The adjusted remainder functions for integers as defined in "Calendrical Calculations".

div ( int x, int y ) : int

The static method divides two integers.

Please notify that the function is not compatible to the standard integer divide operation /.

div_mod ( int &remainder, int x, int y ) : int

A static method that combines integer division and remainder computation.

mod ( double x, double y ) : double

A static method that computes the remainder of the division of two doubles.

mod ( int x, int y ) : int

The static method computes the remainder of two integers.

Please notify that the method is not compatible to the C# remainder operation %.

round ( double x ) : double

A static method which rounds a double value.

signum ( double x ) : int

A static method returning the sign of the argument.

signum ( int x ) : int

A static method returning the sign of the integer argument.

Method Details

amod() public static method

An adjusted remainder function as defined in "Calendrical Calculations".
public static amod ( double x, double y ) : double
x double The double x argument.
y double The double y argument, the divisor.
return double

amod() public static method

The adjusted remainder functions for integers as defined in "Calendrical Calculations".
public static amod ( int x, int y ) : int
x int The integer argument to be divided.
y int The integer divisor argument.
return int

div() public static method

The static method divides two integers.
Please notify that the function is not compatible to the standard integer divide operation /.
public static div ( int x, int y ) : int
x int The integer x value.
y int The integer y value.
return int

div_mod() public static method

A static method that combines integer division and remainder computation.
public static div_mod ( int &remainder, int x, int y ) : int
remainder int Remainder integer output value. ///
x int Integer to be divided.
y int Divisor integer value.
return int

mod() public static method

A static method that computes the remainder of the division of two doubles.
public static mod ( double x, double y ) : double
x double The double value which is divided.
y double The divisor.
return double

mod() public static method

The static method computes the remainder of two integers.
Please notify that the method is not compatible to the C# remainder operation %.
public static mod ( int x, int y ) : int
x int The integer value which will be divided.
y int The divisor integer value.
return int

round() public static method

A static method which rounds a double value.
public static round ( double x ) : double
x double The double value to round.
return double

signum() public static method

A static method returning the sign of the argument.
public static signum ( double x ) : int
x double The double argument.
return int

signum() public static method

A static method returning the sign of the integer argument.
public static signum ( int x ) : int
x int The integer argument.
return int