Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
boids
boids4
Commits
eee750a7
Commit
eee750a7
authored
Oct 31, 2015
by
Cassio Kirch
Browse files
STEPS + 1 steps.
parent
0547ec33
Changes
1
Hide whitespace changes
Inline
Side-by-side
main.c
View file @
eee750a7
...
...
@@ -27,8 +27,9 @@ getAverageNeighborsNo(const struct Boid* const boid)
unsigned
int
boidCount
;
double
averageNeighborsNo
=
0
.
0
;
for
(
boidCount
=
0
;
boidCount
<
N
;
++
boidCount
)
averageNeighborsNo
+=
(
double
)(
boid
[
boidCount
].
endoNeighbors
+
\
boid
[
boidCount
].
ectoNeighbors
)
/
N
;
averageNeighborsNo
+=
((
double
)
boid
[
boidCount
].
endoNeighbors
+
\
(
double
)
boid
[
boidCount
].
ectoNeighbors
);
averageNeighborsNo
/=
N
;
return
averageNeighborsNo
;
}
#endif
...
...
@@ -139,7 +140,7 @@ one_system ()
for
(
boidCount
=
0
;
boidCount
<
N
;
boidCount
++
)
appendBoid
(
&
(
boid
[
boidCount
]),
box
);
for
(
step
=
0
;
step
<
STEPS
;
++
step
)
for
(
step
=
0
;
step
<=
STEPS
;
++
step
)
{
nextStep
(
parameters
);
for
(
boidCount
=
0
;
boidCount
<
N
;
boidCount
++
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment