UNPKG

image-js

Version:

Image processing and manipulation in JavaScript

10 lines 296 B
/** * Compute the length of a segment defined by two points. * @param p1 - First point. * @param p2 - Second point. * @returns Length of the segment. */ export function getLineLength(p1, p2) { return Math.hypot(p1.column - p2.column, p1.row - p2.row); } //# sourceMappingURL=lines.js.map