param { * } startX param { * } startY param { * } endX param { * } endY returns export default ( startX , startY , endX , endY ) => { let x = endX - startX ; let y = endY - startY ; if ( x >= 0 ) { return Math . sqrt ( x * x + y * y ) ; } else { return - Math . sqrt ( x * x + y * y ) ; } } ;