[style] Magic numbers and modifiers
This commit is contained in:
parent
f25eced9fe
commit
f5a935756b
1 changed files with 5 additions and 3 deletions
|
@ -8,6 +8,8 @@ package fr.u_paris.gla.project.utils;
|
||||||
* @author Emmanuel Bigeon */
|
* @author Emmanuel Bigeon */
|
||||||
public final class GPS {
|
public final class GPS {
|
||||||
|
|
||||||
|
/** The value of a flat angle, in degrees. */
|
||||||
|
private static final int FLAT_ANGLE_DEGREE = 180;
|
||||||
/** The (approximated) earth radius in km. */
|
/** The (approximated) earth radius in km. */
|
||||||
private static final double EARTH_RADIUS = 6_370.0;
|
private static final double EARTH_RADIUS = 6_370.0;
|
||||||
|
|
||||||
|
@ -20,8 +22,8 @@ public final class GPS {
|
||||||
*
|
*
|
||||||
* @param degree the degree value
|
* @param degree the degree value
|
||||||
* @return the radian value */
|
* @return the radian value */
|
||||||
private static final double degreeToRadian(double degree) {
|
private static double degreeToRadian(double degree) {
|
||||||
return degree / 180 * Math.PI;
|
return degree / FLAT_ANGLE_DEGREE * Math.PI;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Compute the flying distance between two GPS positions.
|
/** Compute the flying distance between two GPS positions.
|
||||||
|
|
Reference in a new issue