Luna::gcd

template <typename _Ty>
constexpr _Ty gcd(_Ty a, _Ty b)

Calculates the Greatest Common Divisor of two numbers.

Parameters

in] _Ty The number type.

Parameters

  • in a

    The first number.

  • in b

    The second number.

Return value

Returns the Greatest Common Divisor of two numbers.