Defines functions for 2nd order polynomial functions of one variable with only real coefficients.
- Source:
Methods
(static) computeDiscriminant(a, b, c) → {Number}
Provides the discriminant of the quadratic equation from the supplied coefficients.
Parameters:
Name | Type | Description |
---|---|---|
a |
Number | The coefficient of the 2nd order monomial. |
b |
Number | The coefficient of the 1st order monomial. |
c |
Number | The coefficient of the 0th order monomial. |
- Source:
Returns:
The value of the discriminant.
- Type
- Number
(static) computeRealRoots(a, b, c) → {Array.<Number>}
Provides the real valued roots of the quadratic polynomial with the provided coefficients.
Parameters:
Name | Type | Description |
---|---|---|
a |
Number | The coefficient of the 2nd order monomial. |
b |
Number | The coefficient of the 1st order monomial. |
c |
Number | The coefficient of the 0th order monomial. |
- Source:
Returns:
The real valued roots.
- Type
- Array.<Number>