Documentation
¶
Overview ¶
Package collide provides 2D swept / proximity hit tests.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClosestHitAlongSegment ¶
func ClosestHitAlongSegment(ax, ay, bx, by, hitRadius float64, each func(yield func(x, y float64, id uint64))) (id uint64, ok bool)
ClosestHitAlongSegment finds the candidate whose center is closest to segment AB among those within hitRadius. each should call yield(x, y, id) for every candidate. Returns the winning id.
func DistPointSegment ¶
DistPointSegment returns distance from P to the closest point on segment AB.
func SegmentHitsCircle ¶
SegmentHitsCircle reports whether segment AB comes within radius of (cx,cy).
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.