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

Precision limit #2

Closed
heroofhyla opened this issue Mar 21, 2022 · 1 comment
Closed

Precision limit #2

heroofhyla opened this issue Mar 21, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@heroofhyla
Copy link
Owner

I'm currently using Godot's built-in Vector2 type to store values for this project. Unfortunately, each component of a Vector2 is a 32-bit float, which significantly limits the possible zoom depth. Normal standalone floats use 64 bits, it's just the vector ones that use 32. This significantly limits the maximum possible zoom in my application.

I previously tried implementing my own BigVector2 type, but it used way more memory than was reasonable, and was much slower than the built-in solution. Maybe I'll try two separate arrays for the real and imaginary components of each number or something.

It looks like Godot 4 may support 64 bit Vector2s as a compile-time flag: godotengine/godot-proposals#892, but I don't know if I want to wait for that to come out.

@heroofhyla heroofhyla added the enhancement New feature or request label Mar 21, 2022
@heroofhyla
Copy link
Owner Author

I wound up going with the "separate arrays for real and imaginary components" route, and it worked fine.

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

No branches or pull requests

1 participant