MCPcopy Create free account
hub / github.com/tdewolff/canvas / OverlapsLine

Method OverlapsLine

util.go:553–556  ·  view source on GitHub ↗
(a, b Point)

Source from the content-addressed store, hash-verified

551}
552
553func (r Rect) OverlapsLine(a, b Point) bool {
554 _, _, overlaps, _ := cohenSutherlandLineClip(r, a, b, 0.0)
555 return overlaps
556}
557
558func (r Rect) TouchesLine(a, b Point) bool {
559 _, _, _, touches := cohenSutherlandLineClip(r, a, b, Epsilon)

Callers 1

TestRectFunction · 0.95

Calls 1

cohenSutherlandLineClipFunction · 0.85

Tested by 1

TestRectFunction · 0.76