mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-03 22:59:33 +00:00
LibCrypto: Add a BigFraction::is_zero helper
This commit is contained in:
parent
e6c96ce57e
commit
912e38c5fb
Notes:
github-actions[bot]
2024-12-04 13:02:34 +00:00
Author: https://github.com/trflynn89
Commit: 912e38c5fb
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2731
Reviewed-by: https://github.com/shannonbooth
2 changed files with 6 additions and 0 deletions
|
@ -140,6 +140,11 @@ double BigFraction::to_double() const
|
||||||
return m_numerator.to_double() / m_denominator.to_double();
|
return m_numerator.to_double() / m_denominator.to_double();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool BigFraction::is_zero() const
|
||||||
|
{
|
||||||
|
return m_numerator.is_zero();
|
||||||
|
}
|
||||||
|
|
||||||
void BigFraction::set_to_0()
|
void BigFraction::set_to_0()
|
||||||
{
|
{
|
||||||
m_numerator.set_to_0();
|
m_numerator.set_to_0();
|
||||||
|
|
|
@ -44,6 +44,7 @@ public:
|
||||||
BigFraction invert() const;
|
BigFraction invert() const;
|
||||||
BigFraction sqrt() const;
|
BigFraction sqrt() const;
|
||||||
|
|
||||||
|
bool is_zero() const;
|
||||||
void set_to_0();
|
void set_to_0();
|
||||||
|
|
||||||
// Return a BigFraction in "scientific notation", as an example with:
|
// Return a BigFraction in "scientific notation", as an example with:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue