kvark / mint

Math Interoperability Types
MIT License
256 stars 20 forks source link

Fix Quaternion memory layout #50

Closed aloucks closed 4 years ago

aloucks commented 4 years ago

The Quaternion memory layout is now [x, y, z, w] (i.e. scalar at the end). This is consistent with the Into trait implementation and also consistent with other libraries (such as GLM) and the GLTF spec.

Fixes #49

aloucks commented 4 years ago

@kvark I don't think bors is hooked up (based on your previous comments on another PR)

Ralith commented 4 years ago

I wonder if this can be considered a breaking change...

I think this is a breaking change iff sufficiently strong guarantees are asserted by the documentation to permit nontrivial sound transmutes. There's a reasonable argument that #[repr(C)], which shows up in rustdoc, constitutes such a guarantee. On the other hand, I suspect nobody will be affected, and it'd be nice to not break everything.

kvark commented 4 years ago

I think we can take that risk, with the gain of disrupting less of existing "safe" users. Ready to yank it if reports prove that to be a bad idea :) r? https://github.com/kvark/mint/pull/53 @aloucks @Ralith

aloucks commented 4 years ago

Is there any downside to bumping the minor version?

EDIT: Ah, I saw this before I saw it was released. Nevermind about the version!