com.graphhopper.util.Helper.round4()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(1.9k)|赞(0)|评价(0)|浏览(145)

本文整理了Java中com.graphhopper.util.Helper.round4()方法的一些代码示例,展示了Helper.round4()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Helper.round4()方法的具体详情如下:
包路径:com.graphhopper.util.Helper
类名称:Helper
方法名:round4

Helper.round4介绍

暂无

代码示例

代码示例来源:origin: graphhopper/graphhopper

  1. /**
  2. * Calculate the azimuth in degree for a line given by two coordinates. Direction in 'degree'
  3. * where 0 is north, 90 is east, 180 is south and 270 is west.
  4. */
  5. public double calcAzimuth(double lat1, double lon1, double lat2, double lon2) {
  6. double orientation = Math.PI / 2 - calcOrientation(lat1, lon1, lat2, lon2);
  7. if (orientation < 0)
  8. orientation += 2 * Math.PI;
  9. return Math.toDegrees(Helper.round4(orientation)) % 360;
  10. }

代码示例来源:origin: com.graphhopper/graphhopper-api

  1. /**
  2. * Calculate the azimuth in degree for a line given by two coordinates. Direction in 'degree'
  3. * where 0 is north, 90 is east, 180 is south and 270 is west.
  4. */
  5. public double calcAzimuth(double lat1, double lon1, double lat2, double lon2) {
  6. double orientation = Math.PI / 2 - calcOrientation(lat1, lon1, lat2, lon2);
  7. if (orientation < 0)
  8. orientation += 2 * Math.PI;
  9. return Math.toDegrees(Helper.round4(orientation)) % 360;
  10. }

代码示例来源:origin: com.rgi-corp/graphhopper

  1. /**
  2. * Calculate the azimuth in degree for a line given by two coordinates. Direction in 'degree'
  3. * where 0 is north, 90 is east, 180 is south and 270 is west.
  4. */
  5. public double calcAzimuth(double lat1, double lon1, double lat2, double lon2) {
  6. double orientation = Math.PI / 2 - calcOrientation(lat1, lon1, lat2, lon2);
  7. if (orientation < 0)
  8. orientation += 2 * Math.PI;
  9. return Math.toDegrees(Helper.round4(orientation));
  10. }

代码示例来源:origin: com.graphhopper/graphhopper

  1. /**
  2. * Calculate the azimuth in degree for a line given by two coordinates. Direction in 'degree'
  3. * where 0 is north, 90 is east, 180 is south and 270 is west.
  4. */
  5. double calcAzimuth( double lat1, double lon1, double lat2, double lon2 )
  6. {
  7. double orientation = -calcOrientation(lat1, lon1, lat2, lon2);
  8. orientation = Helper.round4(orientation + Math.PI / 2);
  9. if (orientation < 0)
  10. orientation += 2 * Math.PI;
  11. return Math.toDegrees(orientation);
  12. }

相关文章