Skip to content
Snippets Groups Projects
Commit 88717862 authored by Vojtech Moravec's avatar Vojtech Moravec
Browse files

Utility cast functions.

parent eb7270c6
Branches
No related tags found
No related merge requests found
...@@ -49,4 +49,8 @@ public class V2i { ...@@ -49,4 +49,8 @@ public class V2i {
public V2l toV2l() { public V2l toV2l() {
return new V2l(x, y); return new V2l(x, y);
} }
public V3i toV3i() {
return new V3i(x, y, 1);
}
} }
...@@ -11,6 +11,10 @@ public class V3i { ...@@ -11,6 +11,10 @@ public class V3i {
this.z = z; this.z = z;
} }
public V3i(final int x, final int y) {
this(x,y,1);
}
public V3i(final int universalValue) { public V3i(final int universalValue) {
this(universalValue, universalValue, universalValue); this(universalValue, universalValue, universalValue);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment