Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there a plan to support fixed32? #15

Open
dannisliang opened this issue Oct 31, 2024 · 1 comment
Open

Is there a plan to support fixed32? #15

dannisliang opened this issue Oct 31, 2024 · 1 comment

Comments

@dannisliang
Copy link

Is there a plan to support fixed32?

@mrdav30
Copy link
Owner

mrdav30 commented Nov 1, 2024

Supporting Fixed32 is an interesting idea and could be beneficial in scenarios where memory efficiency is crucial, such as mobile applications or games. Currently, FixedMathSharp leverages Fixed64 (the underlying value is a long, which is a 64-bit value, hence the name) to ensure high precision and a larger range for computations. I built this specifically for a deterministic physics engine.

Adding Fixed32 would require careful consideration of range and precision trade-offs, as a Fixed32 would inherently have a smaller range and lower precision than Fixed64. I’d need to rework some of the logic and rounding methods to suit the 32-bit format while maintaining accuracy.

I'm open to exploring Fixed32 support if there’s enough interest. If you or the community would benefit from this, please feel free to reach out or contribute ideas. I’d love to hear more about specific use cases where Fixed32 would be a valuable addition!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants