mdx-m3-viewer
Version:
A browser WebGL model viewer. Mainly focused on models of the games Warcraft 3 and Starcraft 2.
9 lines (8 loc) • 366 B
TypeScript
/**
* Returns a number, which when multiplied with a number of fromBits bits, will convert it to a toBits bits number.
*
* For example, 7 * convertBitRange(3, 8) == 255.
*
* In other words, if we look at the bits, 111 is the same to 3 bits as 11111111 is to 8 bits.
*/
export default function convertBitRange(fromBits: number, toBits: number): number;