You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

13 lines
431 B

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.lineLen = lineLen;
var tslib_1 = require("tslib");
/**
* 计算线段长度
*/
function lineLen(_a, _b) {
var _c = tslib_1.__read(_a, 2), x1 = _c[0], y1 = _c[1];
var _d = tslib_1.__read(_b, 2), x2 = _d[0], y2 = _d[1];
return Math.pow((Math.pow((x1 - x2), 2) + Math.pow((y1 - y2), 2)), 0.5);
}
//# sourceMappingURL=line-length.js.map