MCPcopy
hub / github.com/chartjs/Chart.js / distanceBetweenPoints

Function distanceBetweenPoints

src/helpers/helpers.math.ts:144–146  ·  view source on GitHub ↗
(pt1: Point, pt2: Point)

Source from the content-addressed store, hash-verified

142}
143
144export function distanceBetweenPoints(pt1: Point, pt2: Point) {
145 return Math.sqrt(Math.pow(pt2.x - pt1.x, 2) + Math.pow(pt2.y - pt1.y, 2));
146}
147
148/**
149 * Shortest distance between angles, in either direction.

Callers 2

splineCurveFunction · 0.85
nearestFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected