Thema: Delphi Sinus Funktion spinnt?!

Einzelnen Beitrag anzeigen

Hawkeye219

Registriert seit: 18. Feb 2006
Ort: Stolberg
2.227 Beiträge
 
Delphi 2010 Professional
 
#13

Re: Sinus Funktion spinnt?!

  Alt 11. Feb 2007, 19:35
Hallo,

vielleicht kannst du die Werte etwas vorbehandeln:

Delphi-Quellcode:
function Fuzzy (aValue: Double; aEpsilon: Double = 1E-9): Double;
begin
  if (Abs(aValue) < aEpsilon) then
    Result := 0.0
  else
    Result := aValue;
end;

begin
  Label1.Caption := Format('x: %.3g', [Fuzzy(x)]);
  Label2.Caption := Format('y: %.3g', [Fuzzy(y)]);
end;
Gruß Hawkeye
  Mit Zitat antworten Zitat