Temperature is a measure of