AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Nicht nachvollziehbares NaN

Ein Thema von implementation · begonnen am 21. Feb 2012 · letzter Beitrag vom 21. Feb 2012
 
Benutzerbild von implementation
implementation

Registriert seit: 5. Mai 2008
940 Beiträge
 
FreePascal / Lazarus
 
#1

Nicht nachvollziehbares NaN

  Alt 21. Feb 2012, 15:29
Delphi-Version: 5
Hallo liebe Forengenossen,

irgendwie bin ich heute blind. An folgender Stelle bekomme ich immer NaN raus und finde meinen Fehler nicht

Delphi-Quellcode:
procedure SummonScreenfill(const callback: TStatPointEvent; const iter: TIteration; const col: TIterColorization; const w: complex; const x1,x2,y1,y2: double);
var x,y: word; itc: byte; fix: complex; at: complex;
begin
  for y := 0 to 479 do
    for x := 0 to 639 do begin
      at.r := x*((x2-x1)/640)+x1;
      if ((x2-x1))=nan then Writeln('oops =(');
      at.i := y*((y2-y1)/480)+y1;
      if at.i=nan then Writeln(':(');
      fix := iter(at,w,itc);
      callback(x,y,col(itc,fix));
    end;
end;
Laut Writeln sind x1=-1 und x2=1 (sowie y1=-1, y2=1). Demnach müsste x2-x1 doch =2 sein, oder erliege ich da einer geistigen Umnachtung? Aber nein, es werden immer brav 'oops =(' und '' ausgegeben.
Was mache ich falsch?
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 17:34 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz