package com.google.maps.android.ktx.utils;

import com.google.android.gms.maps.model.LatLng;
import com.google.android.gms.maps.model.Polyline;
import com.google.maps.android.PolyUtil;
import com.google.maps.android.SphericalUtil;
import kotlin.Metadata;
import kotlin.jvm.internal.Intrinsics;

/* JADX INFO: compiled from: Polyline.kt */
/* JADX INFO: loaded from: classes2.dex */
@Metadata(d1 = {"\u0000\u001c\n\u0000\n\u0002\u0010\u0006\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\u000b\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\u001a\u001f\u0010\u0005\u001a\u00020\u0006*\u00020\u00022\u0006\u0010\u0007\u001a\u00020\b2\b\b\u0002\u0010\t\u001a\u00020\u0001H\u0086\b\"\u0016\u0010\u0000\u001a\u00020\u0001*\u00020\u00028Æ\u0002¢\u0006\u0006\u001a\u0004\b\u0003\u0010\u0004¨\u0006\n"}, d2 = {"sphericalPathLength", "", "Lcom/google/android/gms/maps/model/Polyline;", "getSphericalPathLength", "(Lcom/google/android/gms/maps/model/Polyline;)D", "contains", "", "latLng", "Lcom/google/android/gms/maps/model/LatLng;", "tolerance", "maps-utils-ktx_release"}, k = 2, mv = {1, 8, 0}, xi = 48)
public final class PolylineKt {
    public static /* synthetic */ boolean contains$default(Polyline polyline, LatLng latLng, double d, int i, Object obj) {
        if ((i & 2) != 0) {
            d = 0.1d;
        }
        Intrinsics.checkNotNullParameter(polyline, "<this>");
        Intrinsics.checkNotNullParameter(latLng, "latLng");
        return PolyUtil.isLocationOnPath(latLng, polyline.getPoints(), polyline.isGeodesic(), d);
    }

    public static final boolean contains(Polyline polyline, LatLng latLng, double d) {
        Intrinsics.checkNotNullParameter(polyline, "<this>");
        Intrinsics.checkNotNullParameter(latLng, "latLng");
        return PolyUtil.isLocationOnPath(latLng, polyline.getPoints(), polyline.isGeodesic(), d);
    }

    public static final double getSphericalPathLength(Polyline polyline) {
        Intrinsics.checkNotNullParameter(polyline, "<this>");
        return SphericalUtil.computeLength(polyline.getPoints());
    }
}