Lines Matching defs:lat
212 double lat = coarse.getLatitude();
216 lat = wrapLatitude(lat);
228 // perform lon first whilst lat is still within bounds
229 lon += metersToDegreesLongitude(mOffsetLongitudeMeters, lat);
230 lat += metersToDegreesLatitude(mOffsetLatitudeMeters);
235 lat = wrapLatitude(lat);
249 lat = Math.round(lat / latGranularity) * latGranularity;
250 double lonGranularity = metersToDegreesLongitude(mGridSizeInMeters, lat);
254 lat = wrapLatitude(lat);
258 coarse.setLatitude(lat);
308 private static double wrapLatitude(double lat) {
309 if (lat > MAX_LATITUDE) {
310 lat = MAX_LATITUDE;
312 if (lat < -MAX_LATITUDE) {
313 lat = -MAX_LATITUDE;
315 return lat;
336 private static double metersToDegreesLongitude(double distance, double lat) {
337 return distance / APPROXIMATE_METERS_PER_DEGREE_AT_EQUATOR / Math.cos(Math.toRadians(lat));