-
-
Notifications
You must be signed in to change notification settings - Fork 934
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
feat: Add reusable vector to the Vector2 extension #2429
feat: Add reusable vector to the Vector2 extension #2429
Conversation
double ds, | ||
) { | ||
double ds, { | ||
Vector2? efficientDiff, |
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.
Maybe we could just have a private static vector in here instead so that the user doesn't have to pass in this vector?
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.
That's a great idea!
What do you think about sharing it inside the extension by naming it generally?
It might be useful when there is some point to save performance same as moveToTarget
.
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.
Sounds good :)
Co-authored-by: Lukas Klingsbo <[email protected]>
Description
Add a reusable static member which is Vector for reducing object(Vector2) creation overheads if available.
Checklist
docs
and added dartdoc comments with///
.examples
ordocs
.Breaking Change?
Related Issues
Closes #2427