src/shapes/line.js
function (x, y) {
            // translate the given coordinates,
            // rather than creating temp translated vectors
            x -= this.pos.x; // Cx
            y -= this.pos.y; // Cy
            var start = this.points[0]; // Ax/Ay
            var end = this.points[1]; // Bx/By

            //(Cy - Ay) * (Bx - Ax) = (By - Ay) * (Cx - Ax)
            return (y - start.y) * (end.x - start.x) === (end.y - start.y) * (x - start.x);
        }
function (x, y) {
            // translate the given coordinates,
            // rather than creating temp translated vectors
            x -= this.pos.x; // Cx
            y -= this.pos.y; // Cy
            var start = this.points[0]; // Ax/Ay
            var end = this.points[1]; // Bx/By

            //(Cy - Ay) * (Bx - Ax) = (By - Ay) * (Cx - Ax)
            return (y - start.y) * (end.x - start.x) === (end.y - start.y) * (x - start.x);
        }
function ( x , y ) { // translate the given coordinates, // rather than creating temp translated vectors x -= this . pos . x ; // Cx y -= this . pos . y ; // Cy var start = this . points [ 0 ] ; // Ax/Ay var end = this . points [ 1 ] ; // Bx/By //(Cy - Ay) * (Bx - Ax) = (By - Ay) * (Cx - Ax) return ( y - start . y ) * ( end . x - start . x ) === ( end . y - start . y ) * ( x - start . x ) ; }
check if this line segment contains the specified point
@name containsPoint
@memberOf me.Line.prototype
@function
@param  {Number} x x coordinate
@param  {Number} y y coordinate
@return {boolean} true if contains
check if this line segment contains the specified point