org.osmdroid.util.MyMath Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of osmdroid-android Show documentation
Show all versions of osmdroid-android Show documentation
An Android library to display OpenStreetMap views.
// Created by plusminus on 20:36:01 - 26.09.2008
package org.osmdroid.util;
import org.osmdroid.views.util.constants.MathConstants;
/**
*
* @author Nicolas Gramlich
*
*/
public class MyMath implements MathConstants {
// ===========================================================
// Constants
// ===========================================================
// ===========================================================
// Fields
// ===========================================================
// ===========================================================
// Constructors
// ===========================================================
/**
* This is a utility class with only static members.
*/
private MyMath() {
}
// ===========================================================
// Getter & Setter
// ===========================================================
// ===========================================================
// Methods from SuperClass/Interfaces
// ===========================================================
// ===========================================================
// Methods
// ===========================================================
public static double gudermannInverse(final double aLatitude) {
return Math.log(Math.tan(PI_4 + (DEG2RAD * aLatitude / 2)));
}
public static double gudermann(final double y) {
return RAD2DEG * Math.atan(Math.sinh(y));
}
public static int mod(int number, final int modulus) {
if (number > 0)
return number % modulus;
while (number < 0)
number += modulus;
return number;
}
// ===========================================================
// Inner and Anonymous Classes
// ===========================================================
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy