(breaking) vec: Rework vec2.to_vec3; add vec3.to_xz #81
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Simplify converting into flat plane math. Often I want to do math on the
ground plane, so it's helpful to easily convert vec3 into vec2 (like for
angle_to).
Remove vec2.to_vec3 so vec3 can depend on vec2 instead and we can do
to_xz and to_xy, which seem far more useful. vec3.from_table(a) is
mostly equivalent to to_vec3, but doesn't accept a value for z.
Add to_table as a pair for from_table and for converting into a
serializable. No vec2.from_table because it's the same as vec2.new.
What do you think about this one? Maybe all the to/from_table should be removed and just add vec3.from_vec2?