Skip to content

Quaternion identity when using GLM_FORCE_QUAT_DATA_XYZW #1450

Description

@mwlasiuk

I use GLM_FORCE_QUAT_DATA_XYZW for my entire project.

This snippec creates quaternion with w==1 :

const auto y = glm::quat(0, 0, 0, 1);

I would assume that this snippet would create the same quaternion with w==1 :

const auto x = glm::identity<glm::quat>();

But the final result differs:

auto z = x == y; // false
// y = 0, 0, 0, 1
// x = 1, 0, 0, 0

Shouldn't this code take into account whether GLM_FORCE_QUAT_DATA_XYZW is set or not?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions