Esempio 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;
 }
Esempio 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;
 }
Esempio 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;
 }
Esempio 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;
 }
Esempio 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;
 }
Esempio 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;
 }