How do i stop the Tank Barrel from Doing a 360 on the Z axis

What I’m asking is that can you make your tank barrel Stop at a Certain Degrees. Like lets say my Tank Hull is 15 Degrees Lower than the Barrel How do i make the Barrel Stop at the Hull.

You just check in the Update() if it is at that degree.