shitty linear integer div scaling