apple1-videocard-lib/tools/wavconv/hex.js

7 lines
193 B
JavaScript

function hex(value, size) {
if(size === undefined) size = 2;
let s = "0".repeat(size) + value.toString(16);
return s.substr(s.length - size).toUpperCase();
}
module.exports = { hex };