LibCrypto: Move GCD to method of UnsignedBigInteger

Having it as a method instead of a free function is necessary for the
next commits and generally allows for optimizations that require deeper
access into the `UnsignedBigInteger`.
This commit is contained in:
devgianlu 2025-04-26 11:01:48 +02:00 committed by Jelle Raaijmakers
commit a952d000be
Notes: github-actions[bot] 2025-05-23 09:58:43 +00:00
7 changed files with 15 additions and 33 deletions

View file

@ -221,7 +221,7 @@ BigFraction BigFraction::rounded(unsigned rounding_threshold) const
void BigFraction::reduce()
{
auto const gcd = NumberTheory::GCD(m_numerator.unsigned_value(), m_denominator);
auto const gcd = m_numerator.unsigned_value().gcd(m_denominator);
if (gcd == 1)
return;