]> hackdaworld.org Git - my-code/triang.git/commitdiff
corrected formel
authorhackbard <hackbard>
Thu, 8 Aug 2002 23:22:28 +0000 (23:22 +0000)
committerhackbard <hackbard>
Thu, 8 Aug 2002 23:22:28 +0000 (23:22 +0000)
triang.c

index 34b2ffe148e220d3cbb7c6d0be527188c5282a4b..ca5207a97c42c7e14f2967cf243d18427b804ab7 100644 (file)
--- a/triang.c
+++ b/triang.c
@@ -23,9 +23,9 @@ double zaehler, nenner, zusatz;
 
 zaehler=MAXSIGNAL*(1./E1-1./E2)-(X1-X2)*(X1-X2)-(Y1-Y2)*(Y1-Y2);
 nenner=2*sqrt((X1-X2)*(X1-X2)+(Y1-Y2)*(Y1-Y2));
-zusatz=sqrt((double)E1/E2);
+zusatz=sqrt((double)MAXSIGNAL/E1);
 
-*delta1=acos(zaehler/(nenner*zusatz));
+*delta1=zusatz*sin(acos(zaehler/(nenner*zusatz)));
 *delta2=zaehler/nenner;
 }