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