Solves a quadratic equation a*x^2 + b*x + c for x

Namespace: VVVV.Utils.VMath
Assembly: VVVV.Utils (in VVVV.Utils.dll) Version: 1.0.4694.10871

Syntax

C#
public int SolveQuadratic(
	double a,
	double b,
	double c,
	out double x1,
	out double x2
)

Parameters

a
Type: System..::..Double
Coefficient of x^2
b
Type: System..::..Double
Coefficient of x
c
Type: System..::..Double
Constant
x1
Type: System..::..Double%
First solution
x2
Type: System..::..Double%
Second solution

Return Value

Number of solution, 0, 1, 2 or int.MaxValue

See Also