git clone https://[email protected]/p/fixedpoint/
source browse./test2 1.1 1.2
sizeof fixed_t = 12..12 bytes
a = 1.1
b = 1.2
a+b = 2.3
a-b = -0.1
a*b = 1.32
-a = -1.1
b++ = 1.3
a[4] = 1.1000 ... operator precision
a/b = 0.9
a.whole() = 1
is a == b? no
is a != b? yes
is a < b? yes
is a <= b? yes
is a > b? no
is a >= b? no
to summarize, this library make possible to use a fixed point type as natural as the floating point type
to make that, it defines a class and then it uses the C++ overload feature in order to redefine operators {+,-,*,/, ...}
enjoy =)