List of usage examples for org.apache.commons.math3.util FastMath nextDown
public static float nextDown(final float a)
From source file:it.unibo.alchemist.model.implementations.environments.Continuous2DEnvironment.java
/** * Allows to extend the size of the environment by adding some object. * /*from w ww .j av a 2 s. c o m*/ * @param startx * minimum x position of the object * @param endx * maximum x position of the object * @param starty * minimum y position of the object * @param endy * maximum y position of the object */ protected final void includeObject(final double startx, final double endx, final double starty, final double endy) { if (startx < minX) { minX = FastMath.nextDown(startx); } if (starty < minY) { minY = FastMath.nextDown(starty); } if (endx > maxX) { maxX = FastMath.nextUp(endx); } if (endy > maxY) { maxY = FastMath.nextUp(endy); } assert minX < maxX; assert minY < maxY; }