- the vector normalise() method modifies the object inplace, the normalised function returns a copy. vector vec1(1,2,3); vec1.normalise(); vs vector vec1(1,2,3); vec1 /= mag(vec1) + VSMALL; For const usage, can use either of these const vector vec2a(normalised(vector(1,2,3))); const vector vec2b(vector(1,2,3).normalise()); |
||
---|---|---|
.. | ||
Make | ||
Test-vector.C |