I need the character to simulate people's normal turning effect, but now the character is orbiting around the center of a circle.

How should I do it so that the character can only make a small turn according to the angle?
double molecule = x * mLastMousePos.x + y * mLastMousePos.y;
double denominator = sqrt(x * x + y * y) * sqrt(mLastMousePos.x * mLastMousePos.x + mLastMousePos.y * mLastMousePos.y);
double cos_angle = molecule / denominator;
double angle = acos((float)cos_angle) * 180 / 3.1415926;
int i = 0;
for (i = 0; i < mSkinned.size(); i++) {
XMMATRIX rotation = XMMatrixRotationY(-angle);
XMStoreFloat4x4(&mSkinned[i]->World,
XMMatrixMultiply(XMLoadFloat4x4(&mSkinned[i]->World), rotation));
mSkinned[i]->NumFramesDirty = gNumFrameResources;
}
}