public ThreeAxisValue scale(float scalar) { ThreeAxisValue newVal = new ThreeAxisValue(); newVal.x = scalar * this.x; newVal.y = scalar * this.y; newVal.z = scalar * this.z; return newVal; }
public ThreeAxisValue element_div(ThreeAxisValue value) { ThreeAxisValue newVal = new ThreeAxisValue(); newVal.x = this.x / value.x; newVal.y = this.y / value.y; newVal.z = this.z / value.z; return newVal; }
public ThreeAxisValue element_mult(ThreeAxisValue value) { ThreeAxisValue newVal = new ThreeAxisValue(); newVal.x = this.x * value.x; newVal.y = this.y * value.y; newVal.z = this.z * value.z; return newVal; }
public ThreeAxisValue subtract(ThreeAxisValue value) { ThreeAxisValue newVal = new ThreeAxisValue(); newVal.x = this.x - value.x; newVal.y = this.y - value.y; newVal.z = this.z - value.z; return newVal; }
public ThreeAxisValue add(ThreeAxisValue value) { ThreeAxisValue newVal = new ThreeAxisValue(); newVal.x = this.x + value.x; newVal.y = this.y + value.y; newVal.z = this.z + value.z; return newVal; }
@Override protected ThreeAxisValue clone() { ThreeAxisValue clone = new ThreeAxisValue(); clone.x = this.x; clone.y = this.y; clone.z = this.z; return clone; }