Einzelnen Beitrag anzeigen

Bjoerk

Registriert seit: 28. Feb 2011
Ort: Mannheim
1.384 Beiträge
 
Delphi 10.4 Sydney
 
#35

AW: Darstellungen und Berechnungen am Dreieck

  Alt 7. Apr 2013, 11:52
Ich hab gesehen, du verwendest alleine in dieser Procedure 10 globale Variablen. Das dürfte auf die Dauer ziemlich unübersichtlich werden? Du könntest dir überlegen, diese eventuell wegzukapseln.

Delphi-Quellcode:
type
  TFloatPoint = record
    X, Y: double;
  end;

  TFloatPoints = array of TFloatPoint;

  TRekursivSoddy = record
  private
    Fra: double;
    Frb: double;
    Frc: double;
    FPan10: boolean;
    Fsxa: double;
    Fsxb: double;
    Fsxc: double;
    Fwxa: double;
    Fwxb: double;
    Fwxg: double;
    FCanvas: TCanvas;
    FPunkte: TFloatPoints;
    FResult: TStrings;
    function GetPunkte(I: integer): double;
    procedure SetPunkte(I: integer; const Value: double);
  public
    property Pan10: boolean read FPan10 write FPan10;
    property sxa: double read Fsxa write Fsxa;
    property sxb: double read Fsxb write Fsxb;
    property sxc: double read Fsxc write Fsxc;
    property wxa: double read Fwxa write Fwxa;
    property wxb: double read Fwxb write Fwxb;
    property wxg: double read Fwxg write Fwxg;
    property Canvas: TCanvas read FCanvas;
    property Result: TStrings read FResult;
    property Punkte[I: integer]: double read GetPunkte write SetPunkte;
    procedure CalcSoddy;
    procedure Apoll(ax, ay, ar, bx, by, br, cx, cy, cr: extended; tiefe: integer);
    procedure Clear;
  end;
Gruß
Thomas
  Mit Zitat antworten Zitat