Exemplo n.º 1
0
 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;
 }
Exemplo n.º 2
0
 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;
 }
Exemplo n.º 3
0
 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;
 }
Exemplo n.º 4
0
 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;
 }
Exemplo n.º 5
0
 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;
 }
Exemplo n.º 6
0
 @Override
 protected ThreeAxisValue clone() {
   ThreeAxisValue clone = new ThreeAxisValue();
   clone.x = this.x;
   clone.y = this.y;
   clone.z = this.z;
   return clone;
 }