Ejemplo n.º 1
0
 /**
  * Creates using the coordinates (x, y, z).
  *
  * @param x X-position of the new vector
  * @param y Y-position of the new vector
  * @param z Z-position of the new vector
  */
 public Vector(double x, double y, double z) {
   set(x, y, z);
 }
Ejemplo n.º 2
0
 /**
  * Creates a copy of the given vector.
  *
  * @param vec Vector to copy
  */
 public Vector(Vector vec) {
   set(vec);
   this.cachedMagnitude = vec.cachedMagnitude;
 }
Ejemplo n.º 3
0
 /**
  * Set this vector to the given vector.
  *
  * @param vec Vector to set to
  * @return this
  */
 public Vector set(Vector vec) {
   set(vec.x(), vec.y(), vec.z());
   return this;
 }