Files
tustu/app/obfuscated_packages/L/ArrayLookup2DFunction.java
johndoe6345789 347ed15b78 Add Gauge Color Setters and Properties Menu
- Introduced multiple GaugeColorSetter classes (B to L) for setting gauge colors dynamically.
- Implemented GaugePropertiesMenu class to manage gauge properties and settings.
- Added action listeners for gauge styles and slider value changes to enhance interactivity.
- Created RadioButtonColorSelectionListener and StaticValueActionListener for handling user input.
- Ensured compatibility with existing gauge components and UI elements.
2026-01-11 07:39:35 +00:00

128 lines
3.4 KiB
Java

package L;
import G.aI;
import G.aM;
import V.g;
import ax.S;
import ax.ab;
import ax.ac;
public class ArrayLookup2DFunction extends ac {
aI a;
ab b;
ab c;
ab d;
aM e = null;
aM f = null;
public U(aI paramaI, ab paramab1, ab paramab2, ab paramab3) {
this.a = paramaI;
this.b = paramab1;
this.c = paramab2;
this.d = paramab3;
}
public double a(S paramS) {
c(paramS);
try {
double d1 = this.d.b(paramS);
double[][] arrayOfDouble1 = this.f.i(this.a.h());
double d2 = b(arrayOfDouble1, d1);
double[][] arrayOfDouble2 = this.e.i(this.a.h());
return a(arrayOfDouble2, d2);
} catch (g g) {
throw new ax.U("Unable to evaluate tableLookup: " + g.getLocalizedMessage());
}
}
public double b(S paramS) {
return a(paramS);
}
private void c(S paramS) {
if (this.e == null) {
this.e = l.a().a((int)this.b.b(paramS));
if (this.e == null)
throw new ax.U("Array Parameter not found!");
if (!this.e.i().equals("array"))
throw new ax.U("Array Parameter must be of type array!");
if (this.e.m() != 1)
throw new ax.U("Array Parameter must be 1D array!");
}
if (this.f == null) {
this.f = l.a().a((int)this.c.b(paramS));
if (this.f == null)
throw new ax.U("Array Parameter not found!");
if (!this.f.i().equals("array"))
throw new ax.U("Array Parameter must be of type array!");
if (this.f.m() != 1)
throw new ax.U("Array Parameter must be 1D array!");
}
}
public double a(double[][] paramArrayOfdouble, double paramDouble) {
int i = (int)paramDouble;
int j = (int)Math.ceil(paramDouble);
double d = paramDouble - i;
return paramArrayOfdouble[i][0] + d * (paramArrayOfdouble[j][0] - paramArrayOfdouble[i][0]);
}
public static double b(double[][] paramArrayOfdouble, double paramDouble) {
double d1 = 0.0D;
double d2 = (paramArrayOfdouble.length - 1);
boolean bool = (paramArrayOfdouble[0][0] <= paramArrayOfdouble[paramArrayOfdouble.length - 1][0]) ? true : false;
if (bool) {
for (byte b = 0; b < paramArrayOfdouble.length; b++) {
double d = paramArrayOfdouble[b][0];
if (d == paramDouble) {
d2 = b;
break;
}
if (d > paramDouble) {
if (b == 0 && paramDouble <= d) {
d2 = 0.0D;
break;
}
d2 = b - 1.0D + (paramDouble - d1) / (d - d1);
break;
}
d1 = d;
}
} else {
d2 = 0.0D;
d1 = paramArrayOfdouble[paramArrayOfdouble.length - 1][0];
for (int i = paramArrayOfdouble.length - 1; i >= 0; i--) {
double d = paramArrayOfdouble[i][0];
if (d == paramDouble) {
d2 = i;
break;
}
if (d > paramDouble) {
if (i == paramArrayOfdouble.length && paramDouble <= d) {
d2 = paramArrayOfdouble.length;
break;
}
d2 = i + (d1 - paramDouble) / (d - d1);
break;
}
d1 = d;
}
}
return d2;
}
public String toString() {
return "tableLookup(" + this.b.toString() + ", " + this.c.toString() + ", " + this.d.toString() + " )";
}
}
/* Location: /home/rewrich/Downloads/TunerStudioMS/TunerStudioMS/!/L/U.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/