@@ -8,15 +8,29 @@ Elm.Native.Basics.make = function(elm) {
8 var JS = Elm.Native.JavaScript.make(elm);
8 var JS = Elm.Native.JavaScript.make(elm);
9 var Utils = Elm.Native.Utils.make(elm);
9 var Utils = Elm.Native.Utils.make(elm);
11− function div(a,b) { return (a/b)|0; }
11+ function div(a, b) {
12− function rem(a,b) { return a % b; }
14+ function rem(a, b) {
13 var mod = Utils.mod;
17 var mod = Utils.mod;
18+ function logBase(base, n) {
14− function logBase(base,n) { return Math.log(n) / Math.log(base); }
19+ return Math.log(n) / Math.log(base);
15− function xor(a,b) { return a !== b; }
21+ function xor(a, b) {
16− function not(b) { return !b; }
24+ function not(b) {
27+ function isInfinite(n) {
17− function isInfinite(n) { return n === Infinity || n === -Infinity }
28+ return n === Infinity || n === -Infinity
19− function truncate(n) { return n|0; }
31+ function truncate(n) {
21 function degrees(d) {
35 function degrees(d) {
22 return d * Math.PI / 180;
36 return d * Math.PI / 180;
@@ -36,39 +50,39 @@ Elm.Native.Basics.make = function(elm) {
38 var basics = {
52 var basics = {
39− div:F2(div),
53+ div: F2(div),
40− rem:F2(rem),
54+ rem: F2(rem),
41− mod:mod,
55+ mod: mod,
43− pi:Math.PI,
57+ pi: Math.PI,
44− e:Math.E,
58+ e: Math.E,
45− cos:Math.cos,
59+ cos: Math.cos,
46− sin:Math.sin,
60+ sin: Math.sin,
47− tan:Math.tan,
61+ tan: Math.tan,
48− acos:Math.acos,
62+ acos: Math.acos,
49− asin:Math.asin,
63+ asin: Math.asin,
50− atan:Math.atan,
64+ atan: Math.atan,
51− atan2:F2(Math.atan2),
65+ atan2: F2(Math.atan2),
53− degrees: degrees,
67+ degrees: degrees,
54− turns: turns,
68+ turns: turns,
55− fromPolar: fromPolar,
69+ fromPolar: fromPolar,
56− toPolar: toPolar,
70+ toPolar: toPolar,
58− sqrt:Math.sqrt,
72+ sqrt: Math.sqrt,
59− logBase:F2(logBase),
73+ logBase: F2(logBase),
60− compare:Utils.compare,
74+ compare: Utils.compare,
62− xor:F2(xor),
76+ xor: F2(xor),
63− not:not,
77+ not: not,
65− truncate:truncate,
79+ truncate: truncate,
66− ceiling:Math.ceil,
80+ ceiling: Math.ceil,
67− floor:Math.floor,
81+ floor: Math.floor,
68− round:Math.round,
82+ round: Math.round,
69− toFloat:function(x) { return x; },
83+ toFloat: function(x) { return x; },
70− isNaN:isNaN,
84+ isNaN: isNaN,
71− isInfinite:isInfinite
85+ isInfinite: isInfinite
74 return elm.Native.Basics.values = basics;
88 return elm.Native.Basics.values = basics;