Added scaleNumber() util function.