title: Defining angle of the gradient using CAGradientLayer
body: <p>I am trying to draw angular gradient using <code>CaGradientLayer</code>. I know angle can be defined using <code>startPoint</code> and <code>endPoint</code>. I can compute these points for some standard angles like 0, 90, 180, 360 etc. But I want formulate these points for arbitrary angle. I have tried computing it using some trigonometry, but didn't get any success. Can anyone give me any directions on how to compute these points for arbitrary angles?</p>