Skip to content

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

@thedarkcolour
Copy link
Owner

I just overhauled the project setup, you'll have to remake your PR

@alegian alegian marked this pull request as draft May 7, 2025 13:53
@thedarkcolour
Copy link
Owner

You can add loader-agnostic Minecraft extensions under the kfflib.common source set. https://github.com/thedarkcolour/KotlinForForge/tree/5.x/src/kfflib/common/kotlin/thedarkcolour/kotlinforforge/forge/vectorutil

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.

2 participants