Remove last use of rc.coslat

This commit is contained in:
Phyks (Lucas Verney) 2018-12-07 09:15:03 +01:00
parent 780e865870
commit 34f5258f5e

View file

@ -346,9 +346,9 @@ abstract class OsmPath implements OsmLinkHolder
if ( rc.startDirectionValid ) if ( rc.startDirectionValid )
{ {
double dir = rc.startDirection.intValue() / CheapRulerSingleton.DEG_TO_RAD; double dir = rc.startDirection.intValue() / CheapRulerSingleton.DEG_TO_RAD;
double coslat = Math.cos(lat1); double[] lonlat2m = CheapRulerSingleton.getLonLatToMeterScales( lat1 );
lon0 = lon1 - (int) ( 1000. * Math.sin( dir ) / coslat ); lon0 = lon1 - (int) ( 1000. * Math.sin( dir ) / lonlat2m[0] );
lat0 = lat1 - (int) ( 1000. * Math.cos( dir ) ); lat0 = lat1 - (int) ( 1000. * Math.cos( dir ) / lonlat2m[1] );
} }
else else
{ {