Commit 9b39d1f5 authored by Cassio Kirch's avatar Cassio Kirch

Gamma != 0 for isolated cells

parent d2006f7b
...@@ -71,8 +71,10 @@ makeSum (struct Boid* const boid, const struct Boid* conductor, \ ...@@ -71,8 +71,10 @@ makeSum (struct Boid* const boid, const struct Boid* conductor, \
} }
conductor = conductor -> next; conductor = conductor -> next;
} }
if(boid -> neighbors != 0) if(boid -> neighbors != 0u)
boid -> gamma = (double)boid -> ectoNeighbors/boid -> neighbors; boid -> gamma = (double)boid -> ectoNeighbors / boid -> neighbors;
else
boid -> gamma = 1000000.0
} }
void void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment