def unit(self): '''Normalize this vector to unit length. @return: Normalized vector (L{Nvector}). ''' if self._united is None: u = Vector3d.unit(self) # .copy() self._united = u._united = _xattrs(u, self, '_h') return self._united
def unit(self, ll=None): '''Normalize this vector to unit length. @keyword ll: Optional, original latlon (C{LatLon}). @return: Normalized vector (L{Nvector}). ''' if self._united is None: u = Vector3d.unit(self, ll=ll) # .copy() self._united = u._united = _xattrs(u, self, '_h') return self._united
def unit(self): '''Normalize this vector to unit length. @return: Normalised, unit vector (L{Nvector}). ''' if self._united is None: u = Vector3d.unit(self).copy() if u.h != self.h: u.h = self.h self._united = u._united = u return self._united