Explicitly cast result of Math.pow
to int
in BinaryToHexadecimal
(#4970)
This commit is contained in:
parent
361b4108ee
commit
f8de290188
@ -34,7 +34,7 @@ public class BinaryToHexadecimal {
|
||||
for (i = 0; i < 4; i++) {
|
||||
currbit = binary % 10;
|
||||
binary = binary / 10;
|
||||
code4 += currbit * Math.pow(2, i);
|
||||
code4 += currbit * (int) Math.pow(2, i);
|
||||
}
|
||||
hex = hm.get(code4) + hex;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user