PSI sics-cvs-psi_pre-ansto

This commit is contained in:
2003-06-13 00:00:00 +00:00
committed by Douglas Clowes
parent 2e3ddfb6c6
commit 3ffd0d8af4
1099 changed files with 318432 additions and 0 deletions

14
difrac/angl.f Normal file
View File

@@ -0,0 +1,14 @@
C-----------------------------------------------------------------------
C Calculate the angle between two Cartesian vectors
C-----------------------------------------------------------------------
SUBROUTINE ANGL (X1,Y1,Z1,X2,Y2,Z2,ANGLE)
SPROD = X1*X2 + Y1*Y2 + Z1*Z2
SMOD = (X1*X1 + Y1*Y1 + Z1*Z1)*(X2*X2 + Y2*Y2 + Z2*Z2)
COSIN = SPROD/SQRT(SMOD)
IF (COSIN .GE. 1) COSIN = 1
IF (COSIN .LT. -1) COSIN = -1
ANGLE = ACOS(COSIN)
ANGLE = ANGLE*180/3.141593
RETURN
END