///------------------------------------------------------------------------------------------------- /// <summary> Set the magnitude of the given vector. </summary> /// /// <remarks> Jan Tamis, 29-8-2017. </remarks> /// /// <param name="target"> Target for the. </param> /// <param name="len"> The set magnitude. </param> /// /// <returns> A PVector. </returns> public PVector setMag(PVector target, double len) { target.normalize(); target.mult(len); set(target); return(this); }
public void update() { vel.add(acc); pos.add(vel); acc.mult(0); }