From 9d4f68606c919791d44e86e7a50812c29be32fa3 Mon Sep 17 00:00:00 2001 From: batsumaru <> Date: Sun, 9 Aug 2026 12:00:27 +0900 Subject: Add fp_t subtraction --- src/fixed_point.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/fixed_point.cpp b/src/fixed_point.cpp index 7ff77a0..9b2d8e2 100644 --- a/src/fixed_point.cpp +++ b/src/fixed_point.cpp @@ -4,6 +4,10 @@ fp_t fp_t::operator+(const fp_t& other) const { return {(int32_t)((uint32_t)raw + (uint32_t)other.raw)}; } +fp_t fp_t::operator-(const fp_t& other) const { + return {(int32_t)((uint32_t)raw - (uint32_t)other.raw)}; +} + bool fp_t::operator==(const fp_t& other) const { return raw == other.raw; } -- cgit v1.3