title: How to calculate rotation in 2D in Javascript
body: <p>I am not so familiar trigonometry, but I have only two points to rotate in 2D:</p>
  
  <pre><code>                    *nx, ny
                 .     -
            .           -
       .  angle          -
  *cx,cy.................*x,y
  </code></pre>
  
  <p>cx, cy = rotation center<br>
  x,y = current x,y<br>
  nx, ny = new coordinates</p>
  
  <p>How to calculate new points in a certain angle?</p>