react-input-range
Version:
React component for inputting numeric values within a range
21 lines (19 loc) • 508 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = distanceTo;
/**
* Calculate the distance between pointA and pointB
* @ignore
* @param {Point} pointA
* @param {Point} pointB
* @return {number} Distance
*/
function distanceTo(pointA, pointB) {
var xDiff = Math.pow(pointB.x - pointA.x, 2);
var yDiff = Math.pow(pointB.y - pointA.y, 2);
return Math.sqrt(xDiff + yDiff);
}
module.exports = exports["default"];
//# sourceMappingURL=distance-to.js.map