本文整理了Java中com.graphhopper.util.Helper.round4()
方法的一些代码示例,展示了Helper.round4()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Helper.round4()
方法的具体详情如下:
包路径:com.graphhopper.util.Helper
类名称:Helper
方法名:round4
暂无
代码示例来源:origin: graphhopper/graphhopper
/**
* Calculate the azimuth in degree for a line given by two coordinates. Direction in 'degree'
* where 0 is north, 90 is east, 180 is south and 270 is west.
*/
public double calcAzimuth(double lat1, double lon1, double lat2, double lon2) {
double orientation = Math.PI / 2 - calcOrientation(lat1, lon1, lat2, lon2);
if (orientation < 0)
orientation += 2 * Math.PI;
return Math.toDegrees(Helper.round4(orientation)) % 360;
}
代码示例来源:origin: com.graphhopper/graphhopper-api
/**
* Calculate the azimuth in degree for a line given by two coordinates. Direction in 'degree'
* where 0 is north, 90 is east, 180 is south and 270 is west.
*/
public double calcAzimuth(double lat1, double lon1, double lat2, double lon2) {
double orientation = Math.PI / 2 - calcOrientation(lat1, lon1, lat2, lon2);
if (orientation < 0)
orientation += 2 * Math.PI;
return Math.toDegrees(Helper.round4(orientation)) % 360;
}
代码示例来源:origin: com.rgi-corp/graphhopper
/**
* Calculate the azimuth in degree for a line given by two coordinates. Direction in 'degree'
* where 0 is north, 90 is east, 180 is south and 270 is west.
*/
public double calcAzimuth(double lat1, double lon1, double lat2, double lon2) {
double orientation = Math.PI / 2 - calcOrientation(lat1, lon1, lat2, lon2);
if (orientation < 0)
orientation += 2 * Math.PI;
return Math.toDegrees(Helper.round4(orientation));
}
代码示例来源:origin: com.graphhopper/graphhopper
/**
* Calculate the azimuth in degree for a line given by two coordinates. Direction in 'degree'
* where 0 is north, 90 is east, 180 is south and 270 is west.
*/
double calcAzimuth( double lat1, double lon1, double lat2, double lon2 )
{
double orientation = -calcOrientation(lat1, lon1, lat2, lon2);
orientation = Helper.round4(orientation + Math.PI / 2);
if (orientation < 0)
orientation += 2 * Math.PI;
return Math.toDegrees(orientation);
}
内容来源于网络,如有侵权,请联系作者删除!