es.java
1.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
import android.annotation.TargetApi;
import android.graphics.Path;
import android.graphics.PathMeasure;
import android.support.annotation.RequiresApi;
import android.view.animation.Interpolator;
@TargetApi(9)
@RequiresApi(9)
public final class es
implements Interpolator
{
private final float[] a;
private final float[] b;
public es(float paramFloat1, float paramFloat2)
{
this(localPath);
}
public es(float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4)
{
this(localPath);
}
public es(Path paramPath)
{
paramPath = new PathMeasure(paramPath, false);
float f = paramPath.getLength();
int j = (int)(f / 0.002F) + 1;
this.a = new float[j];
this.b = new float[j];
float[] arrayOfFloat = new float[2];
int i = 0;
while (i < j)
{
paramPath.getPosTan(i * f / (j - 1), arrayOfFloat, null);
this.a[i] = arrayOfFloat[0];
this.b[i] = arrayOfFloat[1];
i += 1;
}
}
public final float getInterpolation(float paramFloat)
{
if (paramFloat <= 0.0F) {
return 0.0F;
}
if (paramFloat >= 1.0F) {
return 1.0F;
}
int j = this.a.length - 1;
int i = 0;
while (j - i > 1)
{
int k = (i + j) / 2;
if (paramFloat < this.a[k]) {
j = k;
} else {
i = k;
}
}
float f = this.a[j] - this.a[i];
if (f == 0.0F) {
return this.b[i];
}
paramFloat = (paramFloat - this.a[i]) / f;
f = this.b[i];
return paramFloat * (this.b[j] - f) + f;
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/es.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/