Skip to content
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

Convert vector code from cgmath to euclid. #402

Merged
merged 3 commits into from
Sep 13, 2023
Merged

Convert vector code from cgmath to euclid. #402

merged 3 commits into from
Sep 13, 2023

Conversation

kpreid
Copy link
Owner

@kpreid kpreid commented Sep 13, 2023

Gains:

  • Potential no_std compatibility.
  • Direct bytemuck and arbitrary implementations for vectors.
  • Unit-of-measure system to distinguish coordinate spaces without newtypes.
  • We may be able to get rid of GridMatrix because euclid::Transform3D doesn't mind integers. (I haven't tried that yet.)
  • A more actively maintained dependency.

Losses:

  • The vector types have an extra _unit field making pattern matching awkward.
  • No angle-in-degrees type and operations.
  • No Vector4.
  • No suitable perspective projection function.
  • No map() and zip() methods, so we need an extension trait (but on average fewer traits needed).
  • Unit-of-measure system might be more trouble than it's worth.

There are a number of loose ends from this migration, which have been marked with the keyword "TODO(euclid migration)".

There are a number of loose ends from this migration, which have been
marked with the keyword "TODO(euclid migration)".
@kpreid kpreid merged commit ff0cc4d into main Sep 13, 2023
10 checks passed
@kpreid kpreid deleted the euclid branch September 13, 2023 02:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant