MCPcopy
hub / github.com/phaserjs/phaser / DistanceBetween

Function DistanceBetween

src/math/distance/DistanceBetween.js:20–26  ·  view source on GitHub ↗
(x1, y1, x2, y2)

Source from the content-addressed store, hash-verified

18 * @return {number} The distance between each point.
19 */
20var DistanceBetween = function (x1, y1, x2, y2)
21{
22 var dx = x1 - x2;
23 var dy = y1 - y2;
24
25 return Math.sqrt(dx * dx + dy * dy);
26};
27
28module.exports = DistanceBetween;

Callers 8

RotateAroundFunction · 0.85
MatterPhysics.jsFile · 0.85
ArcadePhysics.jsFile · 0.85
World.jsFile · 0.85
CircleToCircleFunction · 0.85
LightsManager.jsFile · 0.85
InputPlugin.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…