feat: added decimal operator
This commit is contained in:
@@ -44,6 +44,8 @@ struct decimal {
|
|||||||
return {MUL_F(d1.i, d2.i)};
|
return {MUL_F(d1.i, d2.i)};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
decimal &operator*=(const decimal &d) { return (*this) = {MUL_F(i, d.i)}; }
|
||||||
|
|
||||||
friend decimal operator/(const decimal &d1, const decimal &d2) {
|
friend decimal operator/(const decimal &d1, const decimal &d2) {
|
||||||
return {DIV_F(d1.i, d2.i)};
|
return {DIV_F(d1.i, d2.i)};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user