/** * <code>subtract</code> subtracts the values of a given vector from those * of this vector creating a new vector object. If the provided vector is * null, an exception is thrown. * * @param vec * the vector to subtract from this vector. * @return the result vector. */ public Vector2f subtract(Vector2f vec) { return subtract(vec, null); }
/** * <code>subtract</code> subtracts the values of a given vector from those * of this vector creating a new vector object. If the provided vector is * null, an exception is thrown. * * @param vec * the vector to subtract from this vector. * @return the result vector. */ public Vector2f subtract(Vector2f vec) { return subtract(vec, null); }
/** * <code>subtract</code> subtracts the values of a given vector from those * of this vector creating a new vector object. If the provided vector is * null, an exception is thrown. * * @param vec * the vector to subtract from this vector. * @return the result vector. */ public Vector2f subtract(Vector2f vec) { return subtract(vec, null); }
public void setLookAt(Vector2f position) { Vector2f pos = getLookAtPoint().subtract(position); cam.setLocation(cam.getLocation().subtract(pos.x, 0, pos.y)); }