Ok. I don’t know how, but I did it. If anyone with greater math skills than me want to improve this, be my guest.