percentBoxesOverlap

function percentBoxesOverlap(a, b): number

return the percentage of a that overlaps with b.
if a is entirely within b, it returns 1 (or a number a little less than 1
(e.g., 0.99999999999) due to numerical inaccuracy); if a is entirely
outside b, it returns 0.

Parameters

ParameterType
aBox
bBox

Returns

number