From 1de652e88e57de7760bd2754f6627de6bd3a218c Mon Sep 17 00:00:00 2001 From: Amy Retzerau Date: Wed, 19 Nov 2025 08:50:54 +0100 Subject: [PATCH] feat: added decimal operator --- fastmath.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fastmath.hpp b/fastmath.hpp index bdf7ebf..f4f2342 100644 --- a/fastmath.hpp +++ b/fastmath.hpp @@ -44,6 +44,8 @@ struct decimal { 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) { return {DIV_F(d1.i, d2.i)}; }