lcm method

int lcm(
  1. int other
)

Returns the least common multiple (LCM) of this int and other. This is the smallest positive integer that is divisible by both numbers.

Implementation

int lcm(int other) => this ~/ gcd(other) * other;