private void allocRenderables (int capacity) { // Free old meshes int meshCount = MathUtils.ceil(capacity / MAX_PARTICLES_PER_MESH), free = renderablePool.getFree(); if (free < meshCount) { for (int i = 0, left = meshCount - free; i < left; ++i) renderablePool.free(renderablePool.newObject()); } }
private void allocRenderables (int capacity) { // Free old meshes int meshCount = MathUtils.ceil(capacity / MAX_PARTICLES_PER_MESH), free = renderablePool.getFree(); if (free < meshCount) { for (int i = 0, left = meshCount - free; i < left; ++i) renderablePool.free(renderablePool.newObject()); } }
/** * Used to help find the last parameter to give the constructor of this class. * @param tcf the TextCellFactory being used * @param height the height of the area you want to put text into * @return The last argument to give to * {@link #LinesPanel(IMarkup, BitmapFont, int)} when the * desired <b>pixel</b> height is {@code height} */ public static int computeMaxLines(TextCellFactory tcf, float height) { return MathUtils.ceil(height / tcf.lineHeight); }
private int nanosToSeconds(long nano) { return MathUtils.ceil((float) (nano * NANOS_TO_SECONDS)); }
/** * Used to help find the last parameter to give the constructor of this class. * @param font the font being used * @param height the height of the area you want to put text into * @return The last argument to give to * {@link #LinesPanel(IMarkup, BitmapFont, int)} when the * desired <b>pixel</b> height is {@code height} */ public static int computeMaxLines(BitmapFont font, float height) { return MathUtils.ceil(height / font.getData().lineHeight); }
private void allocRenderables (int capacity) { // Free old meshes int meshCount = MathUtils.ceil(capacity / MAX_PARTICLES_PER_MESH), free = renderablePool.getFree(); if (free < meshCount) { for (int i = 0, left = meshCount - free; i < left; ++i) renderablePool.free(renderablePool.newObject()); } }
x = (MathUtils.floor(x / (portionX * 2))) * portionX * 2; final float portionY = 2f * heightOffSet / (rayNum - 1); y = (MathUtils.ceil(y / (portionY * 2))) * portionY * 2; for (int i = 0; i < rayNum; i++) { final float steppedX = i * portionX + x;
x = (MathUtils.floor(x / (portionX * 2))) * portionX * 2; final float portionY = 2f * heightOffSet / (rayNum - 1); y = (MathUtils.ceil(y / (portionY * 2))) * portionY * 2; for (int i = 0; i < rayNum; i++) { final float steppedX = i * portionX + x;
x = (MathUtils.floor( x / (portionX * 2) )) * portionX * 2; final float portionY = 2f * heightOffSet / (rayNum - 1); y = (MathUtils.ceil( y / (portionY * 2) )) * portionY * 2; for( int i = 0; i < rayNum; i++ ) {
/** * Sets the font to use. This method should be called once before * {@link #init(float, float, Collection)} if the font wasn't given at * creation-time. * * @param font * The font to use. */ public void setFont(BitmapFont font) { this.font = font; tcf = new TextCellFactory().font(font).height(MathUtils.ceil(font.getLineHeight())) .width(MathUtils.round(font.getSpaceWidth())); if (markup != null) font.getData().markupEnabled = true; }
final int increaseAlready, nbLines = MathUtils.ceil(glyph.height / lineHeight); if (drawBottomUp) {
plotter.plot(new Vector3(x, y, z), new Vector3(deltaX, deltaY, deltaZ), MathUtils.ceil(reach * reach)); Vec3i last = null; while (plotter.next()) {
mouseLeft.reinitialize(leftWidth, leftHeight, 4, 16, offsetX, offsetY); mouseRight.reinitialize(rightWidth, rightHeight, 12, 24, MathUtils.ceil(offsetX - (screenWidth - sectionWidth)), MathUtils.round(offsetY - rightHeight * 0.5f + (right.getGridHeight() * rightHeight - screenHeight))); this.screenWidth = screenWidth;