-
-
Notifications
You must be signed in to change notification settings - Fork 218
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
Add determinant to Transform2D #770
Add determinant to Transform2D #770
Conversation
7473618
to
fdffe7f
Compare
API docs are being generated and will be shortly available at: https://godot-rust.github.io/docs/gdext/pr-770 |
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.
Thanks a lot!
Enabled the actions on my fork to see how to fix the CI. will write here when I have it passing. |
Hm, not sure why the test fails. Any idea how to run it locally? |
Since it's a 4.0 godot test failing, the best way i think is to:
It may be possible to use |
It's not necessary to run on Godot 4.0. The error is very clear: error[E0599]: no method named `determinant` found for struct `InnerTransform2D` in the current scope
--> itest/rust/src/builtin_tests/geometry/transform2d_test.rs:44:30
|
44 | real::from_f64(inner.determinant()),
| ^^^^^^^^^^^ method not found in `InnerTransform2D<'_>` Then, navigate to Godot 4 I'm fine to just add it for newer Godot versions. You can do this with Please also squash your commits and make sure there's a newline at the end of the |
47202e2
to
52e0ddd
Compare
Oh, so that was it, thanks, thats perfect. Didn't think it would be that simple, thought I had some configuration issue. |
Update transform2d.rs update again, fix error expose the determinant for Transform2D Update transform2d_test.rs lint Update .gitignore fix test update feedback Update transform2d_test.rs Update .gitignore Co-Authored-By: Jan Haller <bromeon@gmail.com>
52e0ddd
to
8573e6f
Compare
@@ -23,3 +23,6 @@ gen | |||
*.bat | |||
config.toml | |||
exp.rs | |||
|
|||
# Mac specific | |||
.DS_Store |
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.
FYI you can add this to your ~/.gitconfig
to avoid needing to add this to every project's .gitignore
[core]
excludesfile = /home/<USER>/.gitignore
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.
And then populate ~/.gitignore
with the relevant ignores
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.
I personally don't really mind this, as it's so common. If it achieves that not every single macOS contributor has to modify their global .gitconfig
, then that's a win in my eyes.
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.
Thanks!
@@ -23,3 +23,6 @@ gen | |||
*.bat | |||
config.toml | |||
exp.rs | |||
|
|||
# Mac specific | |||
.DS_Store |
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.
I personally don't really mind this, as it's so common. If it achieves that not every single macOS contributor has to modify their global .gitconfig
, then that's a win in my eyes.
Add determinant to Transform2D
Thanks! |
Would be nice to have this function. It's also available and public in Godot, as can be seen here: Transform2D. Also, the function can be used to check for Transform2D invalid so that you don't call eg. affine_inverse on an invalid matrix and get an assert.