Svg.cubic.flat: def of gralha-svg-render@0.1.0.1 Import: import gralha-svg-render@0.1.0.1/svg.bend as Svg Lines 180-185 of gralha-svg-render@0.1.0.1/svg.bend: https://jend.leeeet.dev/read.txt?path=gralha-svg-render@0.1.0.1/svg.bend&start_line=180&end_line=185 import Base # A cubic's distance from its chord is 3t(1-t) times a mix of its control # points' distances, at most three quarters of the larger, so the curve is # within tol when both control points are within 4/3 tol. def cubic.flat(+p: Point, +a: Point, +b: Point, +q: Point, +tol: F32) -> Bool: +reach = (tol * 1.3333334 : F32) chord.near(p, q, a, reach) && chord.near(p, q, b, reach) Uses (6): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32.mul https://jend.leeeet.dev/definition.txt?path=gralha-svg-render@0.1.0.1/svg.bend&name=Point https://jend.leeeet.dev/definition.txt?path=gralha-svg-render@0.1.0.1/svg.bend&name=chord.near