-- File: Algebra3d.mesa
-- Last edited by Bier on December 18, 1982 1:20 am
-- Author: Eric Bier on January 4, 1983 12:16 am
-- Contents: The quadratic formula etc.

DIRECTORY
 SV2d;

Algebra3d: DEFINITIONS =

BEGIN

Point2d: TYPE = SV2d.Point2d;
Polygon: TYPE = REF PolygonObj;
PolygonObj: TYPE = SV2d.PolygonObj;
TrigLineSeg: TYPE = REF TrigLineSegObj;
TrigLineSegObj: TYPE = SV2d.TrigLineSegObj;

QuadraticFormula: PROC [a, b, c: REAL] RETURNS [roots: ARRAY [1..2] OF REAL, rootCount: NAT];
-- for polynomial ax^2 + bx + c = 0.
CubicFormula: PROC [a3, a2, a1, a0: REAL] RETURNS [roots: ARRAY [1..3] OF REAL, rootCount: NAT];
-- for polynomial a3x^3 + a2x^2 + a1x + a0 = 0.
QuarticFormula: PROC [a4, a3, a2, a1, a0: REAL] RETURNS [roots: ARRAY [0..3] OF REAL, rootCount: NAT];
-- for polynomial a4x^4 + a3x^3 + a2x^2 + a1x + a0 = 0.

END.