Skip to content

Commit

Permalink
Removing debug instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexisDrogoul committed Sep 22, 2021
1 parent ac82423 commit a5e57c8
Showing 1 changed file with 4 additions and 4 deletions.
Expand Up @@ -20,7 +20,7 @@
public class GradientBasedMeshColorProvider implements IMeshColorProvider {

static {
DEBUG.ON();
DEBUG.OFF();
}

/** The components. */
Expand Down Expand Up @@ -78,7 +78,7 @@ public double[] getColor(final int index, final double z, final double min, fina
if (result == null) { result = new double[3]; }

double position = (z - min) / (max - min);
DEBUG.OUT("Position " + position + " corresponds to slot ", false);
// DEBUG.OUT("Position " + position + " corresponds to slot ", false);
for (int s = 0; s < size - 1; s++) {
var leftStop = components[s * 4 + 3];
var rightStop = components[(s + 1) * 4 + 3];
Expand All @@ -91,15 +91,15 @@ public double[] getColor(final int index, final double z, final double min, fina
}
if (position < rightStop) {
double r = (position - leftStop) / (rightStop - leftStop);
DEBUG.OUT(s + " with a ratio of " + r);
// DEBUG.OUT(s + " with a ratio of " + r);
double ir = 1d - r;
result[0] = components[s * 4] * ir + components[(s + 1) * 4] * r;
result[1] = components[s * 4 + 1] * ir + components[(s + 1) * 4 + 1] * r;
result[2] = components[s * 4 + 2] * ir + components[(s + 1) * 4 + 2] * r;
return result;
}
}
DEBUG.OUT(size - 1);
// DEBUG.OUT(size - 1);
result[0] = components[4 * (size - 1)];
result[1] = components[4 * (size - 1) + 1];
result[2] = components[4 * (size - 1) + 2];
Expand Down

0 comments on commit a5e57c8

Please sign in to comment.