blob: 9b2d8e2a96a257ca886e3f7e9078fa0366499226 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
#include "fixed_point.h"
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;
}
|