Sfoglia il codice sorgente

add polyfill for Math.sign.

Lucas Stadler 12 anni fa
parent
commit
e1822ce693
1 ha cambiato i file con 10 aggiunte e 0 eliminazioni
  1. 10 0
      js/pixl/public/index.html

+ 10 - 0
js/pixl/public/index.html

@ -42,6 +42,16 @@
42 42
			ev.movementY = ev.movementY || ev.mozMovementY || ev.webkitMovementY;
43 43
			return ev;
44 44
		};
45
46
        Math.sign = Math.sign || function(n) {
47
            if (n < 0) {
48
                return -1;
49
            } else if (n > 0) {
50
                return 1;
51
            } else {
52
                return 0;
53
            }
54
        };
45 55
	</script>
46 56
	<script>
47 57
		window.pixl = {};