public Vector3f project(Vector3f other) {
        float n = this.dot(other); // A . B
        float d = other.lengthSquared(); // |B|^2
        return new Vector3f(other).multLocal(n / d);
    }
Projects onto the argument and returns the result as a new vector. The
current instance is unaffected.

@param other the vector to project onto (not null, unaffected)
@return a new Vector3f
jme3-core/src/main/java/com/jme3/math/Vector3f.java