MCPcopy
hub / github.com/mewo2/terrain / add

Function add

terrain.js:218–227  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

216}
217
218function add() {
219 var n = arguments[0].length;
220 var newvals = zero(arguments[0].mesh);
221 for (var i = 0; i < n; i++) {
222 for (var j = 0; j < arguments.length; j++) {
223 newvals[i] += arguments[j][i];
224 }
225 }
226 return newvals;
227}
228
229function mountains(mesh, n, r) {
230 r = r || 0.05;

Callers 1

generateCoastFunction · 0.85

Calls 1

zeroFunction · 0.85

Tested by

no test coverage detected