(p1, p2, props)
| 47 | * @returns {Number} |
| 48 | */ |
| 49 | var getDistance = function(p1, p2, props) { |
| 50 | if (!props) { |
| 51 | props = ['x', 'y']; |
| 52 | } |
| 53 | var x = p2[props[0]] - p1[props[0]]; |
| 54 | var y = p2[props[1]] - p1[props[1]]; |
| 55 | return sqrt((x * x) + (y * y)); |
| 56 | }; |
| 57 | /** |
| 58 | * scale |
| 59 | * @param {Object} starts |
no outgoing calls
no test coverage detected