Skip to content

Commit 9c37568

Browse files
committed
introduce negate()
1 parent 19dcde8 commit 9c37568

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/main/java/org/comroid/api/data/Vector.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,10 @@ default N4 as4() {
255255
return (N4) this;
256256
}
257257

258+
default Vector negate() {
259+
return map(x -> -x);
260+
}
261+
258262
private static UnsupportedOperationException outOfBounds(int n) {
259263
return new UnsupportedOperationException("Unsupported Vector dimension: " + n);
260264
}

0 commit comments

Comments
 (0)