{
assert(intersectsWithBuffer(
{
start: { x: 0.5, y: 0.5, t: 0.5 },
end: { x: 1.5, y: 1.5, t: 1.5 },
},
{
start: { x: 0.5, y: 0.5, t: 0.5 },
end: { x: 1.5, y: 1.5, t: 1.5 },
},
{ x: 0, y: 0, t: 0 }
));
assert(!intersectsWithBuffer(
{
start: { x: 0.5, y: 0.5, t: 0.5 },
end: { x: 1.5, y: 1.5, t: 1.5 },
},
{
start: { x: 1.5, y: 0.5, t: 0.5 },
end: { x: 2.5, y: 1.5, t: 1.5 },
},
{ x: 0, y: 0, t: 0 }
));
assert(intersectsWithBuffer(
{
start: { x: 0.5, y: 0.5, t: 0.5 },
end: { x: 1.5, y: 1.5, t: 1.5 },
},
{
start: { x: 1.0, y: 0.5, t: 0.5 },
end: { x: 2.0, y: 1.5, t: 1.5 },
},
{ x: 0.5, y: 0, t: 0 }
));
assert(intersectsWithBuffer(
{
start: { x: 0.5, y: 0.5, t: 0.0 },
end: { x: 0.5, y: 0.5, t: 1.0 },
},
{
start: { x: 0.0, y: 0.0, t: 0.0 },
end: { x: 1.0, y: 1.0, t: 1.0 },
},
{ x: 0, y: 0, t: 0 }
));
assert(!intersectsWithBuffer(
{
start: { x: 0.5, y: 0.5, t: 0.0 },
end: { x: 0.5, y: 0.5, t: 1.0 },
},
{
start: { x: 0.1, y: 0.0, t: 0.0 },
end: { x: 1.0, y: 1.0, t: 1.0 },
},
{ x: 0, y: 0, t: 0 }
));
assert(intersectsWithBuffer(
{
start: { x: 0.5, y: 0.5, t: 0.0 },
end: { x: 0.5, y: 0.5, t: 1.0 },
},
{
start: { x: 0.1, y: 0.0, t: 0.0 },
end: { x: 1.0, y: 1.0, t: 1.0 },
},
{ x: 0.05, y: 0, t: 0 }
));
}