[]
        
(Showing Draft Content)

CSJ2K.j2k.util.MathUtil.lcm

lcm Method

lcm(int, int)

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

Declaration
public static int lcm(int x1, int x2)
Parameters
Type Name Description
int x1

First number

int x2

Second number

Returns
Type Description
int

lcm(int[])

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

Declaration
public static int lcm(int[] x)
Parameters
Type Name Description
int[] x

Array containing the numbers.

Returns
Type Description
int