var opp=this.start.y-this.control.y; var adj=this.start.x-this.control.x; if(!adj) adj=1; this.rotation=Math.atan(opp/adj);