-
-
Notifications
You must be signed in to change notification settings - Fork 212
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
Sum, Product implementations for Iterator<Vector*> #666
Sum, Product implementations for Iterator<Vector*> #666
Conversation
API docs are being generated and will be shortly available at: https://godot-rust.github.io/docs/gdext/pr-666 |
f872e32
to
6dcddd3
Compare
There also should be a docstring explaining this is all element-wise since that's not obvious for Product. Not that dot- or cross-product would make any sense for this, but those are what I'd think of first as being Vector * Vector multiplication. Presently, there is no Also no need to qualify that glam does element-wise multiplication; Godot does as well. |
6dcddd3
to
521291b
Compare
Thanks, I've made these changes.
|
Add implementations for `std::iter::Sum` and `std::iter::Product` for the Vector (and IVector) types. Note both operations are element-wise (this comes from glam). Due to there being multiple Add and Mul implementations (ultimately in glam), I noticed having to specify types explicitly in some circumstances. I imagine this can probably be improved but I am not an expert on generic programming.
521291b
to
13307df
Compare
Thank you, and congrats to your first merged PR! 🚀 |
Add implementations for
std::iter::Sum
andstd::iter::Product
for the Vector (and IVector) types.Note both operations are element-wise (this comes from glam).
Due to there being multiple Add and Mul implementations (ultimately in glam), I noticed having to specify types explicitly in some circumstances. I imagine this can probably be improved but I am not an expert on generic programming.