You should consider the following:
Where do x, y, z come from?
Do you have x [] y [] and z [] array for coordinates? Where do you repeat?
for (int i = 0; i < len; i++) { process(x[i], y[i], z[i]; }
In doubt, this will be faster than iterating inside:
public void process (double x [], double y [], double z []) {
for (int i = 0; i < len; i++) { rbgb[0] = (x[i] * 3.24606 + y[i] * 1.5372 + z[i] * -0.4986); }
}
source share