mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-30 06:06:48 +00:00
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:
parent
e251b451ef
commit
a952d000be
Notes:
github-actions[bot]
2025-05-23 09:58:43 +00:00
Author: https://github.com/devgianlu
Commit: a952d000be
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4507
Reviewed-by: https://github.com/gmta ✅
7 changed files with 15 additions and 33 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue