def cubic.flat
import gralha-svg-render@0.1.0.1/svg.bend as Svgimport Base
180# A cubic's distance from its chord is 3t(1-t) times a mix of its control
181# points' distances, at most three quarters of the larger, so the curve is
182# within tol when both control points are within 4/3 tol.
183def cubic.flat(+p: Point, +a: Point, +b: Point, +q: Point, +tol: F32) -> Bool:
184 +reach = (tol * 1.3333334 : F32)
185 chord.near(p, q, a, reach) && chord.near(p, q, b, reach)
Uses (6)
Used by (0)
No other definition uses this definition.