Exemple #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);
 }
Exemple #2
0
 /**
  * Creates a copy of the given vector.
  *
  * @param vec Vector to copy
  */
 public Vector(Vector vec) {
   set(vec);
   this.cachedMagnitude = vec.cachedMagnitude;
 }
Exemple #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;
 }