π Floating-Point Arithmetic β An Introduction (1/2) (Patreon)
Content
Hi everyone!
As a developer with a strong passion for gravity simulators, I often find myself in trouble due to the limited precision that languages such as C# offer. If you are a Unity developer, you probably know that most of Unity's back-end uses float variables, which have very limited precision.
This can be particularly tricky if you are trying to create an open-world or racing game. The further you travel from the origin, the messier stuff gets.

For this reason, I started a two-part series that introduced floating-point arithmetic, and shows how to improve its precision. The first post is already available:
In the second part, I explain how to create an even more precise floating-point type, which you can use for simulations. While not perfect, it is a good compromise compared to much slower C# libraries. You can download the library here.
I am more than happy to hear your thoughts on this, especially if you have any other ideas on how to improve the precision of real numbers in your games!
π§π»
Files
Previews only