-
- All Implemented Interfaces:
-
org.osmdroid.views.util.constants.MathConstants
public class MyMath implements MathConstants
-
-
Method Summary
Modifier and Type Method Description static doublegudermannInverse(double aLatitude)static doublegudermann(double y)static intmod(int number, int modulus)static longfloorToLong(double pValue)Casting a _negative_ double into a long has a counter-intuitive result.E.g. static intfloorToInt(double pValue)static intgetNextSquareNumberAbove(float factor)static doublegetAngleDifference(double pStart, double pEnd, Boolean pClockwise)static doublecleanPositiveAngle(double pAngle)static doublecomputeAngle(long pX1, long pY1, long pX2, long pY2)static voidcomputeCirclePoint(long pCenterX, long pCenterY, double pRadius, double pAngle, PointL pOutput)-
-
Method Detail
-
gudermannInverse
static double gudermannInverse(double aLatitude)
-
gudermann
static double gudermann(double y)
-
mod
static int mod(int number, int modulus)
-
floorToLong
static long floorToLong(double pValue)
Casting a _negative_ double into a long has a counter-intuitive result.E.g. (long)(-0.4) = 0, though -1 would be expected.Math.floor would be the answer, but I assume we could go faster than (long)Math.floor
-
floorToInt
static int floorToInt(double pValue)
-
getNextSquareNumberAbove
static int getNextSquareNumberAbove(float factor)
-
getAngleDifference
static double getAngleDifference(double pStart, double pEnd, Boolean pClockwise)
- Parameters:
pStart- start anglepEnd- end anglepClockwise- if null, get the smallest difference (in absolute value)if true, go clockwiseif false, go anticlockwise
-
cleanPositiveAngle
static double cleanPositiveAngle(double pAngle)
- Parameters:
pAngle- angle in degree
-
computeAngle
static double computeAngle(long pX1, long pY1, long pX2, long pY2)
-
computeCirclePoint
static void computeCirclePoint(long pCenterX, long pCenterY, double pRadius, double pAngle, PointL pOutput)
- Parameters:
pAngle- clockwise angle, in radian, value 0 being 3 o'clock
-
-
-
-