MCPcopy Index your code
hub / github.com/phaserjs/phaser / GetRectangleToRectangle

Function GetRectangleToRectangle

src/geom/intersects/GetRectangleToRectangle.js:25–43  ·  view source on GitHub ↗
(rectA, rectB, out)

Source from the content-addressed store, hash-verified

23 * @return {array} An array with the points of intersection if objects intersect, otherwise an empty array.
24 */
25var GetRectangleToRectangle = function (rectA, rectB, out)
26{
27 if (out === undefined) { out = []; }
28
29 if (RectangleToRectangle(rectA, rectB))
30 {
31 var lineA = rectA.getLineA();
32 var lineB = rectA.getLineB();
33 var lineC = rectA.getLineC();
34 var lineD = rectA.getLineD();
35
36 GetLineToRectangle(lineA, rectB, out);
37 GetLineToRectangle(lineB, rectB, out);
38 GetLineToRectangle(lineC, rectB, out);
39 GetLineToRectangle(lineD, rectB, out);
40 }
41
42 return out;
43};
44
45module.exports = GetRectangleToRectangle;

Callers 1

Calls 2

RectangleToRectangleFunction · 0.85
GetLineToRectangleFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…