ELSE {
sx: REAL ~ ScaleFactor[m.a, m.b, strokeWidth, thickening.x, minThickness.x];
sy: REAL ~ ScaleFactor[m.d, m.e, strokeWidth, thickening.y, minThickness.y];
mm: Transformation ~ ImagerTransformation.PostScale2[m: m, s: [sx, sy]];
f: FactoredTransformation ~ ImagerTransformation.Factor[mm ! ImagerTransformation.NumericalInstability => RESUME];
majorAxis: REAL ¬ ABS[f.s.x];
minorAxis: REAL ¬ ABS[f.s.y];
theta: Degrees ¬ f.r2;
IF majorAxis < minorAxis
THEN {
t: REAL ¬ majorAxis; majorAxis ¬ minorAxis; minorAxis ¬ t;
theta ¬ theta + 90.0;
};
WHILE theta > 90.0 DO theta ¬ theta - 180.0 ENDLOOP;
WHILE theta <= -90.0 DO theta ¬ theta + 180.0 ENDLOOP;
ImagerTransformation.Destroy[mm];
RETURN [MakeEllipse[majorAxis: majorAxis, minorAxis: minorAxis, theta: theta]];
};