package hirondelle.starfield.projection;
import hirondelle.starfield.util.Util;
final class EqualAreaCylindricalProjection extends WholeSkyProjection {
EqualAreaCylindricalProjection(double aStandardLat) {
fStandardLat = Util.radians(aStandardLat);
}
@Override public Coords projectWithLatLong(double aLat, double aLong, double aScale, Coords aCenter) {
Coords result = new Coords();
double deltax = aScale * aLong * Math.cos(fStandardLat);
double deltay = aScale * Math.sin(aLat)/Math.cos(fStandardLat);
result.X = aCenter.X + deltax;
result.Y = aCenter.Y + deltay;
return result;
}
private double fStandardLat;
}