solveQuadratic

Finds the root roots of a quadratic polynomial a + b x + c x^2 = 0

@nogc pure nothrow
int
solveQuadratic
(
T
)
(
T a
,
T b
,
T c
,)
if (
isFloatingPoint!T
)

Parameters

a T

Coefficient.

b T

Coefficient.

c T

Coefficient.

outRoots T[]

array of root results, should have room for at least 2 elements.

Return Value

Type: int

Number of roots in outRoots.

Meta