what-the-bank/sources/com/kofax/kmc/ken/engines/gpu/Rotation.java

78 lines
2.0 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package com.kofax.kmc.ken.engines.gpu;
import org.bouncycastle.crypto.tls.CipherSuite;
/* loaded from: classes3.dex */
public enum Rotation {
NORMAL,
ROTATION_90,
ROTATION_180,
ROTATION_270;
/* renamed from: com.kofax.kmc.ken.engines.gpu.Rotation$1, reason: invalid class name */
/* loaded from: classes3.dex */
static /* synthetic */ class AnonymousClass1 {
static final int[] hs;
static {
int[] iArr = new int[Rotation.values().length];
hs = iArr;
try {
iArr[Rotation.NORMAL.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
hs[Rotation.ROTATION_90.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
hs[Rotation.ROTATION_180.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
try {
hs[Rotation.ROTATION_270.ordinal()] = 4;
} catch (NoSuchFieldError unused4) {
}
}
}
public final int asInt() {
int i = AnonymousClass1.hs[ordinal()];
if (i == 1) {
return 0;
}
if (i == 2) {
return 90;
}
if (i == 3) {
return CipherSuite.TLS_DHE_PSK_WITH_NULL_SHA256;
}
if (i == 4) {
return 270;
}
throw new IllegalStateException("Unknown Rotation!");
}
public static Rotation fromInt(int i) {
if (i == 0) {
return NORMAL;
}
if (i == 90) {
return ROTATION_90;
}
if (i == 180) {
return ROTATION_180;
}
if (i == 270) {
return ROTATION_270;
}
if (i == 360) {
return NORMAL;
}
StringBuilder sb = new StringBuilder();
sb.append(i);
sb.append(" is an unknown rotation. Needs to be either 0, 90, 180 or 270!");
throw new IllegalStateException(sb.toString());
}
}