9 lines
301 B
Matlab
9 lines
301 B
Matlab
function ret = computeCollisionProbability(this, ovenObj, tau_2D)
|
|
collision = rand(1);
|
|
CollisionProbability = 1 - exp(-tau_2D/ovenObj.CollisionTime);
|
|
if this.BackgroundCollision && collision <= CollisionProbability
|
|
ret = true;
|
|
else
|
|
ret = false;
|
|
end
|
|
end |