code: public Quaternion fromVectors (IVector3 from, IVector3 to) {
          float angle = from.angle(to);
          if (angle < MathUtil.EPSILON) {
              return set(IDENTITY);
          }
          if (angle <= FloatMath.PI - MathUtil.EPSILON) {
              return fromAngleAxis(angle, from.cross(to).normalizeLocal());
          }
          // it's a 180 degree rotation; any axis orthogonal to the from vector will do
          Vector3 axis = new Vector3(0f, from.z(), -from.y());
          float length = axis.length();
          return fromAngleAxis(FloatMath.PI, length < MathUtil.EPSILON ?
                               axis.set(-from.z(), 0f, from.x()).normalizeLocal() :
                               axis.multLocal(1f / length));
      }
docs: Sets this quaternion to the rotation of the first normalized vector onto the second.
  
  @return a reference to this quaternion, for chaining.