The proper end of each moral virtue consists precisely in conformity with right reason. For temperance intends that man should not stray from reason for the sake of his concupiscences; fortitude, that he should not stray from the right judgment of reason through fear or daring. Moreover this end is appointed to man according to natural reason, since natural reason dictates to each one that he should act according to reason.
But it belongs to the ruling of prudence to decide in what manner and by what means man shall obtain the mean of reason in his deeds. For though the attainment of the mean is the end of a moral virtue, yet this mean is found by the right disposition of these things that are directed to the end.
Thomas Aquinas, ST 2-2.47.7