mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-22 15:44:45 +00:00
AK: Add bit shift to FixedPoint
This commit is contained in:
committed by
Andreas Kling
parent
5d6e3441fe
commit
30002c2ccb
@@ -179,6 +179,16 @@ public:
|
||||
{
|
||||
return create_raw(m_value / other);
|
||||
}
|
||||
template<Integral I>
|
||||
constexpr This operator>>(I other) const
|
||||
{
|
||||
return create_raw(m_value >> other);
|
||||
}
|
||||
template<Integral I>
|
||||
constexpr This operator<<(I other) const
|
||||
{
|
||||
return create_raw(m_value << other);
|
||||
}
|
||||
|
||||
This& operator+=(This const& other)
|
||||
{
|
||||
@@ -239,6 +249,18 @@ public:
|
||||
m_value /= other;
|
||||
return *this;
|
||||
}
|
||||
template<Integral I>
|
||||
This& operator>>=(I other)
|
||||
{
|
||||
m_value >>= other;
|
||||
return *this;
|
||||
}
|
||||
template<Integral I>
|
||||
This& operator<<=(I other)
|
||||
{
|
||||
m_value <<= other;
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool operator==(This const& other) const { return raw() == other.raw(); }
|
||||
bool operator!=(This const& other) const { return raw() != other.raw(); }
|
||||
|
||||
Reference in New Issue
Block a user