MCPcopy Create free account
hub / github.com/GamerHack/GamerHack.github.io / check_bcd

Function check_bcd

g2all/700/config.js:40–50  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

38// check if value is in Binary Coded Decimal format
39// assumes integer and is in the range [0, 0xffff]
40function check_bcd(value) {
41 for (let i = 0; i <= 12; i += 4) {
42 const nibble = (value >>> i) & 0xf;
43
44 if (nibble > 9) {
45 return false;
46 }
47 }
48
49 return true;
50}
51
52export function set_target(value) {
53 if (!Number.isInteger(value)) {

Callers 1

set_targetFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected