def radial.roots
gralha-svg-render@0.1.0.1 · svg.bend:2201
import gralha-svg-render@0.1.0.1/svg.bend as Svg
import Base
import gralha-text-scan@0.1.0.1/scan.bend as U
2201def radial.roots(+a: F32, +b: F32, +c: F32, +fr: F32, +dr: F32) -> Parameter:
2202 +disc = (b * b - 4.0 * a * c : F32)
2203 +root = F32.sqrt(U.max(0.0, disc))
2204 +t0 = ((0.0 - b - root) / (2.0 * a) : F32)
2205 +t1 = ((0.0 - b + root) / (2.0 * a) : F32)
2206 +t = U.max(t0, t1)
2207 Parameter{t, F32.is_ge(disc, 0.0) && F32.is_ge((fr + t * dr : F32), 0.0)}