Skip to content

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

Open
@liufangyuan247

Description

@liufangyuan247

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions