function ensureAlignmentSpeed(boid,surrounding_boids){
	let speedVector = new THREE.Vector3(0,0,0)
	for (let i=0;i<surrounding_boids.length;i++){
		speedVector.add(surrounding_boids[i].speed)
	}
	return speedVector.normalize()
}
// Third Rule : ensure boids tend to have the same alignment
Third Rule : ensure boids tend to have the same alignment
Third Rule : ensure boids tend to have the same alignment
function ensureAlignmentSpeed(boid,surrounding_boids){
	let speedVector = new THREE.Vector3(0,0,0)
	for (let i=0;i<surrounding_boids.length;i++){
		speedVector.add(surrounding_boids[i].speed)
	}
	return speedVector.normalize()
}
function ensureAlignmentSpeed ( boid , surrounding_boids ) { let speedVector = new THREE . Vector3 ( 0 , 0 , 0 ) for ( let i = 0 ; i < surrounding_boids . length ; i ++ ) { speedVector . add ( surrounding_boids [ i ] . speed ) } return speedVector . normalize ( ) }
Third Rule : ensure boids tend to have the same alignment
Third Rule : ensure boids tend to have the same alignment