Closed ndo360 closed 7 years ago
Hi Noah,
There seems to be a precision problem in src/server/lib/util.js in the log method.
For now I've used this to round the numbers up to 5 decimal points and be able to run the project:
// overwrite Math.log function exports.log = (function () { var log = Math.log; return function (n, base) { var rough = log(n) / (base ? log(base) : 1); return (Math.round(rough * 1e5) / 1e5); }; })();
However I think a real solution should be proposed to take place.
Ran into same problem, thanks for the solution @Roeefl
Ran into the same issue also. Do we have something in common? I'm running on an ARM chipset.
Thinkpad X240 on an 64bit arch distro here and I have the same problem. Good to see the jokes about rounding errors kept in high regard ;)
[Intel Core i5-6200U on 64bit arch] I have the same problem, and Roeefl's solution worked. (But not sure if this would trigger any another problems)
Salutations! it seems that anytime I try to use 'gulp run' I get this error:
C:\Users\17clinen\Desktop\agar.io-clone-master\agar.io-clone>gulp run [12:30:02] Using gulpfile ~\Desktop\agar.io-clone-master\agar.io-clone\gulpfile. js [12:30:02] Starting 'lint'... [12:30:02] Starting 'move-client'... [12:30:03] Finished 'lint' after 935 ms [12:30:03] Starting 'build-server'... [12:30:03] Starting 'test'... [12:30:03] Finished 'test' after 2.03 ms [12:30:03] Starting 'todo'... [12:30:03] Finished 'todo' after 2.01 ms
util.js
massToRadius
[12:30:03] Finished 'build-server' after 276 ms √ should allow ascii character nicknames √ should disallow unicode-dependent alphabets √ should disallow spaces in nicknames
log
7 passing (35ms) 1 failing
1) util.js #log should compute the log_{base} of a number:
r.io-clone\test\util.js:86:31) at callFn (C:\Users\17clinen\Desktop\agar.io-clone-master\agar.io-clone\no de_modules\mocha\lib\runnable.js:326:21) at Test.Runnable.run (C:\Users\17clinen\Desktop\agar.io-clone-master\agar. io-clone\node_modules\mocha\lib\runnable.js:319:7) at Runner.runTest (C:\Users\17clinen\Desktop\agar.io-clone-master\agar.io- clone\node_modules\mocha\lib\runner.js:422:10) at C:\Users\17clinen\Desktop\agar.io-clone-master\agar.io-clone\node_modul es\mocha\lib\runner.js:528:12 at next (C:\Users\17clinen\Desktop\agar.io-clone-master\agar.io-clone\node _modules\mocha\lib\runner.js:342:14) at C:\Users\17clinen\Desktop\agar.io-clone-master\agar.io-clone\node_modul es\mocha\lib\runner.js:352:7 at next (C:\Users\17clinen\Desktop\agar.io-clone-master\agar.io-clone\node _modules\mocha\lib\runner.js:284:14) at Immediate. (C:\Users\17clinen\Desktop\agar.io-clone-master\a
gar.io-clone\node_modules\mocha\lib\runner.js:320:5)
events.js:160 throw er; // Unhandled 'error' event ^ Error: 1 test failed.
Can anyone help? I can't seem to find a solution. -Cheers Noah C