minor performance patch
This commit is contained in:
parent
715f98c7b1
commit
6bf782bc14
1 changed files with 3 additions and 3 deletions
|
@ -107,9 +107,9 @@ public class OsmNode extends OsmLink implements OsmPos
|
||||||
double l4 = l2 * l2;
|
double l4 = l2 * l2;
|
||||||
double coslat = 1. - l2 + l4 / 6.;
|
double coslat = 1. - l2 + l4 / 6.;
|
||||||
|
|
||||||
double dlat = ( ilat - p.getILat() ) / 1000000.;
|
double dlat = ( ilat - p.getILat() );
|
||||||
double dlon = ( ilon - p.getILon() ) / 1000000. * coslat;
|
double dlon = ( ilon - p.getILon() ) * coslat;
|
||||||
double d = Math.sqrt( dlat * dlat + dlon * dlon ) * 110984.; // 6378000. / 57.3;
|
double d = Math.sqrt( dlat * dlat + dlon * dlon ) * 0.110984; // 6378000. / 57.3;
|
||||||
return (int) ( d + 1.0 );
|
return (int) ( d + 1.0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue