mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 00:04:10 -08:00
classlib: get rid of call to Math.log
This commit is contained in:
parent
953c475b46
commit
facf3c496f
|
@ -66,7 +66,7 @@ class TConversion {
|
|||
return val.toString();
|
||||
}
|
||||
double bitsForRadixDigit;
|
||||
bitsForRadixDigit = Math.log(radix) / Math.log(2);
|
||||
bitsForRadixDigit = Integer.SIZE - Integer.numberOfLeadingZeros(radix) - 1;
|
||||
int resLengthInChars = (int) (val.abs().bitLength() / bitsForRadixDigit + ((sign < 0) ? 1 : 0)) + 1;
|
||||
|
||||
char[] result = new char[resLengthInChars];
|
||||
|
|
Loading…
Reference in New Issue
Block a user