# 2D bouncing ball simulation - angular velocity

How does angular velocity of a ball affects it's speed after a bounce? I'm trying to simulate 2D bouncing ball physics. I've found a nice solution how to calculate ball's velocity after a bounce:

mVelocity.x *= 1 + mi * (e - 1);
mVelocity.y *= -e;


where mVelocity.x is a component of ball's velocity parallel to the "surface" of a bounce, mi is coefficient of friction, e<=1 representsthe energy loss during the impact.

It's looks quite realistic, however I'd like to calculate angular velocity as well - and I assume it's also affecting how the ball actually bounces. I tried to achieve it using matrix found on wolfram site - http://demonstrations.wolfram.com/BouncingASuperball/ (it's in the bottom of the page), but its implementation doesn't look realistic at all, ball is acting very wierdly. How can I calculate it?