blob: 4a1d91191223a9c6cc800dfb03d3284ca0888bd5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
//Example 3.11//
u=1;
u1=1;
v=1;
v1=1;
w=0;
w1=1;
a=(u*u1)+(v*v1)+(w*w1)
//mprintf("a = %i",a)
b=(sqrt((u^2)+(v^2)+(w^2)))*(sqrt((u1^2)+(v1^2)+(w1^2)))
//mprintf("b = %i",b)
c=acosd(a/b)
mprintf("c = %f degree ",c)
|