pike.git / lib / modules / Geography.pmod / Position.pike

version» Context lines:

pike.git/lib/modules/Geography.pmod/Position.pike:580:      //!   int __hash()   {    return (int)(lat*3600000+long*3600000);   }      //!   int `==(object pos)   { -  return (pos->lat==lat && pos->long==long); +  return (objectp(pos) && pos->lat==lat && pos->long==long);   }      //!   int `<(object pos)   {    if (pos->lat>lat) return 1;    else if (pos->lat==lat && pos->long>long) return 1;    return 0;   }   
pike.git/lib/modules/Geography.pmod/Position.pike:614:   }      //! Calculate the euclidian distance between two Geography.Position.   //! Result is in meter. This uses the ECEF function.   float euclidian_distance(this_program p)   {    return sqrt(`+(@map(Array.sum_arrays(    `-,ECEF(),p->ECEF()),    lambda(float f) { return f*f; })));   } +  + // encoder + array(float) _encode() { return ({lat,long,alt}); } + void _decode(array(float) v) { create(@v); }