src/neon/physics/Hitbox.java
/**
   * Shifts the hitbox so that it fits within the specified bounds.
   *
   * @param lowX the low X bound
   * @param highX the high X bound
   * @param lowY the low Y bound
   * @param highY the high Y bound
   */
Shifts the hitbox so that it fits within the specified bounds.
@param lowX the low X bound
@param highX the high X bound
@param lowY the low Y bound
@param highY the high Y bound
Shifts the hitbox so that it fits within the specified bounds . @param lowX the low X bound @param highX the high X bound @param lowY the low Y bound @param highY the high Y bound
public void keepWithinBounds(double lowX, double highX, double lowY, double highY) {
    if (getLowerXBound() < lowX) {
      setLowerXBound(lowX);
    } else if (getHigherXBound() > highX) {
      setHigherXBound(highX);
    }
    if (getLowerYBound() < lowY) {
      setLowerYBound(lowY);
    } else if (getHigherYBound() > highY) {
      setHigherYBound(highY);
    }
  }
public void keepWithinBounds ( double lowX , double highX , double lowY , double highY ) { if ( getLowerXBound ( ) < lowX ) { setLowerXBound ( lowX ) ; } else if ( getHigherXBound ( ) > highX ) { setHigherXBound ( highX ) ; } if ( getLowerYBound ( ) < lowY ) { setLowerYBound ( lowY ) ; } else if ( getHigherYBound ( ) > highY ) { setHigherYBound ( highY ) ; } }
Shifts the hitbox so that it fits within the specified bounds.
Shifts the hitbox so that it fits within the specified bounds .