// make sure product is excatly in [-1,1]
product = Math.max( Math.min( product, 1), -1);
theta = -Math.acos( product )*sign;
// angular velocity along axis
this.velocity = axis.dot(b1.state.omega)-axis.dot(b2.state.omega);
double bvalue = 0;
// if limits are clamped together
if ( Math.abs( lowerLimit - upperLimit) < shell && enableLimits) {
correction = (theta - (upperLimit) )*(1/dt)*Kcor;