otherSheep.y);

          // Separation
          if (d < separationRadius) {
            let diff = { x: currentSheep.x - otherSheep.x, y: currentSheep.y - otherSheep.y };
            diff.x /= d; // Normalize
            diff.y /= d;
            separation.x += diff.x;
            separation.y += diff.y;
            separationCount++;
          }

          // Alignment
          if (d < alignmentRadius) {
            alignment.x += otherSheep.vx;
            alignment.y += otherSheep.vy;
            alig