791 lines
16 KiB
Smali
791 lines
16 KiB
Smali
.class public Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;
|
|
.super Ljava/lang/Object;
|
|
.source "ArcCurveFit.java"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Landroidx/constraintlayout/motion/utils/ArcCurveFit;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x9
|
|
name = "Arc"
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field public static final EPSILON:D = 0.001
|
|
|
|
.field public static final TAG:Ljava/lang/String; = "Arc"
|
|
|
|
.field public static ourPercent:[D
|
|
|
|
|
|
# instance fields
|
|
.field public linear:Z
|
|
|
|
.field public mArcDistance:D
|
|
|
|
.field public mArcVelocity:D
|
|
|
|
.field public mEllipseA:D
|
|
|
|
.field public mEllipseB:D
|
|
|
|
.field public mEllipseCenterX:D
|
|
|
|
.field public mEllipseCenterY:D
|
|
|
|
.field public mLut:[D
|
|
|
|
.field public mOneOverDeltaTime:D
|
|
|
|
.field public mTime1:D
|
|
|
|
.field public mTime2:D
|
|
|
|
.field public mTmpCosAngle:D
|
|
|
|
.field public mTmpSinAngle:D
|
|
|
|
.field public mVertical:Z
|
|
|
|
.field public mX1:D
|
|
|
|
.field public mX2:D
|
|
|
|
.field public mY1:D
|
|
|
|
.field public mY2:D
|
|
|
|
|
|
# direct methods
|
|
.method public static constructor <clinit>()V
|
|
.locals 1
|
|
|
|
const/16 v0, 0x5b
|
|
|
|
new-array v0, v0, [D
|
|
|
|
sput-object v0, Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;->ourPercent:[D
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(IDDDDDD)V
|
|
.locals 20
|
|
|
|
move-object/from16 v9, p0
|
|
|
|
move/from16 v0, p1
|
|
|
|
move-wide/from16 v1, p2
|
|
|
|
move-wide/from16 v3, p4
|
|
|
|
move-wide/from16 v5, p6
|
|
|
|
move-wide/from16 v7, p8
|
|
|
|
move-wide/from16 v10, p10
|
|
|
|
move-wide/from16 v12, p12
|
|
|
|
invoke-direct/range {p0 .. p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
const/4 v14, 0x0
|
|
|
|
iput-boolean v14, v9, Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;->linear:Z
|
|
|
|
const/4 v15, 0x1
|
|
|
|
if-ne v0, v15, :cond_0
|
|
|
|
const/4 v14, 0x1
|
|
|
|
:cond_0
|
|
iput-boolean v14, v9, Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;->mVertical:Z
|
|
|
|
iput-wide v1, v9, Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;->mTime1:D
|
|
|
|
iput-wide v3, v9, Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;->mTime2:D
|
|
|
|
const-wide/high16 v16, 0x3ff0000000000000L # 1.0
|
|
|
|
sub-double v1, v3, v1
|
|
|
|
div-double v1, v16, v1
|
|
|
|
iput-wide v1, v9, Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;->mOneOverDeltaTime:D
|
|
|
|
const/4 v1, 0x3
|
|
|
|
if-ne v1, v0, :cond_1
|
|
|
|
iput-boolean v15, v9, Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;->linear:Z
|
|
|
|
:cond_1
|
|
sub-double v0, v10, v5
|
|
|
|
sub-double v2, v12, v7
|
|
|
|
iget-boolean v4, v9, Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;->linear:Z
|
|
|
|
if-nez v4, :cond_7
|
|
|
|
invoke-static {v0, v1}, Ljava/lang/Math;->abs(D)D
|
|
|
|
move-result-wide v16
|
|
|
|
const-wide v18, 0x3f50624dd2f1a9fcL # 0.001
|
|
|
|
cmpg-double v4, v16, v18
|
|
|
|
if-ltz v4, :cond_7
|
|
|
|
invoke-static {v2, v3}, Ljava/lang/Math;->abs(D)D
|
|
|
|
move-result-wide v16
|
|
|
|
cmpg-double v4, v16, v18
|
|
|
|
if-gez v4, :cond_2
|
|
|
|
goto :goto_4
|
|
|
|
:cond_2
|
|
const/16 v4, 0x65
|
|
|
|
new-array v4, v4, [D
|
|
|
|
iput-object v4, v9, Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;->mLut:[D
|
|
|
|
iget-boolean v4, v9, Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;->mVertical:Z
|
|
|
|
if-eqz v4, :cond_3
|
|
|
|
const/4 v4, -0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_3
|
|
const/4 v4, 0x1
|
|
|
|
:goto_0
|
|
int-to-double v14, v4
|
|
|
|
mul-double v0, v0, v14
|
|
|
|
iput-wide v0, v9, Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;->mEllipseA:D
|
|
|
|
iget-boolean v0, v9, Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;->mVertical:Z
|
|
|
|
if-eqz v0, :cond_4
|
|
|
|
const/4 v15, 0x1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_4
|
|
const/4 v15, -0x1
|
|
|
|
:goto_1
|
|
int-to-double v0, v15
|
|
|
|
mul-double v2, v2, v0
|
|
|
|
iput-wide v2, v9, Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;->mEllipseB:D
|
|
|
|
iget-boolean v0, v9, Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;->mVertical:Z
|
|
|
|
if-eqz v0, :cond_5
|
|
|
|
move-wide v0, v10
|
|
|
|
goto :goto_2
|
|
|
|
:cond_5
|
|
move-wide v0, v5
|
|
|
|
:goto_2
|
|
iput-wide v0, v9, Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;->mEllipseCenterX:D
|
|
|
|
iget-boolean v0, v9, Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;->mVertical:Z
|
|
|
|
if-eqz v0, :cond_6
|
|
|
|
move-wide v0, v7
|
|
|
|
goto :goto_3
|
|
|
|
:cond_6
|
|
move-wide v0, v12
|
|
|
|
:goto_3
|
|
iput-wide v0, v9, Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;->mEllipseCenterY:D
|
|
|
|
move-object/from16 v0, p0
|
|
|
|
move-wide/from16 v1, p6
|
|
|
|
move-wide/from16 v3, p8
|
|
|
|
move-wide/from16 v5, p10
|
|
|
|
move-wide/from16 v7, p12
|
|
|
|
invoke-direct/range {v0 .. v8}, Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;->buildTable(DDDD)V
|
|
|
|
iget-wide v0, v9, Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;->mArcDistance:D
|
|
|
|
iget-wide v2, v9, Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;->mOneOverDeltaTime:D
|
|
|
|
mul-double v0, v0, v2
|
|
|
|
iput-wide v0, v9, Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;->mArcVelocity:D
|
|
|
|
return-void
|
|
|
|
:cond_7
|
|
:goto_4
|
|
const/4 v4, 0x1
|
|
|
|
iput-boolean v4, v9, Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;->linear:Z
|
|
|
|
iput-wide v5, v9, Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;->mX1:D
|
|
|
|
iput-wide v10, v9, Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;->mX2:D
|
|
|
|
iput-wide v7, v9, Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;->mY1:D
|
|
|
|
iput-wide v12, v9, Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;->mY2:D
|
|
|
|
invoke-static {v2, v3, v0, v1}, Ljava/lang/Math;->hypot(DD)D
|
|
|
|
move-result-wide v4
|
|
|
|
iput-wide v4, v9, Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;->mArcDistance:D
|
|
|
|
iget-wide v6, v9, Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;->mOneOverDeltaTime:D
|
|
|
|
mul-double v4, v4, v6
|
|
|
|
iput-wide v4, v9, Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;->mArcVelocity:D
|
|
|
|
iget-wide v4, v9, Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;->mTime2:D
|
|
|
|
iget-wide v6, v9, Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;->mTime1:D
|
|
|
|
sub-double v10, v4, v6
|
|
|
|
div-double/2addr v0, v10
|
|
|
|
iput-wide v0, v9, Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;->mEllipseCenterX:D
|
|
|
|
sub-double/2addr v4, v6
|
|
|
|
div-double/2addr v2, v4
|
|
|
|
iput-wide v2, v9, Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;->mEllipseCenterY:D
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private buildTable(DDDD)V
|
|
.locals 20
|
|
|
|
move-object/from16 v0, p0
|
|
|
|
sub-double v1, p5, p1
|
|
|
|
sub-double v3, p3, p7
|
|
|
|
const/4 v8, 0x0
|
|
|
|
const-wide/16 v9, 0x0
|
|
|
|
const-wide/16 v11, 0x0
|
|
|
|
const-wide/16 v13, 0x0
|
|
|
|
:goto_0
|
|
sget-object v15, Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;->ourPercent:[D
|
|
|
|
array-length v5, v15
|
|
|
|
if-ge v8, v5, :cond_1
|
|
|
|
const-wide v16, 0x4056800000000000L # 90.0
|
|
|
|
int-to-double v6, v8
|
|
|
|
mul-double v6, v6, v16
|
|
|
|
array-length v5, v15
|
|
|
|
add-int/lit8 v5, v5, -0x1
|
|
|
|
move-wide/from16 p4, v9
|
|
|
|
int-to-double v9, v5
|
|
|
|
div-double/2addr v6, v9
|
|
|
|
invoke-static {v6, v7}, Ljava/lang/Math;->toRadians(D)D
|
|
|
|
move-result-wide v5
|
|
|
|
invoke-static {v5, v6}, Ljava/lang/Math;->sin(D)D
|
|
|
|
move-result-wide v9
|
|
|
|
invoke-static {v5, v6}, Ljava/lang/Math;->cos(D)D
|
|
|
|
move-result-wide v5
|
|
|
|
mul-double v9, v9, v1
|
|
|
|
mul-double v5, v5, v3
|
|
|
|
if-lez v8, :cond_0
|
|
|
|
sub-double v11, v9, v11
|
|
|
|
sub-double v13, v5, v13
|
|
|
|
invoke-static {v11, v12, v13, v14}, Ljava/lang/Math;->hypot(DD)D
|
|
|
|
move-result-wide v11
|
|
|
|
add-double v11, v11, p4
|
|
|
|
sget-object v7, Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;->ourPercent:[D
|
|
|
|
aput-wide v11, v7, v8
|
|
|
|
goto :goto_1
|
|
|
|
:cond_0
|
|
move-wide/from16 v11, p4
|
|
|
|
:goto_1
|
|
add-int/lit8 v8, v8, 0x1
|
|
|
|
move-wide v13, v5
|
|
|
|
move-wide/from16 v18, v9
|
|
|
|
move-wide v9, v11
|
|
|
|
move-wide/from16 v11, v18
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
move-wide v11, v9
|
|
|
|
iput-wide v11, v0, Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;->mArcDistance:D
|
|
|
|
const/4 v1, 0x0
|
|
|
|
:goto_2
|
|
sget-object v2, Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;->ourPercent:[D
|
|
|
|
array-length v3, v2
|
|
|
|
if-ge v1, v3, :cond_2
|
|
|
|
aget-wide v3, v2, v1
|
|
|
|
div-double/2addr v3, v11
|
|
|
|
aput-wide v3, v2, v1
|
|
|
|
add-int/lit8 v1, v1, 0x1
|
|
|
|
goto :goto_2
|
|
|
|
:cond_2
|
|
const/4 v5, 0x0
|
|
|
|
:goto_3
|
|
iget-object v1, v0, Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;->mLut:[D
|
|
|
|
array-length v2, v1
|
|
|
|
if-ge v5, v2, :cond_5
|
|
|
|
int-to-double v2, v5
|
|
|
|
array-length v1, v1
|
|
|
|
add-int/lit8 v1, v1, -0x1
|
|
|
|
int-to-double v6, v1
|
|
|
|
div-double/2addr v2, v6
|
|
|
|
sget-object v1, Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;->ourPercent:[D
|
|
|
|
invoke-static {v1, v2, v3}, Ljava/util/Arrays;->binarySearch([DD)I
|
|
|
|
move-result v1
|
|
|
|
if-ltz v1, :cond_3
|
|
|
|
iget-object v2, v0, Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;->mLut:[D
|
|
|
|
sget-object v3, Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;->ourPercent:[D
|
|
|
|
array-length v3, v3
|
|
|
|
add-int/lit8 v3, v3, -0x1
|
|
|
|
div-int/2addr v1, v3
|
|
|
|
int-to-double v3, v1
|
|
|
|
aput-wide v3, v2, v5
|
|
|
|
const-wide/16 v6, 0x0
|
|
|
|
goto :goto_4
|
|
|
|
:cond_3
|
|
const/4 v4, -0x1
|
|
|
|
if-ne v1, v4, :cond_4
|
|
|
|
iget-object v1, v0, Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;->mLut:[D
|
|
|
|
const-wide/16 v6, 0x0
|
|
|
|
aput-wide v6, v1, v5
|
|
|
|
goto :goto_4
|
|
|
|
:cond_4
|
|
const-wide/16 v6, 0x0
|
|
|
|
neg-int v1, v1
|
|
|
|
add-int/lit8 v4, v1, -0x2
|
|
|
|
add-int/lit8 v1, v1, -0x1
|
|
|
|
int-to-double v8, v4
|
|
|
|
sget-object v10, Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;->ourPercent:[D
|
|
|
|
aget-wide v11, v10, v4
|
|
|
|
sub-double/2addr v2, v11
|
|
|
|
aget-wide v11, v10, v1
|
|
|
|
aget-wide v13, v10, v4
|
|
|
|
sub-double/2addr v11, v13
|
|
|
|
div-double/2addr v2, v11
|
|
|
|
add-double/2addr v2, v8
|
|
|
|
array-length v1, v10
|
|
|
|
add-int/lit8 v1, v1, -0x1
|
|
|
|
int-to-double v8, v1
|
|
|
|
div-double/2addr v2, v8
|
|
|
|
iget-object v1, v0, Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;->mLut:[D
|
|
|
|
aput-wide v2, v1, v5
|
|
|
|
:goto_4
|
|
add-int/lit8 v5, v5, 0x1
|
|
|
|
goto :goto_3
|
|
|
|
:cond_5
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public getDX()D
|
|
.locals 6
|
|
|
|
iget-wide v0, p0, Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;->mEllipseA:D
|
|
|
|
iget-wide v2, p0, Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;->mTmpCosAngle:D
|
|
|
|
mul-double v0, v0, v2
|
|
|
|
iget-wide v2, p0, Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;->mEllipseB:D
|
|
|
|
neg-double v2, v2
|
|
|
|
iget-wide v4, p0, Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;->mTmpSinAngle:D
|
|
|
|
mul-double v2, v2, v4
|
|
|
|
iget-wide v4, p0, Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;->mArcVelocity:D
|
|
|
|
invoke-static {v0, v1, v2, v3}, Ljava/lang/Math;->hypot(DD)D
|
|
|
|
move-result-wide v2
|
|
|
|
div-double/2addr v4, v2
|
|
|
|
iget-boolean v2, p0, Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;->mVertical:Z
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
neg-double v0, v0
|
|
|
|
:cond_0
|
|
mul-double v0, v0, v4
|
|
|
|
return-wide v0
|
|
.end method
|
|
|
|
.method public getDY()D
|
|
.locals 6
|
|
|
|
iget-wide v0, p0, Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;->mEllipseA:D
|
|
|
|
iget-wide v2, p0, Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;->mTmpCosAngle:D
|
|
|
|
mul-double v0, v0, v2
|
|
|
|
iget-wide v2, p0, Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;->mEllipseB:D
|
|
|
|
neg-double v2, v2
|
|
|
|
iget-wide v4, p0, Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;->mTmpSinAngle:D
|
|
|
|
mul-double v2, v2, v4
|
|
|
|
iget-wide v4, p0, Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;->mArcVelocity:D
|
|
|
|
invoke-static {v0, v1, v2, v3}, Ljava/lang/Math;->hypot(DD)D
|
|
|
|
move-result-wide v0
|
|
|
|
div-double/2addr v4, v0
|
|
|
|
iget-boolean v0, p0, Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;->mVertical:Z
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
neg-double v0, v2
|
|
|
|
mul-double v0, v0, v4
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
mul-double v0, v2, v4
|
|
|
|
:goto_0
|
|
return-wide v0
|
|
.end method
|
|
|
|
.method public getLinearDX(D)D
|
|
.locals 0
|
|
|
|
iget-wide p1, p0, Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;->mEllipseCenterX:D
|
|
|
|
return-wide p1
|
|
.end method
|
|
|
|
.method public getLinearDY(D)D
|
|
.locals 0
|
|
|
|
iget-wide p1, p0, Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;->mEllipseCenterY:D
|
|
|
|
return-wide p1
|
|
.end method
|
|
|
|
.method public getLinearX(D)D
|
|
.locals 4
|
|
|
|
iget-wide v0, p0, Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;->mTime1:D
|
|
|
|
sub-double/2addr p1, v0
|
|
|
|
iget-wide v0, p0, Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;->mOneOverDeltaTime:D
|
|
|
|
mul-double p1, p1, v0
|
|
|
|
iget-wide v0, p0, Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;->mX1:D
|
|
|
|
iget-wide v2, p0, Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;->mX2:D
|
|
|
|
sub-double/2addr v2, v0
|
|
|
|
mul-double v2, v2, p1
|
|
|
|
add-double/2addr v2, v0
|
|
|
|
return-wide v2
|
|
.end method
|
|
|
|
.method public getLinearY(D)D
|
|
.locals 4
|
|
|
|
iget-wide v0, p0, Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;->mTime1:D
|
|
|
|
sub-double/2addr p1, v0
|
|
|
|
iget-wide v0, p0, Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;->mOneOverDeltaTime:D
|
|
|
|
mul-double p1, p1, v0
|
|
|
|
iget-wide v0, p0, Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;->mY1:D
|
|
|
|
iget-wide v2, p0, Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;->mY2:D
|
|
|
|
sub-double/2addr v2, v0
|
|
|
|
mul-double v2, v2, p1
|
|
|
|
add-double/2addr v2, v0
|
|
|
|
return-wide v2
|
|
.end method
|
|
|
|
.method public getX()D
|
|
.locals 6
|
|
|
|
iget-wide v0, p0, Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;->mEllipseCenterX:D
|
|
|
|
iget-wide v2, p0, Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;->mEllipseA:D
|
|
|
|
iget-wide v4, p0, Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;->mTmpSinAngle:D
|
|
|
|
mul-double v2, v2, v4
|
|
|
|
add-double/2addr v2, v0
|
|
|
|
return-wide v2
|
|
.end method
|
|
|
|
.method public getY()D
|
|
.locals 6
|
|
|
|
iget-wide v0, p0, Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;->mEllipseCenterY:D
|
|
|
|
iget-wide v2, p0, Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;->mEllipseB:D
|
|
|
|
iget-wide v4, p0, Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;->mTmpCosAngle:D
|
|
|
|
mul-double v2, v2, v4
|
|
|
|
add-double/2addr v2, v0
|
|
|
|
return-wide v2
|
|
.end method
|
|
|
|
.method public lookup(D)D
|
|
.locals 8
|
|
|
|
const-wide/16 v0, 0x0
|
|
|
|
cmpg-double v2, p1, v0
|
|
|
|
if-gtz v2, :cond_0
|
|
|
|
return-wide v0
|
|
|
|
:cond_0
|
|
const-wide/high16 v0, 0x3ff0000000000000L # 1.0
|
|
|
|
cmpl-double v2, p1, v0
|
|
|
|
if-ltz v2, :cond_1
|
|
|
|
return-wide v0
|
|
|
|
:cond_1
|
|
iget-object v0, p0, Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;->mLut:[D
|
|
|
|
array-length v1, v0
|
|
|
|
add-int/lit8 v1, v1, -0x1
|
|
|
|
int-to-double v1, v1
|
|
|
|
mul-double p1, p1, v1
|
|
|
|
double-to-int v1, p1
|
|
|
|
int-to-double v2, v1
|
|
|
|
sub-double/2addr p1, v2
|
|
|
|
aget-wide v2, v0, v1
|
|
|
|
add-int/lit8 v4, v1, 0x1
|
|
|
|
aget-wide v4, v0, v4
|
|
|
|
aget-wide v6, v0, v1
|
|
|
|
sub-double/2addr v4, v6
|
|
|
|
mul-double v4, v4, p1
|
|
|
|
add-double/2addr v4, v2
|
|
|
|
return-wide v4
|
|
.end method
|
|
|
|
.method public setPoint(D)V
|
|
.locals 2
|
|
|
|
iget-boolean v0, p0, Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;->mVertical:Z
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
iget-wide v0, p0, Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;->mTime2:D
|
|
|
|
sub-double/2addr v0, p1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
iget-wide v0, p0, Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;->mTime1:D
|
|
|
|
sub-double v0, p1, v0
|
|
|
|
:goto_0
|
|
iget-wide p1, p0, Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;->mOneOverDeltaTime:D
|
|
|
|
mul-double v0, v0, p1
|
|
|
|
const-wide p1, 0x3ff921fb54442d18L # 1.5707963267948966
|
|
|
|
invoke-virtual {p0, v0, v1}, Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;->lookup(D)D
|
|
|
|
move-result-wide v0
|
|
|
|
mul-double v0, v0, p1
|
|
|
|
invoke-static {v0, v1}, Ljava/lang/Math;->sin(D)D
|
|
|
|
move-result-wide p1
|
|
|
|
iput-wide p1, p0, Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;->mTmpSinAngle:D
|
|
|
|
invoke-static {v0, v1}, Ljava/lang/Math;->cos(D)D
|
|
|
|
move-result-wide p1
|
|
|
|
iput-wide p1, p0, Landroidx/constraintlayout/motion/utils/ArcCurveFit$Arc;->mTmpCosAngle:D
|
|
|
|
return-void
|
|
.end method
|