I have two byte variables byte1, byte2. I know that the difference byte1 - byte2 will involve an implicit casting to int. But if I am interested in the absolute value of the difference, and want to get abs(byte1-byte2) again in byte format, is there a way to avoid casting back to byte, i.e. avoid
byte diff = (byte) abs(byte1-byte2);
Background is efficiency in performing a large number of such differences.