• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1function alpha(value, color) {
2    return value << 24 | (color & 0x00FFFFFF);
3}
4
5function argb(a, r, g, b) {
6    return a << 24 | r << 16 | g << 8 | b;
7}
8
9function assert(condition) {
10    if (!condition) debugger;
11}
12
13function isAlpha(code) {
14    return (code > 64 && code < 91) // upper alpha (A-Z)
15        || (code > 96 && code < 123); // lower alpha (a-z)
16}
17
18function isArray(a) {
19    return a.constructor === Array;
20}
21
22function rgb(r, g, b) {
23    return 0xFF << 24 | r << 16 | g << 8 | b;
24}
25