Skip to content

Commit

Permalink
fix area parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
burdoto committed May 21, 2024
1 parent 751c93c commit ce7b678
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/main/java/org/comroid/api/data/Vector.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import lombok.NoArgsConstructor;
import lombok.experimental.FieldDefaults;
import org.comroid.api.info.Assert;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.Contract;

import java.util.Arrays;
Expand Down Expand Up @@ -223,6 +224,11 @@ public int n() {
return 2;
}

@ApiStatus.Experimental
public N3 to3(double z) {
return new N3(x, y, z);
}

@Override
public double[] toArray() {
return new double[]{x, y};
Expand Down Expand Up @@ -284,6 +290,11 @@ public int n() {
return 3;
}

@ApiStatus.Experimental
public N4 to4(double w) {
return new N4(x, y, z, w);
}

@Override
public double[] toArray() {
return new double[]{x, y, z};
Expand Down

0 comments on commit ce7b678

Please sign in to comment.