-
Notifications
You must be signed in to change notification settings - Fork 89
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
Use correct matrix ordering coventions for CFrame #103
Use correct matrix ordering coventions for CFrame #103
Conversation
Turns out the Roblox docs are just totally wrong here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look great, I think more lua tests would be great too. The CFrame.luau
test file is getting pretty large, so we can probably split that out into something like:
> CFrame (dir with luau files inside)
--> test utils
--> constructors
--> instance interactions
--> transforms
--> ...
If you're cool with doing that in this PR too I'll leave it completely up to you how to best structure that and how much to expand the test suite, above is just a sketch
I think I'd like to save this for another PR since it's rather out of scope for this one. Convince yourself that the implementation is correct here and it should be good to merge |
Fine with me - I'll go ahead and merge this and we can improve the test suite later |
Closes #99.
This PR transposes the orientation matrix in a few different places:
CFrame.new(x, y, z, r00, r01, r02, r10, r11, r12, r20, r21, r22)
constructorCFrame:GetComponents
(also removes the negation on the position's Z component, which I thought was fine to include in this PR - let me know if you'd like it separate!)Display
implementation (this makes the output have identical ordering toGetComponents
)From<DomCFrame>
implementationFrom<CFrame>
implementationI'd like to have more test coverage to prevent regressions in the future, particularly for ensuring that values are correct when (de)serializing places/models, but I'm not sure if I should be doing that in the
CFrame
datatype test suite... let me know and I can add them!