public final Color constrainRGB() { // clamp the RGB value to a representable value float w = -MathUtils.min(0, r, g, b); if (w > 0) { r += w; g += w; b += w; } return this; }
public float getPrimitiveBound(int primID, int i) { int quad = 4 * primID; int a = 3 * quads[quad + 0]; int b = 3 * quads[quad + 1]; int c = 3 * quads[quad + 2]; int d = 3 * quads[quad + 3]; int axis = i >>> 1; if ((i & 1) == 0) return MathUtils.min(points[a + axis], points[b + axis], points[c + axis], points[d + axis]); else return MathUtils.max(points[a + axis], points[b + axis], points[c + axis], points[d + axis]); }
public final float getMin() { return MathUtils.min(r, g, b); }