Zuzu-Typ / PyGLM

Fast OpenGL Mathematics (GLM) for Python
zlib License
214 stars 29 forks source link

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

Open liufangyuan247 opened 4 months ago

liufangyuan247 commented 4 months ago

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