/* Numbers.js - A library of useful number functions for JavaScript 2025 by Mercury Thirteen, Creative Commons Attribution 4.0 International License Revision history: 2025-01-17 - Initial release */ Number.prototype.toPaddedBinary = function(padLength) { if (this === undefined) return; if (padLength === undefined) return; return this.toString(2).padStart(padLength, "0"); } Number.prototype.toPaddedDecimal = function(padLength) { if (this === undefined) return; if (padLength === undefined) return; return this.toString(10).padStart(padLength, "0"); } Number.prototype.toPaddedHex = function(padLength) { if (this === undefined) return; if (padLength === undefined) return; return this.toString(16).toUpperCase().padStart(padLength, "0"); }