Autor Beitrag
Maweki
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 197

Ubuntu Linux
Lazarus
BeitragVerfasst: Mi 11.05.05 20:00 
das Problem hatte ich auch immer. Hab es wie folgt geloest gehabt (code von vor 2 Jahren)

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
if (((Round(RadToDeg(x)) mod 90) = 0) and (Round(RadToDeg(x)) = RadToDeg(x))) then
      begin
        res := res * 100000000000;
        res := round(res);
        res := res / 100000000000;
      end;
delfiphan
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2684
Erhaltene Danke: 32



BeitragVerfasst: Fr 13.05.05 12:23 
Ich frage mich, wieso ich das jetzt überhaupt tue, aber wenn das hier all deine Probleme löst, ist ja gut. Es kommt halt das raus, was rauskommen muss:
Grad   Rad       |  cos() symbolisch   cos() numerisch (double precision)
30     pi/6      |  sqrt(3)/2          0.86602540378444
45     pi/4      |  sqrt(2)/2          0.70710678118655
90     pi/2      |  0                  0.00000000000000
250    25/18*pi  |  -cos(7/18*pi)     -0.34202014332567
270    3/2*pi    |  0                 -0.00000000000000
300    5/3*pi    |  1/2                0.50000000000000