public void ProcessBoid(Data boid) {
Vector3D vectord = boid.position - position;
double num = Math.Acos(Vector3D.DotProduct(velocity, boid.position - position) / (velocity.Length * vectord.Length)) * (180.0/Math.PI);
vectord = boid.position - position;
if ((vectord.Length < MinDistance) & (num < 135.0)) {
Nearby = Nearby + 1;
Cohesion += boid.position;
vectord = boid.position - position;
if (vectord.Length < 10.0) {
Separation -= boid.position - position;
}
Alignment += boid.velocity;
}
}