.class public Lcom/esotericsoftware/spine/vertexeffects/SwirlEffect;
.super Ljava/lang/Object;
.source "SwirlEffect.java"

# interfaces
.implements Lcom/esotericsoftware/spine/SkeletonRenderer$VertexEffect;


# instance fields
.field private a:F

.field private b:F

.field private c:F

.field private d:F

.field private e:Lcom/badlogic/gdx/math/Interpolation;

.field private f:F

.field private g:F


# virtual methods
.method public a()V
    .locals 0

    return-void
.end method

.method public a(Lcom/badlogic/gdx/math/Vector2;Lcom/badlogic/gdx/math/Vector2;Lcom/badlogic/gdx/graphics/Color;Lcom/badlogic/gdx/graphics/Color;)V
    .locals 4

    .line 27
    iget p2, p1, Lcom/badlogic/gdx/math/Vector2;->x:F

    iget p3, p0, Lcom/esotericsoftware/spine/vertexeffects/SwirlEffect;->a:F

    sub-float/2addr p2, p3

    .line 28
    iget p3, p1, Lcom/badlogic/gdx/math/Vector2;->y:F

    iget p4, p0, Lcom/esotericsoftware/spine/vertexeffects/SwirlEffect;->b:F

    sub-float/2addr p3, p4

    mul-float p4, p2, p2

    mul-float v0, p3, p3

    add-float/2addr p4, v0

    float-to-double v0, p4

    .line 29
    invoke-static {v0, v1}, Ljava/lang/Math;->sqrt(D)D

    move-result-wide v0

    double-to-float p4, v0

    .line 30
    iget v0, p0, Lcom/esotericsoftware/spine/vertexeffects/SwirlEffect;->c:F

    cmpg-float v0, p4, v0

    if-gez v0, :cond_0

    .line 31
    iget-object v0, p0, Lcom/esotericsoftware/spine/vertexeffects/SwirlEffect;->e:Lcom/badlogic/gdx/math/Interpolation;

    const/4 v1, 0x0

    iget v2, p0, Lcom/esotericsoftware/spine/vertexeffects/SwirlEffect;->d:F

    iget v3, p0, Lcom/esotericsoftware/spine/vertexeffects/SwirlEffect;->c:F

    sub-float/2addr v3, p4

    iget p4, p0, Lcom/esotericsoftware/spine/vertexeffects/SwirlEffect;->c:F

    div-float/2addr v3, p4

    invoke-virtual {v0, v1, v2, v3}, Lcom/badlogic/gdx/math/Interpolation;->a(FFF)F

    move-result p4

    .line 32
    invoke-static {p4}, Lcom/esotericsoftware/spine/utils/SpineUtils;->c(F)F

    move-result v0

    invoke-static {p4}, Lcom/esotericsoftware/spine/utils/SpineUtils;->d(F)F

    move-result p4

    mul-float v1, v0, p2

    mul-float v2, p4, p3

    sub-float/2addr v1, v2

    .line 33
    iget v2, p0, Lcom/esotericsoftware/spine/vertexeffects/SwirlEffect;->a:F

    add-float/2addr v1, v2

    iput v1, p1, Lcom/badlogic/gdx/math/Vector2;->x:F

    mul-float p4, p4, p2

    mul-float v0, v0, p3

    add-float/2addr p4, v0

    .line 34
    iget p2, p0, Lcom/esotericsoftware/spine/vertexeffects/SwirlEffect;->b:F

    add-float/2addr p4, p2

    iput p4, p1, Lcom/badlogic/gdx/math/Vector2;->y:F

    :cond_0
    return-void
.end method

.method public a(Lcom/esotericsoftware/spine/Skeleton;)V
    .locals 2

    .line 22
    invoke-virtual {p1}, Lcom/esotericsoftware/spine/Skeleton;->i()F

    move-result v0

    iget v1, p0, Lcom/esotericsoftware/spine/vertexeffects/SwirlEffect;->f:F

    add-float/2addr v0, v1

    iput v0, p0, Lcom/esotericsoftware/spine/vertexeffects/SwirlEffect;->a:F

    .line 23
    invoke-virtual {p1}, Lcom/esotericsoftware/spine/Skeleton;->j()F

    move-result p1

    iget v0, p0, Lcom/esotericsoftware/spine/vertexeffects/SwirlEffect;->g:F

    add-float/2addr p1, v0

    iput p1, p0, Lcom/esotericsoftware/spine/vertexeffects/SwirlEffect;->b:F

    return-void
.end method
