mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-04-23 08:38:51 +00:00
add zero and unit vectors
This commit is contained in:
@@ -14,8 +14,9 @@ import com.dfsek.terra.api.util.MathUtil;
|
|||||||
* oh yeah
|
* oh yeah
|
||||||
*/
|
*/
|
||||||
public class Vector2 {
|
public class Vector2 {
|
||||||
protected double x;
|
private static final Vector2 ZERO = new Vector2(0, 0);
|
||||||
protected double z;
|
private static final Vector2 UNIT = new Vector2(0, 1);
|
||||||
|
protected double x, z;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a vector with a given X and Z component
|
* Create a vector with a given X and Z component
|
||||||
|
|||||||
@@ -9,8 +9,7 @@ import com.dfsek.terra.api.util.Rotation;
|
|||||||
public class Vector2Int {
|
public class Vector2Int {
|
||||||
private static final Vector2Int ZERO = new Vector2Int(0, 0);
|
private static final Vector2Int ZERO = new Vector2Int(0, 0);
|
||||||
private static final Vector2Int UNIT = new Vector2Int(0, 1);
|
private static final Vector2Int UNIT = new Vector2Int(0, 1);
|
||||||
protected int x;
|
protected int x, z;
|
||||||
protected int z;
|
|
||||||
|
|
||||||
protected Vector2Int(int x, int z) {
|
protected Vector2Int(int x, int z) {
|
||||||
this.x = x;
|
this.x = x;
|
||||||
|
|||||||
@@ -13,9 +13,9 @@ import com.dfsek.terra.api.util.MathUtil;
|
|||||||
|
|
||||||
|
|
||||||
public class Vector3 {
|
public class Vector3 {
|
||||||
protected double x;
|
private static final Vector3 ZERO = new Vector3(0, 0, 0);
|
||||||
protected double y;
|
private static final Vector3 UNIT = new Vector3(0, 1, 0);
|
||||||
protected double z;
|
protected double x, y, z;
|
||||||
|
|
||||||
private Vector3(double x, double y, double z) {
|
private Vector3(double x, double y, double z) {
|
||||||
this.x = x;
|
this.x = x;
|
||||||
|
|||||||
Reference in New Issue
Block a user