예제 #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;
 }
예제 #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;
 }
예제 #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;
 }
예제 #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;
 }
예제 #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;
 }
예제 #6
0
 @Override
 protected ThreeAxisValue clone() {
   ThreeAxisValue clone = new ThreeAxisValue();
   clone.x = this.x;
   clone.y = this.y;
   clone.z = this.z;
   return clone;
 }