added angleToRatio func