C# Класс CSJ2K.j2k.util.MathUtil

This class contains a collection of utility methods fro mathematical operations. All methods are static.
Показать файл Открыть проект

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

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

Method that calculates the Greatest Common Divisor (GCD) of several positive integer numbers.

gcd ( int x1, int x2 ) : int

Method that calculates the Greatest Common Divisor (GCD) of two positive integer numbers.

lcm ( int x ) : int

Method that calculates the Least Common Multiple (LCM) of several positive integer numbers.

lcm ( int x1, int x2 ) : int

Method that calculates the Least Common Multiple (LCM) of two strictly positive integer numbers.

log2 ( int x ) : int

Method that calculates the floor of the log, base 2, of 'x'. The calculation is performed in integer arithmetic, therefore, it is exact.

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

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

Method that calculates the Greatest Common Divisor (GCD) of several positive integer numbers.
public static gcd ( int x ) : int
x int Array containing the numbers. /// ///
Результат int

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

Method that calculates the Greatest Common Divisor (GCD) of two positive integer numbers.
public static gcd ( int x1, int x2 ) : int
x1 int
x2 int
Результат int

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

Method that calculates the Least Common Multiple (LCM) of several positive integer numbers.
public static lcm ( int x ) : int
x int Array containing the numbers. /// ///
Результат int

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

Method that calculates the Least Common Multiple (LCM) of two strictly positive integer numbers.
public static lcm ( int x1, int x2 ) : int
x1 int First number /// ///
x2 int Second number /// ///
Результат int

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

Method that calculates the floor of the log, base 2, of 'x'. The calculation is performed in integer arithmetic, therefore, it is exact.
public static log2 ( int x ) : int
x int The value to calculate log2 on. /// ///
Результат int