MCPcopy Create free account
hub / github.com/play-co/devkit / add

Function add

modules/devkit-view-inspector/debugger/InputWidget.js:105–114  ·  view source on GitHub ↗
(value, incr)

Source from the content-addressed store, hash-verified

103 // ugly way to do fixed-point sum
104 // e.g. 0.06 - 0.01 should be 0.05 (not 0.049999999999999996)
105 function add(value, incr) {
106 var sum = value + incr;
107 var str = incr.toString().split(".");
108 if (str.length > 1) {
109 var frac = str[1].length;
110 sum = +sum.toFixed(frac);
111 }
112
113 return sum;
114 }
115
116 this._onKeyDown = function (evt) {
117 switch (evt.keyCode) {

Callers 1

InputWidget.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected