dist/melonjs.js
function angleToPoint(v) {
         var a = this.getBounds(); // the me.Vector2d object also implements the same function, but
         // we have to use here the center of both entities

         var ax = v.x - (a.pos.x + a.width / 2);
         var ay = v.y - (a.pos.y + a.height / 2);
         return Math.atan2(ay, ax);
       }
function angleToPoint(v) {
         var a = this.getBounds(); // the me.Vector2d object also implements the same function, but
         // we have to use here the center of both entities

         var ax = v.x - (a.pos.x + a.width / 2);
         var ay = v.y - (a.pos.y + a.height / 2);
         return Math.atan2(ay, ax);
       }
function angleToPoint ( v ) { var a = this . getBounds ( ) ; // the me.Vector2d object also implements the same function, but // we have to use here the center of both entities var ax = v . x - ( a . pos . x + a . width / 2 ) ; var ay = v . y - ( a . pos . y + a . height / 2 ) ; return Math . atan2 ( ay , ax ) ; }
return the angle to the specified point
@name angleToPoint
@memberOf me.Entity
@function
@param {me.Vector2d} vector vector
@return {Number} angle in radians
return the angle to the specified point