lcm static method

double lcm(
  1. double x,
  2. double y
)

Implementation

static double lcm( double x, double y ){
	if( isNan( x ) ) return x;
	if( isNan( y ) ) return y;
	x = toInt( x );
	y = toInt( y );
	double g = gcd( x, y );
	if( g == 0 ){
		return 0;
	}
	return x * y / g;
}