From f5fd0f74b2910cedcd2b4af0ef8d8b9335ba4ab6 Mon Sep 17 00:00:00 2001 From: Vahram Mirzoyan Date: Tue, 14 May 2019 23:49:35 +0200 Subject: [PATCH] correct base and exponent in pow function --- particle.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/particle.js b/particle.js index ec8fb78..d549b04 100644 --- a/particle.js +++ b/particle.js @@ -71,7 +71,7 @@ class Particle { } calculateFitness() { - this.fitness = pow(2, this.fitness); + this.fitness = pow(this.fitness, 2); // if (this.finished) { // } else { // const d = p5.Vector.dist(this.pos, target);