eguatech / egua

Linguagem de programação em português, simples e moderna

Home Page:https://egua.dev/idegua/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Refatorar função e alterar nome para "pontosAleatorios"

lucaspompeun opened this issue · comments

egua/src/lib/eguamat.js

Lines 188 to 203 in 5671a03

module.exports.pale = function(n) {
if (isNaN(n) || n === null)
throw new RuntimeError(
this.token,
"Você deve prover valores para pale(n)."
);
if (ex == undefined) { ex = 0; }
var x = [];
x[0] = 100;
for (var i = 1; i < n; i++) {
x[i] = ex + x[i - 1] + Math.random() * 2 - 1;
}
var xx = aprox(x, 2);
console.log(xx);
return xx;
};

Podia mudar o nome também, não? module/exports.pontosAleatorios, por exemplo.

Podia mudar o nome também, não? module/exports.pontosAleatorios, por exemplo.

Acho uma melhoria muito válida!