We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 07bb8b5 commit e01aa84Copy full SHA for e01aa84
src/functions/math.ts
@@ -3,10 +3,8 @@
3
// SPDX-FileCopyrightText: © 2024 Tenstorrent AI ULC
4
5
export const toHex = (num: number): string => {
6
- if (num < 0) {
7
- return toHex(0xffffffff + num + 1);
8
- }
9
- return `0x${num.toString(16).toUpperCase()}`;
+ // eslint-disable-next-line no-bitwise
+ return `0x${(num >>> 0).toString(16).toUpperCase()}`;
10
};
11
12
export const formatSize = (number: number): string => {
0 commit comments