Replies: 2 comments 1 reply
-
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Moved to discussions as I prefer to deal with feature suggestions this way. For this one I'm inclined to not add this. In part, I think it would be hard to come up with a meaningful method name that clearly documents what it does. It's also not a huge saving for users. Implementation wise it is cheaper to do let top_left: Vec3 = transform.translation - the_scale / 2.;
let top_right: Vec3 = top_left + Vec3::new(the_scale.x, 0.0, 0.0);
let bottom_left: Vec3 = top_left + Vec3::new(0.0, the_scale.y, 0.0);
let bottom_right: Vec3 = top_left + the_scale; |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
eg
And similar for all components for all applicable vector types.
The motivation was to make intent slightly clearer in code like the following bevy system:
Would you accept a PR along these lines?
Another alternative would be a trait based approach, like so:
Beta Was this translation helpful? Give feedback.
All reactions