public static double nextUp(double d){
  if (d == Double.POSITIVE_INFINITY)   return d;
 else {
    d+=0.0d;
    return Double.longBitsToDouble(Double.doubleToRawLongBits(d) + ((d >= 0.0d) ? +1L : -1L));
  }
}

public static double nextUp ( double d ) { if ( d == Double . POSITIVE_INFINITY ) return d ; else { d += 0.0d ; return Double . longBitsToDouble ( Double . doubleToRawLongBits ( d ) + ( ( d >= 0.0d ) ? + 1L : - 1L ) ) ; } }
replacement for the math . nextup ( . . . ) method that is only available in honeycomb and higher . dat ' s some seeeeek sheeet .
