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

glm.dvec3 initialized from an array loses precision. #233

Open
liufangyuan247 opened this issue Jul 26, 2024 · 0 comments
Open

glm.dvec3 initialized from an array loses precision. #233

liufangyuan247 opened this issue Jul 26, 2024 · 0 comments

Comments

@liufangyuan247
Copy link

liufangyuan247 commented Jul 26, 2024

glm version: 2.7.1

test code:

>>> import glm
>>> data = [1000000.1234, 20000000.1234, 3000000.1234]
>>> a = glm.dvec3(data)
>>> b = glm.dvec3(*data)
>>> a-b
dvec3( 0.0016, -0.1234, -0.1234 )
>>> print(a.x, a.y, a.z)
1000000.125 20000000.0 3000000.0
>>> print(b.x, b.y, b.z)
1000000.1234 20000000.1234 3000000.1234

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

1 participant