FinderPatternFinder$FurthestFromAverageComparator.smali
.class final Lcom/dcloud/zxing2/qrcode/detector/FinderPatternFinder$FurthestFromAverageComparator;
.super Ljava/lang/Object;
# interfaces
.implements Ljava/util/Comparator;
.implements Ljava/io/Serializable;
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/dcloud/zxing2/qrcode/detector/FinderPatternFinder;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x1a
name = "FurthestFromAverageComparator"
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/lang/Object;",
"Ljava/util/Comparator<",
"Lcom/dcloud/zxing2/qrcode/detector/FinderPattern;",
">;",
"Ljava/io/Serializable;"
}
.end annotation
# instance fields
.field private final average:F
# direct methods
.method private constructor <init>(F)V
.registers 2
.line 2
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 3
iput p1, p0, Lcom/dcloud/zxing2/qrcode/detector/FinderPatternFinder$FurthestFromAverageComparator;->average:F
return-void
.end method
.method synthetic constructor <init>(FLcom/dcloud/zxing2/qrcode/detector/FinderPatternFinder$1;)V
.registers 3
.line 1
invoke-direct {p0, p1}, Lcom/dcloud/zxing2/qrcode/detector/FinderPatternFinder$FurthestFromAverageComparator;-><init>(F)V
return-void
.end method
# virtual methods
.method public compare(Lcom/dcloud/zxing2/qrcode/detector/FinderPattern;Lcom/dcloud/zxing2/qrcode/detector/FinderPattern;)I
.registers 4
.line 2
invoke-virtual {p2}, Lcom/dcloud/zxing2/qrcode/detector/FinderPattern;->getEstimatedModuleSize()F
move-result p2
iget v0, p0, Lcom/dcloud/zxing2/qrcode/detector/FinderPatternFinder$FurthestFromAverageComparator;->average:F
sub-float/2addr p2, v0
invoke-static {p2}, Ljava/lang/Math;->abs(F)F
move-result p2
.line 3
invoke-virtual {p1}, Lcom/dcloud/zxing2/qrcode/detector/FinderPattern;->getEstimatedModuleSize()F
move-result p1
iget v0, p0, Lcom/dcloud/zxing2/qrcode/detector/FinderPatternFinder$FurthestFromAverageComparator;->average:F
sub-float/2addr p1, v0
invoke-static {p1}, Ljava/lang/Math;->abs(F)F
move-result p1
cmpg-float v0, p2, p1
if-gez v0, :cond_1c
const/4 p1, -0x1
goto :goto_23
:cond_1c
cmpl-float p1, p2, p1
if-nez p1, :cond_22
const/4 p1, 0x0
goto :goto_23
:cond_22
const/4 p1, 0x1
:goto_23
return p1
.end method
.method public bridge synthetic compare(Ljava/lang/Object;Ljava/lang/Object;)I
.registers 3
.line 1
check-cast p1, Lcom/dcloud/zxing2/qrcode/detector/FinderPattern;
check-cast p2, Lcom/dcloud/zxing2/qrcode/detector/FinderPattern;
invoke-virtual {p0, p1, p2}, Lcom/dcloud/zxing2/qrcode/detector/FinderPatternFinder$FurthestFromAverageComparator;->compare(Lcom/dcloud/zxing2/qrcode/detector/FinderPattern;Lcom/dcloud/zxing2/qrcode/detector/FinderPattern;)I
move-result p1
return p1
.end method