Converting four bytes to a Little Endian float.

@param b1 the first byte.
@param b2 the second byte.
@param b3 the third byte.
@param b4 the fourth byte.
@return the conversion result
487069
@Pure
	@Inline(value = "Float.intBitsToFloat(EndianNumbers.toLEInt($1, $2, $3, $4))",
			imported = {EndianNumbers.class})
	public static float toLEFloat(int b1, int b2, int b3, int b4) {
		return Float.intBitsToFloat(toLEInt(b1, b2, b3, b4));
	}
378435
public static byte[] writeInt(int v, byte[] b, int offset) {
        b[offset] = (byte) v;
        b[offset + 1] = (byte) (v >> 8);
        b[offset + 2] = (byte) (v >> 16);
        b[offset + 3] = (byte) (v >> 24);

        return b;
    }
1348414
def reading_order(e1, e2):
    
    b1 = e1.bbox
    b2 = e2.bbox
    if round(b1[y0]) == round(b2[y0]) or round(b1[y1]) == round(b2[y1]):
        return float_cmp(b1[x0], b2[x0])
    return float_cmp(b1[y0], b2[y0])
1292698
public static void writeIntegerLittleEndian(byte[] buffer, int offset, int value) {
		buffer[offset++] = (byte)(value & 0xFF);
		buffer[offset++] = (byte)((value >> 8) & 0xFF);
		buffer[offset++] = (byte)((value >> 16) & 0xFF);
		buffer[offset] = (byte)((value >> 24) & 0xFF);
	}
387760
private static int get16(byte[] b, int off) {
        return Byte.toUnsignedInt(b[off]) | ( Byte.toUnsignedInt(b[off+1]) << 8);
    }
1060591
private int grabNext16BitInt() throws WsocBufferException {
        int value = 0;
        byte b1;
        byte b2;

        // Network order data should be Big Endian, so first byte read is most significant.  Java is also Big Endian, so...
        b1 = this.grabNextByte();
        b2 = this.grabNextByte();
        // not sure one needs the "&" below - but put it in for safety given the typecasting
        value = ((b1) & 0x000000ff) << 8 | ((b2) & 0x000000ff);

        return value;
    }
757725
public static int compareBytes(byte[] b1, int s1, int l1,
                                   byte[] b2, int s2, int l2) {
        return FastByteComparisons.compareTo(b1, s1, l1, b2, s2, l2);
    }
1290772
public static final long toLong(byte[] b) {
        long x = 0;
        for (int i = b.length; i > 0; x |= (b[--i] & 0xffL) << (i << 3));
        return x;
    }
977705
public void toBytes(byte[] b, int offset) {
    ByteConverter.float8(b, offset, x);
    ByteConverter.float8(b, offset + 8, y);
  }
966467
public static int toShort(byte[] b, int off, boolean littleEndian) {
		if (littleEndian) {
			return ((b[off] & 0xFF) | ((b[off + 1] & 0xFF) << 8));
		}
		return (((b[off] & 0xFF) << 8) | (b[off + 1] & 0xFF));
	}
637321
public static byte[] getBytesLittleEndian(long value) {
		byte[] b = new byte[8];
		b[0] = (byte)(value & 0xFF);
		b[1] = (byte)((value >> 8) & 0xFF);
		b[2] = (byte)((value >> 16) & 0xFF);
		b[3] = (byte)((value >> 24) & 0xFF);
		b[4] = (byte)((value >> 32) & 0xFF);
		b[5] = (byte)((value >> 40) & 0xFF);
		b[6] = (byte)((value >> 48) & 0xFF);
		b[7] = (byte)((value >> 56) & 0xFF);
		return b;
	}
272601
public static int byteArrayToInt(byte[] b, int offset) {
        int value = 0;
        for (int i = 0; i < 4; i++) {
            int shift = (4 - 1 - i) * 8;
            value += (b[i + offset] & 0x000000FF) << shift;
}
        return value;
    }
209651
public static int twoBytesToInt(byte[] bytes, ByteOrder order) {

        if (order == ByteOrder.BIG_ENDIAN) {
            return bytesToInt(bytes[0], bytes[1]);

        } else if (order == ByteOrder.LITTLE_ENDIAN) {
            return bytesToInt(bytes[1], bytes[0]);

        } else {
            throw new IllegalArgumentException("ByteOrder must be BIG_ENDIAN or LITTLE_ENDIAN");

        }
    }
1096533
final int compare(MutableBigInteger b) {
        int blen = b.intLen;
        if (intLen < blen)
            return -1;
        if (intLen > blen)
           return 1;

        // Add Integer.MIN_VALUE to make the comparison act as unsigned integer
        // comparison.
        int[] bval = b.value;
        for (int i = offset, j = b.offset; i < intLen + offset; i++, j++) {
            int b1 = value[i] + 0x80000000;
            int b2 = bval[j]  + 0x80000000;
            if (b1 < b2)
                return -1;
            if (b1 > b2)
                return 1;
        }
        return 0;
    }
463068
public static void setLong(final byte[] b, final long n, final int offset) {
        b[offset + 0] = (byte) (n >>> 56);
        b[offset + 1] = (byte) (n >>> 48);
        b[offset + 2] = (byte) (n >>> 40);
        b[offset + 3] = (byte) (n >>> 32);
        b[offset + 4] = (byte) (n >>> 24);
        b[offset + 5] = (byte) (n >>> 16);
        b[offset + 6] = (byte) (n >>> 8);
        b[offset + 7] = (byte) (n >>> 0);
    }
764877
public static void setShort(int n, byte[] b, int off, boolean littleEndian) {
		if (littleEndian) {
			b[off] = (byte) n;
			b[off + 1] = (byte) (n >>> 8);
		} else {
			b[off] = (byte) (n >>> 8);
			b[off + 1] = (byte) n;
		}
	}
100179
public static float bytesHighFirstToFloat(byte[] bytes, int start)
    {
        int l = bytesHighFirstToInt(bytes, start);
        return Float.intBitsToFloat(l);
    }