// caclulate Y shearing distance based on angle theta
// (already converted from degrees to radians for this example)
float x = 1.0;
float y = 0.0;
float rotatedX = ( cos(theta) * x ) - ( sin(theta) * y );
float rotatedY = ( sin(theta) * x ) + ( cos(theta) * y );
// now normalize Y to find where it is at when X crosses over the 1.0 unit mark
// this is the part I was missing before
shearDistanceY = ( 1.0f / rotatedX ) * rotatedY;
shearMatrix.setIdentity();
shearMatrix.SetValue( 2, 1, shearDistanceY );