Skip to content
  • Mark OLESEN's avatar
    ENH: add normalise methods for vectors and normalised function · 71ab8a47
    Mark OLESEN authored
    - 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());
    71ab8a47