You've already forked android_translation_layer
mirror of
https://gitlab.com/android_translation_layer/android_translation_layer.git
synced 2025-10-27 11:48:10 -07:00
api-impl: misc stubs and trivial impls
This commit is contained in:
@@ -30,11 +30,20 @@ public class VelocityTracker {
|
||||
public void computeCurrentVelocity(int units, float maxVelocity) {}
|
||||
public void computeCurrentVelocity(int units) {}
|
||||
|
||||
public float getXVelocity() {
|
||||
return getXVelocity(-1);
|
||||
}
|
||||
|
||||
public float getXVelocity(int id) {
|
||||
if (currentEventTime == startEventTime)
|
||||
return 0.f;
|
||||
return (currentX - startX) / (currentEventTime - startEventTime) * 1000;
|
||||
}
|
||||
|
||||
public float getYVelocity() {
|
||||
return getYVelocity();
|
||||
}
|
||||
|
||||
public float getYVelocity(int id) {
|
||||
if (currentEventTime == startEventTime)
|
||||
return 0.f;
|
||||
|
||||
Reference in New Issue
Block a user