-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Fix example for Basis * Vector3 in documentation #92117
Fix example for Basis * Vector3 in documentation #92117
Conversation
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.
Although I'd be more in favour of correcting the "Prints" statement, this is correct, too. Thank you for cleaning after me.
Any specific reason? var my_basis = Basis(Vector3(1, 1, 1), Vector3(1, 1, 1), Vector3(0, 2, 5))
print(my_basis * Vector3(1, 2, 3)) # Prints (3, 9, 18) or a hybrid that just barely changes the inputs to make them different var my_basis = Basis(Vector3(1, 1, 1), Vector3(1, -1, 1), Vector3(0, 2, 5))
print(my_basis * Vector3(1, 2, 3)) # Prints (3, 5, 18) or to some new example like # Basis that swaps the x/z axis and doubles the scale
var my_basis = Basis(Vector3(0, 2, 0), Vector3(2, 0, 0), Vector3(0, 0, 2))
print(my_basis * Vector3(1,2,3)) # Prints (4, 2, 6) |
It is mostly to keep the numbers simpler and easier to digest (although a transformation is anything but simple at a glance). I like the new example you proposed. |
I rebased the PR to fix the (temporary) CI issue, and did the couple tweaks I had suggested while at it. |
Thanks! And congrats for your first merged Godot contribution 🎉 |
Description
This MR fixes an invalid example in the Basis documentation, fixes godotengine/godot-docs#9394
I opted to change the inputs instead of the outputs, because it seemed strange to have two identical basis vectors. Plus this allows some of the inputs to be negative
Actions performed