{"repo":"stormmuller/fixed-point-types","free":true,"listed":false,"github":"https://github.com/stormmuller/fixed-point-types","clone":"git clone https://github.com/stormmuller/fixed-point-types.git","description":"A C# library for fixed point numbers","language":"C#","stars":54,"topics":["fixed-point","lockstep","unity","game-development","unity3d"],"license":"MIT","category":"game-templates","readme_excerpt":"Fixed Point Types A library created to provide fixed point numeric types for use cases where floating point numbers just won't cut it. Jump straight to usage When would you want to use fixed point numbers over floating point numbers? Are fixed point numbers faster than floating point numbers? Not really, dedicated FPUs in most modern processors actually make floating point operations faster than fixed point operations. Are fixed point numbers more precise than floating point numbers? No, sometimes fixed point numbers are less precise than floating point numbers. But also this can vary based on the scale the developer chooses. Do fixed point numbers have a larger range than floating point numbers? Nope, not when using the same amount of bits when storing the fixed point number anyway. This is actually a huge advantage of floating point numbers. So why would you want to use fixed point numbers? Fixed point numbers are deterministic. This is really useful for things like simulations where results need to be perfectly replicable. I originally created this library to create a game using a deterministic lockstep networking model. But There are many different applications for fixed point numbers. Usage Install the nuget package OR Include the Fixed32.cs (Or the entire FixedTypes.csproj ) file in your solution. To initialize a new fixed point number: The 16 passed to constructor is the scale of the number. It basically specifies how many bits should be used to store the characteristi","default_branch":null,"files":null,"tree":[],"storefront":"/r/stormmuller","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/stormmuller/fixed-point-types/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}