Criterion For Distinguishing Between Continuous and Discontinuous Transitions In Spin and Gauge Systems