Lines Matching refs:start
1037 * Returns the next double after {@code start} in the given {@code direction}.
1040 public static double nextAfter(double start, double direction) {
1041 if (start == 0 && direction == 0) {
1044 return nextafter(start, direction);
1048 * Returns the next float after {@code start} in the given {@code direction}.
1051 public static float nextAfter(float start, double direction) {
1052 if (Float.isNaN(start) || Double.isNaN(direction)) {
1055 if (start == 0 && direction == 0) {
1058 if ((start == Float.MIN_VALUE && direction < start)
1059 || (start == -Float.MIN_VALUE && direction > start)) {
1060 return (start > 0 ? 0f : -0f);
1062 if (Float.isInfinite(start) && (direction != start)) {
1063 return (start > 0 ? Float.MAX_VALUE : -Float.MAX_VALUE);
1065 if ((start == Float.MAX_VALUE && direction > start)
1066 || (start == -Float.MAX_VALUE && direction < start)) {
1067 return (start > 0 ? Float.POSITIVE_INFINITY
1070 if (direction > start) {
1071 if (start > 0) {
1072 return Float.intBitsToFloat(Float.floatToIntBits(start) + 1);
1074 if (start < 0) {
1075 return Float.intBitsToFloat(Float.floatToIntBits(start) - 1);
1079 if (direction < start) {
1080 if (start > 0) {
1081 return Float.intBitsToFloat(Float.floatToIntBits(start) - 1);
1083 if (start < 0) {
1084 return Float.intBitsToFloat(Float.floatToIntBits(start) + 1);