Glamorgan end with a flourish