what-the-bank/sources/o/ghO.java

60 lines
1.8 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package o;
import java.text.DecimalFormat;
/* loaded from: classes.dex */
public final class ghO {
public final double a;
public final double d;
public ghO(double d, double d2) {
this.d = d;
this.a = d2;
}
public static Double d(Axo axo, Axo axo2, Axo axo3, boolean z) {
double abs = Math.abs(axo.doubleValue()) + (axo2.doubleValue() / 60.0d) + (axo3.doubleValue() / 3600.0d);
if (Double.isNaN(abs)) {
return null;
}
if (z) {
abs = -abs;
}
return Double.valueOf(abs);
}
public final boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null || getClass() != obj.getClass()) {
return false;
}
ghO gho = (ghO) obj;
return Double.compare(gho.d, this.d) == 0 && Double.compare(gho.a, this.a) == 0;
}
public final int hashCode() {
double d = this.d;
long doubleToLongBits = d != 0.0d ? Double.doubleToLongBits(d) : 0L;
int i = (int) (doubleToLongBits ^ (doubleToLongBits >>> 32));
double d2 = this.a;
long doubleToLongBits2 = d2 != 0.0d ? Double.doubleToLongBits(d2) : 0L;
return (i * 31) + ((int) ((doubleToLongBits2 >>> 32) ^ doubleToLongBits2));
}
public final String toString() {
StringBuilder sb = new StringBuilder();
sb.append(this.d);
sb.append(", ");
sb.append(this.a);
return sb.toString();
}
public static String a(double d) {
double[] dArr = {(int) d, (int) r9, (Math.abs((d % 1.0d) * 60.0d) % 1.0d) * 60.0d};
DecimalFormat decimalFormat = new DecimalFormat("0.##");
return String.format("%s° %s' %s\"", decimalFormat.format(dArr[0]), decimalFormat.format(dArr[1]), decimalFormat.format(dArr[2]));
}
}