.class public Lcom/amap/api/mapcore2d/ce;
.super Ljava/lang/Object;
.source "MapbarCoordConver.java"


# static fields
.field static a:D = 3.141592653589793


# direct methods
.method static constructor <clinit>()V
    .locals 0

    return-void
.end method

.method public static a(DD)D
    .locals 6

    const-wide v0, 0x40f86a0000000000L    # 100000.0

    div-double v2, p2, v0

    .line 18
    invoke-static {v2, v3}, Ljava/lang/Math;->cos(D)D

    move-result-wide v2

    const-wide v4, 0x40d1940000000000L    # 18000.0

    div-double v4, p0, v4

    mul-double v2, v2, v4

    div-double/2addr p0, v0

    invoke-static {p0, p1}, Ljava/lang/Math;->sin(D)D

    move-result-wide p0

    const-wide v0, 0x40c1940000000000L    # 9000.0

    div-double/2addr p2, v0

    mul-double p0, p0, p2

    add-double/2addr v2, p0

    return-wide v2
.end method

.method public static a(Lcom/amap/api/maps2d/model/LatLng;)Lcom/amap/api/maps2d/model/LatLng;
    .locals 4

    if-nez p0, :cond_0

    const/4 p0, 0x0

    return-object p0

    .line 13
    :cond_0
    iget-wide v0, p0, Lcom/amap/api/maps2d/model/LatLng;->longitude:D

    iget-wide v2, p0, Lcom/amap/api/maps2d/model/LatLng;->latitude:D

    invoke-static {v0, v1, v2, v3}, Lcom/amap/api/mapcore2d/ce;->c(DD)Lcom/amap/api/maps2d/model/LatLng;

    move-result-object p0

    .line 14
    invoke-static {p0}, Lcom/amap/api/mapcore2d/cf;->a(Lcom/amap/api/maps2d/model/LatLng;)Lcom/amap/api/maps2d/model/LatLng;

    move-result-object p0

    return-object p0
.end method

.method public static b(DD)D
    .locals 6

    const-wide v0, 0x40f86a0000000000L    # 100000.0

    div-double v2, p2, v0

    .line 22
    invoke-static {v2, v3}, Ljava/lang/Math;->sin(D)D

    move-result-wide v2

    const-wide v4, 0x40d1940000000000L    # 18000.0

    div-double v4, p0, v4

    mul-double v2, v2, v4

    div-double/2addr p0, v0

    invoke-static {p0, p1}, Ljava/lang/Math;->cos(D)D

    move-result-wide p0

    const-wide v0, 0x40c1940000000000L    # 9000.0

    div-double/2addr p2, v0

    mul-double p0, p0, p2

    add-double/2addr v2, p0

    return-wide v2
.end method

.method private static c(DD)Lcom/amap/api/maps2d/model/LatLng;
    .locals 11

    const-wide v0, 0x40f86a0000000000L    # 100000.0

    mul-double p0, p0, v0

    double-to-long p0, p0

    const-wide/32 v2, 0x2255100

    .line 51
    rem-long/2addr p0, v2

    long-to-double p0, p0

    mul-double p2, p2, v0

    double-to-long p2, p2

    .line 52
    rem-long/2addr p2, v2

    long-to-double p2, p2

    .line 53
    invoke-static {p0, p1, p2, p3}, Lcom/amap/api/mapcore2d/ce;->a(DD)D

    move-result-wide v2

    neg-double v2, v2

    invoke-static {p0, p1}, Ljava/lang/Double;->isNaN(D)Z

    add-double/2addr v2, p0

    double-to-int v2, v2

    .line 54
    invoke-static {p0, p1, p2, p3}, Lcom/amap/api/mapcore2d/ce;->b(DD)D

    move-result-wide v3

    neg-double v3, v3

    invoke-static {p2, p3}, Ljava/lang/Double;->isNaN(D)Z

    add-double/2addr v3, p2

    double-to-int v3, v3

    int-to-double v4, v2

    int-to-double v2, v3

    .line 55
    invoke-static {v4, v5, v2, v3}, Lcom/amap/api/mapcore2d/ce;->a(DD)D

    move-result-wide v4

    neg-double v4, v4

    invoke-static {p0, p1}, Ljava/lang/Double;->isNaN(D)Z

    add-double/2addr v4, p0

    const/4 v6, -0x1

    const/4 v7, 0x1

    const-wide/16 v8, 0x0

    cmpl-double v10, p0, v8

    if-lez v10, :cond_0

    const/4 p0, 0x1

    goto :goto_0

    :cond_0
    const/4 p0, -0x1

    :goto_0
    int-to-double p0, p0

    invoke-static {p0, p1}, Ljava/lang/Double;->isNaN(D)Z

    add-double/2addr v4, p0

    double-to-int p0, v4

    int-to-double p0, p0

    .line 56
    invoke-static {p0, p1, v2, v3}, Lcom/amap/api/mapcore2d/ce;->b(DD)D

    move-result-wide v2

    neg-double v2, v2

    invoke-static {p2, p3}, Ljava/lang/Double;->isNaN(D)Z

    add-double/2addr v2, p2

    cmpl-double v4, p2, v8

    if-lez v4, :cond_1

    const/4 v6, 0x1

    :cond_1
    int-to-double p2, v6

    invoke-static {p2, p3}, Ljava/lang/Double;->isNaN(D)Z

    add-double/2addr v2, p2

    double-to-int p2, v2

    .line 57
    invoke-static {p0, p1}, Ljava/lang/Double;->isNaN(D)Z

    div-double/2addr p0, v0

    int-to-double p2, p2

    .line 58
    invoke-static {p2, p3}, Ljava/lang/Double;->isNaN(D)Z

    div-double/2addr p2, v0

    .line 59
    new-instance v0, Lcom/amap/api/maps2d/model/LatLng;

    invoke-direct {v0, p2, p3, p0, p1}, Lcom/amap/api/maps2d/model/LatLng;-><init>(DD)V

    return-object v0
.end method
