Skip to main content

quadratic_roots

Function quadratic_roots 

Source
pub fn quadratic_roots(a: f64, b: f64, c: f64) -> Vec<f64>
Expand description

Returns the real roots of ax^2 + bx + c = 0.

When a == 0.0, this falls back to the linear case. Only real roots are returned. Distinct real roots are returned in ascending order.