2020-11-12 02:11:44 +00:00
|
|
|
.class public Landroidx/constraintlayout/motion/utils/Oscillator;
|
|
|
|
.super Ljava/lang/Object;
|
|
|
|
.source "Oscillator.java"
|
|
|
|
|
|
|
|
|
|
|
|
# static fields
|
|
|
|
.field public static final BOUNCE:I = 0x6
|
|
|
|
|
|
|
|
.field public static final COS_WAVE:I = 0x5
|
|
|
|
|
|
|
|
.field public static final REVERSE_SAW_WAVE:I = 0x4
|
|
|
|
|
|
|
|
.field public static final SAW_WAVE:I = 0x3
|
|
|
|
|
|
|
|
.field public static final SIN_WAVE:I = 0x0
|
|
|
|
|
|
|
|
.field public static final SQUARE_WAVE:I = 0x1
|
|
|
|
|
|
|
|
.field public static TAG:Ljava/lang/String; = "Oscillator"
|
|
|
|
|
|
|
|
.field public static final TRIANGLE_WAVE:I = 0x2
|
|
|
|
|
|
|
|
|
|
|
|
# instance fields
|
|
|
|
.field public PI2:D
|
|
|
|
|
|
|
|
.field public mArea:[D
|
|
|
|
|
2020-11-14 02:19:59 +00:00
|
|
|
.field public mNormalized:Z
|
2020-11-12 02:11:44 +00:00
|
|
|
|
|
|
|
.field public mPeriod:[F
|
|
|
|
|
|
|
|
.field public mPosition:[D
|
|
|
|
|
|
|
|
.field public mType:I
|
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method public constructor <init>()V
|
|
|
|
.locals 3
|
|
|
|
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
new-array v1, v0, [F
|
|
|
|
|
|
|
|
iput-object v1, p0, Landroidx/constraintlayout/motion/utils/Oscillator;->mPeriod:[F
|
|
|
|
|
|
|
|
new-array v1, v0, [D
|
|
|
|
|
|
|
|
iput-object v1, p0, Landroidx/constraintlayout/motion/utils/Oscillator;->mPosition:[D
|
|
|
|
|
|
|
|
const-wide v1, 0x401921fb54442d18L # 6.283185307179586
|
|
|
|
|
|
|
|
iput-wide v1, p0, Landroidx/constraintlayout/motion/utils/Oscillator;->PI2:D
|
|
|
|
|
|
|
|
iput-boolean v0, p0, Landroidx/constraintlayout/motion/utils/Oscillator;->mNormalized:Z
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
|
|
|
|
# virtual methods
|
|
|
|
.method public addPoint(DF)V
|
|
|
|
.locals 4
|
|
|
|
|
|
|
|
iget-object v0, p0, Landroidx/constraintlayout/motion/utils/Oscillator;->mPeriod:[F
|
|
|
|
|
|
|
|
array-length v0, v0
|
|
|
|
|
|
|
|
add-int/lit8 v0, v0, 0x1
|
|
|
|
|
|
|
|
iget-object v1, p0, Landroidx/constraintlayout/motion/utils/Oscillator;->mPosition:[D
|
|
|
|
|
|
|
|
invoke-static {v1, p1, p2}, Ljava/util/Arrays;->binarySearch([DD)I
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
if-gez v1, :cond_0
|
|
|
|
|
|
|
|
neg-int v1, v1
|
|
|
|
|
|
|
|
add-int/lit8 v1, v1, -0x1
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
iget-object v2, p0, Landroidx/constraintlayout/motion/utils/Oscillator;->mPosition:[D
|
|
|
|
|
|
|
|
invoke-static {v2, v0}, Ljava/util/Arrays;->copyOf([DI)[D
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
iput-object v2, p0, Landroidx/constraintlayout/motion/utils/Oscillator;->mPosition:[D
|
|
|
|
|
|
|
|
iget-object v2, p0, Landroidx/constraintlayout/motion/utils/Oscillator;->mPeriod:[F
|
|
|
|
|
|
|
|
invoke-static {v2, v0}, Ljava/util/Arrays;->copyOf([FI)[F
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
iput-object v2, p0, Landroidx/constraintlayout/motion/utils/Oscillator;->mPeriod:[F
|
|
|
|
|
|
|
|
new-array v2, v0, [D
|
|
|
|
|
|
|
|
iput-object v2, p0, Landroidx/constraintlayout/motion/utils/Oscillator;->mArea:[D
|
|
|
|
|
|
|
|
iget-object v2, p0, Landroidx/constraintlayout/motion/utils/Oscillator;->mPosition:[D
|
|
|
|
|
|
|
|
add-int/lit8 v3, v1, 0x1
|
|
|
|
|
|
|
|
sub-int/2addr v0, v1
|
|
|
|
|
|
|
|
add-int/lit8 v0, v0, -0x1
|
|
|
|
|
|
|
|
invoke-static {v2, v1, v2, v3, v0}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V
|
|
|
|
|
|
|
|
iget-object v0, p0, Landroidx/constraintlayout/motion/utils/Oscillator;->mPosition:[D
|
|
|
|
|
|
|
|
aput-wide p1, v0, v1
|
|
|
|
|
|
|
|
iget-object p1, p0, Landroidx/constraintlayout/motion/utils/Oscillator;->mPeriod:[F
|
|
|
|
|
|
|
|
aput p3, p1, v1
|
|
|
|
|
|
|
|
const/4 p1, 0x0
|
|
|
|
|
|
|
|
iput-boolean p1, p0, Landroidx/constraintlayout/motion/utils/Oscillator;->mNormalized:Z
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public getDP(D)D
|
|
|
|
.locals 10
|
|
|
|
|
|
|
|
const-wide/16 v0, 0x0
|
|
|
|
|
|
|
|
cmpg-double v2, p1, v0
|
|
|
|
|
|
|
|
if-gtz v2, :cond_0
|
|
|
|
|
|
|
|
const-wide p1, 0x3ee4f8b588e368f1L # 1.0E-5
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const-wide/high16 v2, 0x3ff0000000000000L # 1.0
|
|
|
|
|
|
|
|
cmpl-double v4, p1, v2
|
|
|
|
|
|
|
|
if-ltz v4, :cond_1
|
|
|
|
|
|
|
|
const-wide p1, 0x3feffffde7210be9L # 0.999999
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
:goto_0
|
|
|
|
iget-object v2, p0, Landroidx/constraintlayout/motion/utils/Oscillator;->mPosition:[D
|
|
|
|
|
|
|
|
invoke-static {v2, p1, p2}, Ljava/util/Arrays;->binarySearch([DD)I
|
|
|
|
|
|
|
|
move-result v2
|
|
|
|
|
|
|
|
if-lez v2, :cond_2
|
|
|
|
|
|
|
|
return-wide v0
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
if-eqz v2, :cond_3
|
|
|
|
|
|
|
|
neg-int v0, v2
|
|
|
|
|
|
|
|
add-int/lit8 v0, v0, -0x1
|
|
|
|
|
|
|
|
iget-object v1, p0, Landroidx/constraintlayout/motion/utils/Oscillator;->mPeriod:[F
|
|
|
|
|
|
|
|
aget v2, v1, v0
|
|
|
|
|
|
|
|
add-int/lit8 v3, v0, -0x1
|
|
|
|
|
|
|
|
aget v4, v1, v3
|
|
|
|
|
|
|
|
sub-float/2addr v2, v4
|
|
|
|
|
|
|
|
float-to-double v4, v2
|
|
|
|
|
|
|
|
iget-object v2, p0, Landroidx/constraintlayout/motion/utils/Oscillator;->mPosition:[D
|
|
|
|
|
|
|
|
aget-wide v6, v2, v0
|
|
|
|
|
|
|
|
aget-wide v8, v2, v3
|
|
|
|
|
|
|
|
sub-double/2addr v6, v8
|
|
|
|
|
|
|
|
div-double/2addr v4, v6
|
|
|
|
|
|
|
|
mul-double p1, p1, v4
|
|
|
|
|
|
|
|
aget v0, v1, v3
|
|
|
|
|
|
|
|
float-to-double v0, v0
|
|
|
|
|
|
|
|
aget-wide v6, v2, v3
|
|
|
|
|
|
|
|
mul-double v4, v4, v6
|
|
|
|
|
|
|
|
sub-double/2addr v0, v4
|
|
|
|
|
|
|
|
add-double/2addr v0, p1
|
|
|
|
|
|
|
|
:cond_3
|
|
|
|
return-wide v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public getP(D)D
|
|
|
|
.locals 10
|
|
|
|
|
|
|
|
const-wide/high16 v0, 0x3ff0000000000000L # 1.0
|
|
|
|
|
|
|
|
const-wide/16 v2, 0x0
|
|
|
|
|
|
|
|
cmpg-double v4, p1, v2
|
|
|
|
|
|
|
|
if-gez v4, :cond_0
|
|
|
|
|
|
|
|
move-wide p1, v2
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
cmpl-double v4, p1, v0
|
|
|
|
|
|
|
|
if-lez v4, :cond_1
|
|
|
|
|
|
|
|
move-wide p1, v0
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
:goto_0
|
|
|
|
iget-object v4, p0, Landroidx/constraintlayout/motion/utils/Oscillator;->mPosition:[D
|
|
|
|
|
|
|
|
invoke-static {v4, p1, p2}, Ljava/util/Arrays;->binarySearch([DD)I
|
|
|
|
|
|
|
|
move-result v4
|
|
|
|
|
|
|
|
if-lez v4, :cond_2
|
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
if-eqz v4, :cond_3
|
|
|
|
|
|
|
|
neg-int v0, v4
|
|
|
|
|
|
|
|
add-int/lit8 v0, v0, -0x1
|
|
|
|
|
|
|
|
iget-object v1, p0, Landroidx/constraintlayout/motion/utils/Oscillator;->mPeriod:[F
|
|
|
|
|
|
|
|
aget v2, v1, v0
|
|
|
|
|
|
|
|
add-int/lit8 v3, v0, -0x1
|
|
|
|
|
|
|
|
aget v4, v1, v3
|
|
|
|
|
|
|
|
sub-float/2addr v2, v4
|
|
|
|
|
|
|
|
float-to-double v4, v2
|
|
|
|
|
|
|
|
iget-object v2, p0, Landroidx/constraintlayout/motion/utils/Oscillator;->mPosition:[D
|
|
|
|
|
|
|
|
aget-wide v6, v2, v0
|
|
|
|
|
|
|
|
aget-wide v8, v2, v3
|
|
|
|
|
|
|
|
sub-double/2addr v6, v8
|
|
|
|
|
|
|
|
div-double/2addr v4, v6
|
|
|
|
|
|
|
|
iget-object v0, p0, Landroidx/constraintlayout/motion/utils/Oscillator;->mArea:[D
|
|
|
|
|
|
|
|
aget-wide v6, v0, v3
|
|
|
|
|
|
|
|
aget v0, v1, v3
|
|
|
|
|
|
|
|
float-to-double v0, v0
|
|
|
|
|
|
|
|
aget-wide v8, v2, v3
|
|
|
|
|
|
|
|
mul-double v8, v8, v4
|
|
|
|
|
|
|
|
sub-double/2addr v0, v8
|
|
|
|
|
|
|
|
aget-wide v8, v2, v3
|
|
|
|
|
|
|
|
sub-double v8, p1, v8
|
|
|
|
|
|
|
|
mul-double v8, v8, v0
|
|
|
|
|
|
|
|
add-double/2addr v8, v6
|
|
|
|
|
|
|
|
mul-double p1, p1, p1
|
|
|
|
|
|
|
|
aget-wide v0, v2, v3
|
|
|
|
|
|
|
|
aget-wide v6, v2, v3
|
|
|
|
|
|
|
|
mul-double v0, v0, v6
|
|
|
|
|
|
|
|
sub-double/2addr p1, v0
|
|
|
|
|
|
|
|
mul-double p1, p1, v4
|
|
|
|
|
|
|
|
const-wide/high16 v0, 0x4000000000000000L # 2.0
|
|
|
|
|
|
|
|
div-double/2addr p1, v0
|
|
|
|
|
|
|
|
add-double v0, p1, v8
|
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_3
|
|
|
|
move-wide v0, v2
|
|
|
|
|
|
|
|
:goto_1
|
|
|
|
return-wide v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public getSlope(D)D
|
|
|
|
.locals 9
|
|
|
|
|
|
|
|
iget v0, p0, Landroidx/constraintlayout/motion/utils/Oscillator;->mType:I
|
|
|
|
|
|
|
|
const-wide/high16 v1, 0x4000000000000000L # 2.0
|
|
|
|
|
|
|
|
const-wide/high16 v3, 0x4010000000000000L # 4.0
|
|
|
|
|
|
|
|
packed-switch v0, :pswitch_data_0
|
|
|
|
|
|
|
|
iget-wide v0, p0, Landroidx/constraintlayout/motion/utils/Oscillator;->PI2:D
|
|
|
|
|
|
|
|
invoke-virtual {p0, p1, p2}, Landroidx/constraintlayout/motion/utils/Oscillator;->getDP(D)D
|
|
|
|
|
|
|
|
move-result-wide v2
|
|
|
|
|
|
|
|
mul-double v2, v2, v0
|
|
|
|
|
|
|
|
iget-wide v0, p0, Landroidx/constraintlayout/motion/utils/Oscillator;->PI2:D
|
|
|
|
|
|
|
|
invoke-virtual {p0, p1, p2}, Landroidx/constraintlayout/motion/utils/Oscillator;->getP(D)D
|
|
|
|
|
|
|
|
move-result-wide p1
|
|
|
|
|
|
|
|
mul-double p1, p1, v0
|
|
|
|
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Math;->cos(D)D
|
|
|
|
|
|
|
|
move-result-wide p1
|
|
|
|
|
|
|
|
mul-double p1, p1, v2
|
|
|
|
|
|
|
|
return-wide p1
|
|
|
|
|
|
|
|
:pswitch_0
|
|
|
|
invoke-virtual {p0, p1, p2}, Landroidx/constraintlayout/motion/utils/Oscillator;->getDP(D)D
|
|
|
|
|
|
|
|
move-result-wide v5
|
|
|
|
|
|
|
|
mul-double v5, v5, v3
|
|
|
|
|
|
|
|
invoke-virtual {p0, p1, p2}, Landroidx/constraintlayout/motion/utils/Oscillator;->getP(D)D
|
|
|
|
|
|
|
|
move-result-wide p1
|
|
|
|
|
|
|
|
mul-double p1, p1, v3
|
|
|
|
|
|
|
|
add-double/2addr p1, v1
|
|
|
|
|
|
|
|
rem-double/2addr p1, v3
|
|
|
|
|
|
|
|
sub-double/2addr p1, v1
|
|
|
|
|
|
|
|
mul-double p1, p1, v5
|
|
|
|
|
|
|
|
return-wide p1
|
|
|
|
|
|
|
|
:pswitch_1
|
|
|
|
iget-wide v0, p0, Landroidx/constraintlayout/motion/utils/Oscillator;->PI2:D
|
|
|
|
|
|
|
|
neg-double v0, v0
|
|
|
|
|
|
|
|
invoke-virtual {p0, p1, p2}, Landroidx/constraintlayout/motion/utils/Oscillator;->getDP(D)D
|
|
|
|
|
|
|
|
move-result-wide v2
|
|
|
|
|
|
|
|
mul-double v2, v2, v0
|
|
|
|
|
|
|
|
iget-wide v0, p0, Landroidx/constraintlayout/motion/utils/Oscillator;->PI2:D
|
|
|
|
|
|
|
|
invoke-virtual {p0, p1, p2}, Landroidx/constraintlayout/motion/utils/Oscillator;->getP(D)D
|
|
|
|
|
|
|
|
move-result-wide p1
|
|
|
|
|
|
|
|
mul-double p1, p1, v0
|
|
|
|
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Math;->sin(D)D
|
|
|
|
|
|
|
|
move-result-wide p1
|
|
|
|
|
|
|
|
mul-double p1, p1, v2
|
|
|
|
|
|
|
|
return-wide p1
|
|
|
|
|
|
|
|
:pswitch_2
|
|
|
|
invoke-virtual {p0, p1, p2}, Landroidx/constraintlayout/motion/utils/Oscillator;->getDP(D)D
|
|
|
|
|
|
|
|
move-result-wide p1
|
|
|
|
|
|
|
|
neg-double p1, p1
|
|
|
|
|
|
|
|
mul-double p1, p1, v1
|
|
|
|
|
|
|
|
return-wide p1
|
|
|
|
|
|
|
|
:pswitch_3
|
|
|
|
invoke-virtual {p0, p1, p2}, Landroidx/constraintlayout/motion/utils/Oscillator;->getDP(D)D
|
|
|
|
|
|
|
|
move-result-wide p1
|
|
|
|
|
|
|
|
mul-double p1, p1, v1
|
|
|
|
|
|
|
|
return-wide p1
|
|
|
|
|
|
|
|
:pswitch_4
|
|
|
|
invoke-virtual {p0, p1, p2}, Landroidx/constraintlayout/motion/utils/Oscillator;->getDP(D)D
|
|
|
|
|
|
|
|
move-result-wide v5
|
|
|
|
|
|
|
|
mul-double v5, v5, v3
|
|
|
|
|
|
|
|
invoke-virtual {p0, p1, p2}, Landroidx/constraintlayout/motion/utils/Oscillator;->getP(D)D
|
|
|
|
|
|
|
|
move-result-wide p1
|
|
|
|
|
|
|
|
mul-double p1, p1, v3
|
|
|
|
|
|
|
|
const-wide/high16 v7, 0x4008000000000000L # 3.0
|
|
|
|
|
|
|
|
add-double/2addr p1, v7
|
|
|
|
|
|
|
|
rem-double/2addr p1, v3
|
|
|
|
|
|
|
|
sub-double/2addr p1, v1
|
|
|
|
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Math;->signum(D)D
|
|
|
|
|
|
|
|
move-result-wide p1
|
|
|
|
|
|
|
|
mul-double p1, p1, v5
|
|
|
|
|
|
|
|
return-wide p1
|
|
|
|
|
|
|
|
:pswitch_5
|
|
|
|
const-wide/16 p1, 0x0
|
|
|
|
|
|
|
|
return-wide p1
|
|
|
|
|
|
|
|
:pswitch_data_0
|
|
|
|
.packed-switch 0x1
|
|
|
|
:pswitch_5
|
|
|
|
:pswitch_4
|
|
|
|
:pswitch_3
|
|
|
|
:pswitch_2
|
|
|
|
:pswitch_1
|
|
|
|
:pswitch_0
|
|
|
|
.end packed-switch
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public getValue(D)D
|
|
|
|
.locals 7
|
|
|
|
|
|
|
|
iget v0, p0, Landroidx/constraintlayout/motion/utils/Oscillator;->mType:I
|
|
|
|
|
|
|
|
const-wide/high16 v1, 0x4010000000000000L # 4.0
|
|
|
|
|
|
|
|
const-wide/high16 v3, 0x4000000000000000L # 2.0
|
|
|
|
|
|
|
|
const-wide/high16 v5, 0x3ff0000000000000L # 1.0
|
|
|
|
|
|
|
|
packed-switch v0, :pswitch_data_0
|
|
|
|
|
|
|
|
iget-wide v0, p0, Landroidx/constraintlayout/motion/utils/Oscillator;->PI2:D
|
|
|
|
|
|
|
|
invoke-virtual {p0, p1, p2}, Landroidx/constraintlayout/motion/utils/Oscillator;->getP(D)D
|
|
|
|
|
|
|
|
move-result-wide p1
|
|
|
|
|
|
|
|
mul-double p1, p1, v0
|
|
|
|
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Math;->sin(D)D
|
|
|
|
|
|
|
|
move-result-wide p1
|
|
|
|
|
|
|
|
return-wide p1
|
|
|
|
|
|
|
|
:pswitch_0
|
|
|
|
invoke-virtual {p0, p1, p2}, Landroidx/constraintlayout/motion/utils/Oscillator;->getP(D)D
|
|
|
|
|
|
|
|
move-result-wide p1
|
|
|
|
|
|
|
|
mul-double p1, p1, v1
|
|
|
|
|
|
|
|
rem-double/2addr p1, v1
|
|
|
|
|
|
|
|
sub-double/2addr p1, v3
|
|
|
|
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Math;->abs(D)D
|
|
|
|
|
|
|
|
move-result-wide p1
|
|
|
|
|
|
|
|
sub-double p1, v5, p1
|
|
|
|
|
|
|
|
mul-double p1, p1, p1
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
sub-double/2addr v5, p1
|
|
|
|
|
|
|
|
return-wide v5
|
|
|
|
|
|
|
|
:pswitch_1
|
|
|
|
iget-wide v0, p0, Landroidx/constraintlayout/motion/utils/Oscillator;->PI2:D
|
|
|
|
|
|
|
|
invoke-virtual {p0, p1, p2}, Landroidx/constraintlayout/motion/utils/Oscillator;->getP(D)D
|
|
|
|
|
|
|
|
move-result-wide p1
|
|
|
|
|
|
|
|
mul-double p1, p1, v0
|
|
|
|
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Math;->cos(D)D
|
|
|
|
|
|
|
|
move-result-wide p1
|
|
|
|
|
|
|
|
return-wide p1
|
|
|
|
|
|
|
|
:pswitch_2
|
|
|
|
invoke-virtual {p0, p1, p2}, Landroidx/constraintlayout/motion/utils/Oscillator;->getP(D)D
|
|
|
|
|
|
|
|
move-result-wide p1
|
|
|
|
|
|
|
|
mul-double p1, p1, v3
|
|
|
|
|
|
|
|
add-double/2addr p1, v5
|
|
|
|
|
|
|
|
rem-double/2addr p1, v3
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:pswitch_3
|
|
|
|
invoke-virtual {p0, p1, p2}, Landroidx/constraintlayout/motion/utils/Oscillator;->getP(D)D
|
|
|
|
|
|
|
|
move-result-wide p1
|
|
|
|
|
|
|
|
mul-double p1, p1, v3
|
|
|
|
|
|
|
|
add-double/2addr p1, v5
|
|
|
|
|
|
|
|
rem-double/2addr p1, v3
|
|
|
|
|
|
|
|
sub-double/2addr p1, v5
|
|
|
|
|
|
|
|
return-wide p1
|
|
|
|
|
|
|
|
:pswitch_4
|
|
|
|
invoke-virtual {p0, p1, p2}, Landroidx/constraintlayout/motion/utils/Oscillator;->getP(D)D
|
|
|
|
|
|
|
|
move-result-wide p1
|
|
|
|
|
|
|
|
mul-double p1, p1, v1
|
|
|
|
|
|
|
|
add-double/2addr p1, v5
|
|
|
|
|
|
|
|
rem-double/2addr p1, v1
|
|
|
|
|
|
|
|
sub-double/2addr p1, v3
|
|
|
|
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Math;->abs(D)D
|
|
|
|
|
|
|
|
move-result-wide p1
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:pswitch_5
|
|
|
|
const-wide/high16 v0, 0x3fe0000000000000L # 0.5
|
|
|
|
|
|
|
|
invoke-virtual {p0, p1, p2}, Landroidx/constraintlayout/motion/utils/Oscillator;->getP(D)D
|
|
|
|
|
|
|
|
move-result-wide p1
|
|
|
|
|
|
|
|
rem-double/2addr p1, v5
|
|
|
|
|
|
|
|
sub-double/2addr v0, p1
|
|
|
|
|
|
|
|
invoke-static {v0, v1}, Ljava/lang/Math;->signum(D)D
|
|
|
|
|
|
|
|
move-result-wide p1
|
|
|
|
|
|
|
|
return-wide p1
|
|
|
|
|
|
|
|
nop
|
|
|
|
|
|
|
|
:pswitch_data_0
|
|
|
|
.packed-switch 0x1
|
|
|
|
:pswitch_5
|
|
|
|
:pswitch_4
|
|
|
|
:pswitch_3
|
|
|
|
:pswitch_2
|
|
|
|
:pswitch_1
|
|
|
|
:pswitch_0
|
|
|
|
.end packed-switch
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public normalize()V
|
|
|
|
.locals 17
|
|
|
|
|
|
|
|
move-object/from16 v0, p0
|
|
|
|
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
const-wide/16 v2, 0x0
|
|
|
|
|
|
|
|
move-wide v5, v2
|
|
|
|
|
|
|
|
const/4 v4, 0x0
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
iget-object v7, v0, Landroidx/constraintlayout/motion/utils/Oscillator;->mPeriod:[F
|
|
|
|
|
|
|
|
array-length v8, v7
|
|
|
|
|
|
|
|
if-ge v4, v8, :cond_0
|
|
|
|
|
|
|
|
aget v7, v7, v4
|
|
|
|
|
|
|
|
float-to-double v7, v7
|
|
|
|
|
|
|
|
add-double/2addr v5, v7
|
|
|
|
|
|
|
|
add-int/lit8 v4, v4, 0x1
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const/4 v4, 0x1
|
|
|
|
|
|
|
|
move-wide v8, v2
|
|
|
|
|
|
|
|
const/4 v7, 0x1
|
|
|
|
|
|
|
|
:goto_1
|
|
|
|
iget-object v10, v0, Landroidx/constraintlayout/motion/utils/Oscillator;->mPeriod:[F
|
|
|
|
|
|
|
|
array-length v11, v10
|
|
|
|
|
|
|
|
const/high16 v12, 0x40000000 # 2.0f
|
|
|
|
|
|
|
|
if-ge v7, v11, :cond_1
|
|
|
|
|
|
|
|
add-int/lit8 v11, v7, -0x1
|
|
|
|
|
|
|
|
aget v13, v10, v11
|
|
|
|
|
|
|
|
aget v10, v10, v7
|
|
|
|
|
|
|
|
add-float/2addr v13, v10
|
|
|
|
|
|
|
|
div-float/2addr v13, v12
|
|
|
|
|
|
|
|
iget-object v10, v0, Landroidx/constraintlayout/motion/utils/Oscillator;->mPosition:[D
|
|
|
|
|
|
|
|
aget-wide v14, v10, v7
|
|
|
|
|
|
|
|
aget-wide v11, v10, v11
|
|
|
|
|
|
|
|
sub-double/2addr v14, v11
|
|
|
|
|
|
|
|
float-to-double v10, v13
|
|
|
|
|
|
|
|
mul-double v14, v14, v10
|
|
|
|
|
|
|
|
add-double/2addr v8, v14
|
|
|
|
|
|
|
|
add-int/lit8 v7, v7, 0x1
|
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
const/4 v7, 0x0
|
|
|
|
|
|
|
|
:goto_2
|
|
|
|
iget-object v10, v0, Landroidx/constraintlayout/motion/utils/Oscillator;->mPeriod:[F
|
|
|
|
|
|
|
|
array-length v11, v10
|
|
|
|
|
|
|
|
if-ge v7, v11, :cond_2
|
|
|
|
|
|
|
|
aget v11, v10, v7
|
|
|
|
|
|
|
|
float-to-double v13, v11
|
|
|
|
|
|
|
|
div-double v15, v5, v8
|
|
|
|
|
|
|
|
mul-double v13, v13, v15
|
|
|
|
|
|
|
|
double-to-float v11, v13
|
|
|
|
|
|
|
|
aput v11, v10, v7
|
|
|
|
|
|
|
|
add-int/lit8 v7, v7, 0x1
|
|
|
|
|
|
|
|
goto :goto_2
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
iget-object v5, v0, Landroidx/constraintlayout/motion/utils/Oscillator;->mArea:[D
|
|
|
|
|
|
|
|
aput-wide v2, v5, v1
|
|
|
|
|
|
|
|
const/4 v1, 0x1
|
|
|
|
|
|
|
|
:goto_3
|
|
|
|
iget-object v2, v0, Landroidx/constraintlayout/motion/utils/Oscillator;->mPeriod:[F
|
|
|
|
|
|
|
|
array-length v3, v2
|
|
|
|
|
|
|
|
if-ge v1, v3, :cond_3
|
|
|
|
|
|
|
|
add-int/lit8 v3, v1, -0x1
|
|
|
|
|
|
|
|
aget v5, v2, v3
|
|
|
|
|
|
|
|
aget v2, v2, v1
|
|
|
|
|
|
|
|
add-float/2addr v5, v2
|
|
|
|
|
|
|
|
div-float/2addr v5, v12
|
|
|
|
|
|
|
|
iget-object v2, v0, Landroidx/constraintlayout/motion/utils/Oscillator;->mPosition:[D
|
|
|
|
|
|
|
|
aget-wide v6, v2, v1
|
|
|
|
|
|
|
|
aget-wide v8, v2, v3
|
|
|
|
|
|
|
|
sub-double/2addr v6, v8
|
|
|
|
|
|
|
|
iget-object v2, v0, Landroidx/constraintlayout/motion/utils/Oscillator;->mArea:[D
|
|
|
|
|
|
|
|
aget-wide v8, v2, v3
|
|
|
|
|
|
|
|
float-to-double v10, v5
|
|
|
|
|
|
|
|
mul-double v6, v6, v10
|
|
|
|
|
|
|
|
add-double/2addr v6, v8
|
|
|
|
|
|
|
|
aput-wide v6, v2, v1
|
|
|
|
|
|
|
|
add-int/lit8 v1, v1, 0x1
|
|
|
|
|
|
|
|
goto :goto_3
|
|
|
|
|
|
|
|
:cond_3
|
|
|
|
iput-boolean v4, v0, Landroidx/constraintlayout/motion/utils/Oscillator;->mNormalized:Z
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public setType(I)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
iput p1, p0, Landroidx/constraintlayout/motion/utils/Oscillator;->mType:I
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public toString()Ljava/lang/String;
|
|
|
|
.locals 2
|
|
|
|
|
|
|
|
const-string v0, "pos ="
|
|
|
|
|
2020-11-14 02:19:59 +00:00
|
|
|
invoke-static {v0}, Lf/e/c/a/a;->E(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
2020-11-12 02:11:44 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
iget-object v1, p0, Landroidx/constraintlayout/motion/utils/Oscillator;->mPosition:[D
|
|
|
|
|
|
|
|
invoke-static {v1}, Ljava/util/Arrays;->toString([D)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
const-string v1, " period="
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
iget-object v1, p0, Landroidx/constraintlayout/motion/utils/Oscillator;->mPeriod:[F
|
|
|
|
|
|
|
|
invoke-static {v1}, Ljava/util/Arrays;->toString([F)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|