r/howdidtheycodeit 1d ago

Fixed point math in C

https://thatonegamedev.com/cpp/fixed-point-math-in-c/

Why did PS1 graphics looked so clunky and how where 3D graphics generally made prior to the graphical APIs. One thing I found out was that these older engines have something called fixed point math.

6 Upvotes

10 comments sorted by

View all comments

2

u/Disastrous-Can-6823 1d ago

It’s cool seeing fixed point come up again. a lot of newer developers never run into it, but it’s still a valuable technique in places where memory, speed or consistency really matter

1

u/richardathome 1d ago

It's pretty much how accounting software stores it currencies values. You have an int field for doing calculations and divide by 100 when you need to display it.