--- /dev/null
+/* acos */
+
+#include <stdio.h>
+#include <math.h>
+#include <stdlib.h>
+
+int main(int argc,char **argv) {
+ printf("%f\n",180.0/M_PI*acos(atof(argv[1])));
+ return 0;
+}
+
zc=`echo $temp | awk '{ print $3 }'`
echo -en "angle: "
-echo "$xa $ya $za $xb $yb $zb $xc $yc $zc $scale" | \
+foo=`echo "$xa $ya $za $xb $yb $zb $xc $yc $zc $scale" | \
awk ' \
BEGIN {
X1=ENVIRON["X1"]; X2=ENVIRON["X2"]; X3=ENVIRON["X3"]
sp=dxt*Dxt+dyt*Dyt+dzt*Dzt
d=sqrt(dxt^2+dyt^2+dzt^2)
D=sqrt(Dxt^2+Dyt^2+Dzt^2)
- print 180.0/pi*acos2(sp/(d*D))
- }'
+ print sp/(d*D)
+ }'`
+
+./acos $foo
echo