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

More Syntactic Sugar for Vecs #113

Open
wants to merge 1 commit into
base: 5.x
Choose a base branch
from
Open

Conversation

alegian
Copy link

@alegian alegian commented Jan 8, 2025

defines the infix function cross for Vec3 and Vec3i.

val example = vector1 cross vector2

These extension crosses all fallback to the underlying class for implementation.

All other vector util classes seemed incompatible:

  • Vec2 does not make sense mathematically
  • Vector4dc, Vector4fc, Vector3dc and Vector3fc implement cross in a slightly awkward way which cannot be infixed: this.cross(other, dest), and I decided to not overload it

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