Skip to content

solveQuadraticRootsReal

Under Construction

This documentation is auto-generated, and is a work in progress. Please see the source code at https://github.com/phetsims/dot/blob/main/js/util/solveQuadraticRootsReal.ts for the most up-to-date information.

Overview

Returns an array of the real roots of the quadratic equation \(ax^2 + bx + c=0\), or null if every value is a solution. If a is nonzero, there should be between 0 and 2 (inclusive) values returned.

@returns The real roots of the equation, or null if all values are roots. If the root has a multiplicity larger than 1, it will be repeated that many times.

@author Jonathan Olson <jonathan.olson@colorado.edu>

Source Code

See the source for solveQuadraticRootsReal.ts in the dot repository.