Click or drag to resize

UtilQuadratic Class

Class to "solve" a quadratic equation "a x^2 + b x + c = 0".
Inheritance Hierarchy
SystemObject
  Demo3D.CommonUtilQuadratic

Namespace:  Demo3D.Common
Assembly:  Demo3D.Common (in Demo3D.Common.dll) Version: 15.0.2.11458
Syntax
C#
public class Quadratic

The UtilQuadratic type exposes the following members.

Constructors
  NameDescription
Public methodUtilQuadratic
Construct the quadratic equation "a x^2 + b x + c = 0".
Top
Properties
  NameDescription
Public propertyDiscriminant
Returns the discriminant of the quadratic equation.
Public propertyHasRealSolutions
Does the equation have real solutions?
Top
Methods
  NameDescription
Public methodSolve
Solve the equation.

If HasRealSolutions is false, then SolutionLower and SolutionUpper will be invalid.

Top
Fields
  NameDescription
Public fielda
Coefficient of the x^2 component.
Public fieldb
Coefficient of the x component.
Public fieldc
Constant component.
Public fieldSolutionLower
The smaller of the two solutions once Solve has been called, and HasRealSolutions is true.
Public fieldSolutionUpper
The larger of the two solutions once Solve has been called, and HasRealSolutions is true.
Top
See Also