Skip to content

Commit

Permalink
Drop unused code from FloatObject
Browse files Browse the repository at this point in the history
  • Loading branch information
fniephaus committed Mar 11, 2023
1 parent a32c201 commit 8295bae
Showing 1 changed file with 0 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,21 +67,10 @@ public void setLow(final long value) {
setWords(getHigh(), value);
}

private void setWords(final int high, final int low) {
setWords(Integer.toUnsignedLong(high), Integer.toUnsignedLong(low));
}

private void setWords(final long high, final long low) {
doubleValue = Double.longBitsToDouble(high << 32 | low);
}

public void setBytes(final byte[] bytes) {
assert bytes.length == WORD_LENGTH * 4;
final int high = (bytes[3] & 0xff) << 24 | (bytes[2] & 0xff) << 16 | (bytes[1] & 0xff) << 8 | bytes[0] & 0xff;
final int low = (bytes[7] & 0xff) << 24 | (bytes[6] & 0xff) << 16 | (bytes[5] & 0xff) << 8 | bytes[4] & 0xff;
setWords(high, low);
}

public byte[] getBytes() {
return getBytes(doubleValue);
}
Expand Down

0 comments on commit 8295bae

Please sign in to comment.