/** * Multiply the given matrix <code>mat</code> with this Vector4f, perform perspective division. * * @param mat * the matrix to multiply this vector by * @return a vector holding the result */ public Vector4f mulProject(Matrix4fc mat) { return mulProject(mat, thisOrNew()); }
/** * Multiply all components of this {@link Vector4f} by the given scalar * value. * * @param scalar * the scalar to multiply by * @return a vector holding the result */ public Vector4f mul(float scalar) { return mul(scalar, thisOrNew()); }
/** * Set each component of this vector to the smallest (closest to negative * infinity) {@code float} value that is greater than or equal to that * component and is equal to a mathematical integer. * * @return a vector holding the result */ public Vector4f ceil() { return ceil(thisOrNew()); }
/** * Add the component-wise multiplication of <code>a * b</code> to this vector. * * @param a * the first multiplicand * @param b * the second multiplicand * @return a vector holding the result */ public Vector4f fma(Vector4fc a, Vector4fc b) { return fma(a, b, thisOrNew()); }
/** * Multiply this Vector4f component-wise by another Vector4f. * * @param v * the other vector * @return a vector holding the result */ public Vector4f mul(Vector4fc v) { return mul(v, thisOrNew()); }
/** * Multiply the given matrix mat with this Vector4f and store the result in * <code>this</code>. * * @param mat * the matrix to multiply the vector with * @return a vector holding the result */ public Vector4f mul(Matrix4x3fc mat) { return mul(mat, thisOrNew()); }
/** * Set each component of this vector to the largest (closest to positive * infinity) {@code float} value that is less than or equal to that * component and is equal to a mathematical integer. * * @return a vector holding the result */ public Vector4f floor() { return floor(thisOrNew()); }
/** * Set each component of this vector to the closest float that is equal to * a mathematical integer, with ties rounding to positive infinity. * * @return a vector holding the result */ public Vector4f round() { return round(thisOrNew()); }
/** * Subtract the supplied vector from this one. * * @param v * the vector to subtract * @return a vector holding the result */ public Vector4f sub(Vector4fc v) { return sub(v, thisOrNew()); }
/** * Add the component-wise multiplication of <code>a * b</code> to this vector. * * @param a * the first multiplicand * @param b * the second multiplicand * @return a vector holding the result */ public Vector4f fma(float a, Vector4fc b) { return fma(a, b, thisOrNew()); }
/** * Rotate this vector by the given quaternion <code>quat</code> and store the result in <code>this</code>. * * @see Quaternionf#transform(Vector4f) * * @param quat * the quaternion to rotate this vector * @return a vector holding the result */ public Vector4f rotate(Quaternionfc quat) { return rotate(quat, thisOrNew()); }
/** * Divide all components of this {@link Vector4f} by the given scalar * value. * * @param scalar * the scalar to divide by * @return a vector holding the result */ public Vector4f div(float scalar) { return div(scalar, thisOrNew()); }
/** * Normalizes this vector. * * @return a vector holding the result */ public Vector4f normalize() { return normalize(thisOrNew()); }
/** * Set all components to zero. * * @return a vector holding the result */ public Vector4f zero() { Vector4f dest = thisOrNew(); MemUtil.INSTANCE.zero(dest); return dest; }
/** * Multiply the given matrix mat with this Vector4f and store the result in * <code>this</code>. * * @param mat * the matrix to multiply the vector with * @return a vector holding the result */ public Vector4f mul(Matrix4fc mat) { return mul(mat, thisOrNew()); }
/** * Multiply the given matrix <code>mat</code> with this Vector4f, perform perspective division. * * @param mat * the matrix to multiply this vector by * @return a vector holding the result */ public Vector4f mulProject(Matrix4fc mat) { return mulProject(mat, thisOrNew()); }
/** * Multiply all components of this {@link Vector4f} by the given scalar * value. * * @param scalar * the scalar to multiply by * @return a vector holding the result */ public Vector4f mul(float scalar) { return mul(scalar, thisOrNew()); }
/** * Normalize this vector by computing only the norm of <code>(x, y, z)</code>. * * @return a vector holding the result */ public Vector4f normalize3() { return normalize3(thisOrNew()); }
/** * Set each component of this vector to the closest float that is equal to * a mathematical integer, with ties rounding to positive infinity. * * @return a vector holding the result */ public Vector4f round() { return round(thisOrNew()); }
/** * Set all components to zero. * * @return a vector holding the result */ public Vector4f zero() { Vector4f dest = thisOrNew(); MemUtil.INSTANCE.zero(dest); return dest; }