@Nullable
	public Float getFloatValue(@FloatFormat final int formatType,
							   @IntRange(from = 0) final int offset) {
		if ((offset + getTypeLen(formatType)) > size()) return null;

		switch (formatType) {
			case FORMAT_SFLOAT -> {
				if (mValue[offset + 1] == 0x07 && mValue[offset] == (byte) 0xFE)
					return Float.POSITIVE_INFINITY;
				if ((mValue[offset + 1] == 0x07 && mValue[offset] == (byte) 0xFF) ||
						(mValue[offset + 1] == 0x08 && mValue[offset] == 0x00) ||
						(mValue[offset + 1] == 0x08 && mValue[offset] == 0x01))
					return Float.NaN;
				if (mValue[offset + 1] == 0x08 && mValue[offset] == 0x02)
					return Float.NEGATIVE_INFINITY;
				return bytesToFloat(mValue[offset], mValue[offset + 1]);
			}
			case FORMAT_FLOAT -> {
				if (mValue[offset + 3] == 0x00) {
					if (mValue[offset + 2] == 0x7F && mValue[offset + 1] == (byte) 0xFF) {
						if (mValue[offset] == (byte) 0xFE)
							return Float.POSITIVE_INFINITY;
						if (mValue[offset] == (byte) 0xFF)
							return Float.NaN;
					} else if (mValue[offset + 2] == (byte) 0x80 && mValue[offset + 1] == 0x00) {
						if (mValue[offset] == 0x00 || mValue[offset] == 0x01)
							return Float.NaN;
						if (mValue[offset] == 0x02)
							return Float.NEGATIVE_INFINITY;
					}
				}
				return bytesToFloat(mValue[offset], mValue[offset + 1],
						mValue[offset + 2], mValue[offset + 3]);
			}
		}

		return null;
	}
Returns an float value from the given byte array.

@param formatType The format type used to interpret the value.
@param offset     Offset at which the float value can be found.
@return Cached value at a given offset or null if the requested offset exceeds the value size.
ble/src/main/java/no/nordicsemi/android/ble/data/Data.java