how do i map a potentiometer from 0 - 1023 to 0 - 127 problems

they are linear pots