public static int minLimit(int receiver, int... minBound) { return max(receiver, minBound); }
public static float minLimit(float receiver, float... minBound) { return max(receiver, minBound); }
public static java.awt.Color mixedColor(java.awt.Color originalColor, java.awt.Color overlayColor) { final float[] hsbColor = java.awt.Color.RGBtoHSB(originalColor.getRed(), originalColor.getGreen(), originalColor.getBlue(), new float[3]); final float[] hsbError = java.awt.Color.RGBtoHSB(overlayColor.getRed(), overlayColor.getGreen(), overlayColor.getBlue(), new float[3]); final float[] hsbMixed = new float[3]; // kotlin code //hsbMixed[0] = hsbError[0] //hsbMixed[1] = hsbColor[1].rangeLimit(hsbError[1].max(0.3f).min(0.5f), 1.0f) //hsbMixed[2] = hsbColor[2].rangeLimit(hsbError[2].max(0.3f).min(0.5f), 1.0f) //return Color.getHSBColor(hsbMixed[0], hsbMixed[1], hsbMixed[2]) // incorrect translation from kotlin //hsbMixed[0] = hsbError[0]; //hsbMixed[1] = min(max(rangeLimit(hsbColor[1], hsbError[1], 0.3f), 0.5f), 1.0f); //hsbMixed[2] = min(max(rangeLimit(hsbColor[2], hsbError[2], 0.3f), 0.5f), 1.0f); //return java.awt.Color.getHSBColor(hsbMixed[0], hsbMixed[1], hsbMixed[2]); hsbMixed[0] = hsbError[0]; hsbMixed[1] = rangeLimit(hsbColor[1], min(max(hsbError[1], 0.3f), 0.5f), 1.0f); hsbMixed[2] = rangeLimit(hsbColor[2], min(max(hsbError[2], 0.3f), 0.5f), 1.0f); return java.awt.Color.getHSBColor(hsbMixed[0], hsbMixed[1], hsbMixed[2]); } }
public int getMaxColumns() { int headingColumns = header.getMaxColumns(); int separatorColumns = separator.getMaxColumns(); int bodyColumns = body.getMaxColumns(); return max(headingColumns, separatorColumns, bodyColumns); }
public static int minLimit(int receiver, int... minBound) { return max(receiver, minBound); }
public static float minLimit(float receiver, float... minBound) { return max(receiver, minBound); }
@Override public BasedSequence intersect(BasedSequence other) { if (getBase() != other.getBase()) return SubSequence.NULL; else if (other.getEndOffset() <= getStartOffset()) return subSequence(0, 0); else if (other.getStartOffset() >= getEndOffset()) return subSequence(length(), length()); else return this.baseSubSequence(Utils.max(getStartOffset(), other.getStartOffset()), Utils.min(getEndOffset(), other.getEndOffset())); }
} else { int start = Utils.min(chars.getStartOffset(), spanningChars.getStartOffset()); int end = Utils.max(chars.getEndOffset(), spanningChars.getEndOffset()); setChars(chars.baseSubSequence(start, end));
public static java.awt.Color mixedColor(java.awt.Color originalColor, java.awt.Color overlayColor) { final float[] hsbColor = java.awt.Color.RGBtoHSB(originalColor.getRed(), originalColor.getGreen(), originalColor.getBlue(), new float[3]); final float[] hsbError = java.awt.Color.RGBtoHSB(overlayColor.getRed(), overlayColor.getGreen(), overlayColor.getBlue(), new float[3]); final float[] hsbMixed = new float[3]; // kotlin code //hsbMixed[0] = hsbError[0] //hsbMixed[1] = hsbColor[1].rangeLimit(hsbError[1].max(0.3f).min(0.5f), 1.0f) //hsbMixed[2] = hsbColor[2].rangeLimit(hsbError[2].max(0.3f).min(0.5f), 1.0f) //return Color.getHSBColor(hsbMixed[0], hsbMixed[1], hsbMixed[2]) // incorrect translation from kotlin //hsbMixed[0] = hsbError[0]; //hsbMixed[1] = min(max(rangeLimit(hsbColor[1], hsbError[1], 0.3f), 0.5f), 1.0f); //hsbMixed[2] = min(max(rangeLimit(hsbColor[2], hsbError[2], 0.3f), 0.5f), 1.0f); //return java.awt.Color.getHSBColor(hsbMixed[0], hsbMixed[1], hsbMixed[2]); hsbMixed[0] = hsbError[0]; hsbMixed[1] = rangeLimit(hsbColor[1], min(max(hsbError[1], 0.3f), 0.5f), 1.0f); hsbMixed[2] = rangeLimit(hsbColor[2], min(max(hsbError[2], 0.3f), 0.5f), 1.0f); return java.awt.Color.getHSBColor(hsbMixed[0], hsbMixed[1], hsbMixed[2]); } }
public int getMaxColumns() { int headingColumns = header.getMaxColumns(); int separatorColumns = separator.getMaxColumns(); int bodyColumns = body.getMaxColumns(); return max(headingColumns, separatorColumns, bodyColumns); }
@Override public BasedSequence intersect(BasedSequence other) { if (getBase() != other.getBase()) return SubSequence.NULL; else if (other.getEndOffset() <= getStartOffset()) return subSequence(0, 0); else if (other.getStartOffset() >= getEndOffset()) return subSequence(length(), length()); else return this.baseSubSequence(Utils.max(getStartOffset(), other.getStartOffset()), Utils.min(getEndOffset(), other.getEndOffset())); }
} else { int start = Utils.min(chars.getStartOffset(), spanningChars.getStartOffset()); int end = Utils.max(chars.getEndOffset(), spanningChars.getEndOffset()); setChars(chars.baseSubSequence(start, end));