Open johanhelsing opened 2 years ago
I did consider this while writing GridCoords
initially. I think I decided against it at the time because it was unclear to me whether this sort of pattern was accepted by the rust community. However, since the bevy 0.7 blog post explicitly encouraged it, I think it's fine.
I still think it's probably a good idea to keep a lot of the conversion functions in utils
operating on GridCoords
instead of IVec2
, just to be more explicit about their purpose in the typing.
I was just wondering about whether it might be better to wrap IVec2 instead.
Might save some of the re-implementation of arithmetic operators and make it easier to make use of IVec2's helper methods without doing
IVec2::from
or.into()
all the time.