def others(self, other, name='other'): '''Refined class comparison. @param other: The other vector (L{Vector3d}). @keyword name: Optional, other's name (C{str}). @raise TypeError: Incompatible I{other} C{type}. ''' try: VectorBased.others(self, other, name=name) except TypeError: if not isinstance(other, Vector3d): raise
def __init__(self, x, y, z, ll=None, name=''): '''New 3-D vector. The vector may be normalised, or use x/y/z values for height relative to the surface of the sphere or ellipsoid, distance from earth centre, etc. @param x: X component of vector (C{scalar}). @param y: Y component of vector (C{scalar}). @param z: Z component of vector (C{scalar}). @keyword ll: Optional, original latlon (C{LatLon}). @keyword name: Optional name (C{str}). ''' VectorBased.__init__(self, name=name) self._x = x self._y = y self._z = z if ll: self._fromll = ll