Skip to content

Commit

Permalink
Add signum operator to Vec
Browse files Browse the repository at this point in the history
  • Loading branch information
Minikloon authored and iam4722202468 committed May 30, 2024
1 parent 406c686 commit d46c626
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main/java/net/minestom/server/coordinate/Vec.java
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,12 @@ public interface Operator {
Math.floor(z)
);

Operator SIGNUM = (x, y, z) -> new Vec(
Math.signum(x),
Math.signum(y),
Math.signum(z)
);

@NotNull Vec apply(double x, double y, double z);
}

Expand Down

0 comments on commit d46c626

Please sign in to comment.