mirror of
https://github.com/VibedByKaKi/alexandroid.git
synced 2026-11-13 01:17:17 +01:00
74 lines
1.8 KiB
Java
74 lines
1.8 KiB
Java
package com.mapbox.android.gestures;
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
/* loaded from: classes8.dex */
|
|
public final class MoveDistancesObject {
|
|
private float currX;
|
|
private float currY;
|
|
private float distanceXSinceLast;
|
|
private float distanceXSinceStart;
|
|
private float distanceYSinceLast;
|
|
private float distanceYSinceStart;
|
|
private final float initialX;
|
|
private final float initialY;
|
|
private float prevX;
|
|
private float prevY;
|
|
|
|
public MoveDistancesObject(float f, float f2) {
|
|
this.initialX = f;
|
|
this.initialY = f2;
|
|
}
|
|
|
|
public void addNewPosition(float f, float f2) {
|
|
float f3 = this.currX;
|
|
this.prevX = f3;
|
|
float f4 = this.currY;
|
|
this.prevY = f4;
|
|
this.currX = f;
|
|
this.currY = f2;
|
|
this.distanceXSinceLast = f3 - f;
|
|
this.distanceYSinceLast = f4 - f2;
|
|
this.distanceXSinceStart = this.initialX - f;
|
|
this.distanceYSinceStart = this.initialY - f2;
|
|
}
|
|
|
|
public float getCurrentX() {
|
|
return this.currX;
|
|
}
|
|
|
|
public float getCurrentY() {
|
|
return this.currY;
|
|
}
|
|
|
|
public float getDistanceXSinceLast() {
|
|
return this.distanceXSinceLast;
|
|
}
|
|
|
|
public float getDistanceXSinceStart() {
|
|
return this.distanceXSinceStart;
|
|
}
|
|
|
|
public float getDistanceYSinceLast() {
|
|
return this.distanceYSinceLast;
|
|
}
|
|
|
|
public float getDistanceYSinceStart() {
|
|
return this.distanceYSinceStart;
|
|
}
|
|
|
|
public float getInitialX() {
|
|
return this.initialX;
|
|
}
|
|
|
|
public float getInitialY() {
|
|
return this.initialY;
|
|
}
|
|
|
|
public float getPreviousX() {
|
|
return this.prevX;
|
|
}
|
|
|
|
public float getPreviousY() {
|
|
return this.prevY;
|
|
}
|
|
}
|