package com.google.android.gms.internal.ads;

import android.view.MotionEvent;

/* JADX INFO: loaded from: classes2.dex */
public final class bm1 {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public long f9577a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public long f9578b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public long f9579c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public long f9580d;

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public double f9581e;

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public double f9582f;

    /* JADX INFO: renamed from: g, reason: collision with root package name */
    public double f9583g;

    /* JADX INFO: renamed from: h, reason: collision with root package name */
    public float f9584h;

    /* JADX INFO: renamed from: i, reason: collision with root package name */
    public float f9585i;

    /* JADX INFO: renamed from: j, reason: collision with root package name */
    public float f9586j;

    /* JADX INFO: renamed from: k, reason: collision with root package name */
    public float f9587k;

    public final void a(MotionEvent motionEvent) {
        int action = motionEvent.getAction();
        if (action == 0) {
            this.f9577a++;
            this.f9583g = 0.0d;
            this.f9581e = motionEvent.getRawX();
            this.f9582f = motionEvent.getRawY();
            this.f9584h = motionEvent.getX();
            this.f9585i = motionEvent.getY();
            this.f9586j = motionEvent.getRawX();
            this.f9587k = motionEvent.getRawY();
            return;
        }
        if (action == 1) {
            this.f9579c++;
            this.f9583g = Math.hypot(((double) motionEvent.getRawX()) - this.f9581e, ((double) motionEvent.getRawY()) - this.f9582f) + this.f9583g;
            this.f9581e = motionEvent.getRawX();
            this.f9582f = motionEvent.getRawY();
            return;
        }
        if (action != 2) {
            if (action != 3) {
                return;
            }
            this.f9580d++;
            return;
        }
        this.f9578b += (long) (motionEvent.getHistorySize() + 1);
        this.f9583g = Math.hypot(((double) motionEvent.getRawX()) - this.f9581e, ((double) motionEvent.getRawY()) - this.f9582f) + this.f9583g;
        this.f9581e = motionEvent.getRawX();
        this.f9582f = motionEvent.getRawY();
    }
}
