private void ComputePrioritizedDitheringSteeringForce() { foreach (SteeringBehavior steeringBehavior in _computeSteeringForcesBehavior.Behaviors) { if (steeringBehavior.Enabled && RandomExtensions.GetRandomFloat(Dice, 0f, 1.0f) < steeringBehavior.Probability) { _steeringForce += steeringBehavior.SteeringForce * steeringBehavior.Weight / steeringBehavior.Probability; if (_steeringForce != Vector3.Zero) { _steeringForce = Vector3Extensions.Truncate(_steeringForce, MaxForce); } } } }