Commit f2ccdfed authored by VAN TOLL Wouter's avatar VAN TOLL Wouter

Merge branch 'master' into performance-improvements

parents cb8f16aa bf934f0f
......@@ -55,6 +55,10 @@ Vector2D PowerLaw::ComputeAgentInteractionForce(const Agent* agent, const Phanto
if (tau < 0.001f)
return Vector2D(0, 0);
// ignore collisions that lie too far away
if (tau > tau0)
return Vector2D(0, 0);
float component1 = -k * exp(-tau / tau0) * (2 / tau + 1 / tau0) / (a * tau*tau);
const Vector2D& component2 = v - (a * x + b * v) / sqrtD;
......
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