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

Method HasTangent

path_intersection_util.go:138–145  ·  view source on GitHub ↗

HasTangent returns true when there are tangent intersections, i.e. the curves intersect but don't cross (they touch).

()

Source from the content-addressed store, hash-verified

136
137// HasTangent returns true when there are tangent intersections, i.e. the curves intersect but don't cross (they touch).
138func (zs Intersections) HasTangent() bool {
139 for _, z := range zs {
140 if z.Tangent {
141 return true
142 }
143 }
144 return false
145}
146
147func (zs Intersections) add(pos Point, ta, tb, dira, dirb float64, tangent, same bool) Intersections {
148 // normalise T values between [0,1]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected