- Added file checking and listings to exeman
- Fixed some problems with mesure - Fixed issues with tasub
This commit is contained in:
13
tasublib.c
13
tasublib.c
@ -260,7 +260,9 @@ static MATRIX buildTVMatrix(MATRIX U1V, MATRIX U2V){
|
||||
MATRIX T, T3V;
|
||||
int i;
|
||||
|
||||
normalizeVector(U2V);
|
||||
T3V = vectorCrossProduct(U1V,U2V);
|
||||
normalizeVector(T3V);
|
||||
if(T3V == NULL){
|
||||
return NULL;
|
||||
}
|
||||
@ -340,13 +342,18 @@ int calcTasQAngles(MATRIX UB, MATRIX planeNormal, int ss, tasQEPosition qe,
|
||||
}
|
||||
om = Acosd(R[0][0]/sq);
|
||||
om -= 180.;
|
||||
angles->sgl = Acosd(sqrt(R[0][0]*R[0][0] + R[1][0]*R[1][0]));
|
||||
tmp = Asind(R[1][0]/sqrt(R[0][0]*R[0][0] + R[1][0]*R[1][0]));
|
||||
|
||||
tmp = Acosd(sqrt(R[0][0]*R[0][0] + R[1][0]*R[1][0]));
|
||||
angles->sgl = Asind(-R[2][0]);
|
||||
|
||||
sq = sqrt(R[0][0]*R[0][0] + R[1][0]*R[1][0]);
|
||||
if(ABS(sq) < .00001){
|
||||
return BADRMATRIX;
|
||||
}
|
||||
angles->sgu = Asind(R[2][1]/sq);
|
||||
|
||||
tmp = Acosd(R[2][2]/sqrt(R[0][0]*R[0][0]+R[1][0]*R[1][0]));
|
||||
|
||||
QC = tasReflectionToQC(qe,UB);
|
||||
if(QC == NULL){
|
||||
return UBNOMEMORY;
|
||||
@ -355,7 +362,7 @@ int calcTasQAngles(MATRIX UB, MATRIX planeNormal, int ss, tasQEPosition qe,
|
||||
q = vectorLength(QC);
|
||||
q = 2.*PI*vectorLength(QC);
|
||||
cos2t = (qe.ki*qe.ki + qe.kf*qe.kf - q*q)/(2. * ABS(qe.ki) * ABS(qe.kf));
|
||||
if(cos2t > 1.){
|
||||
if(ABS(cos2t) > 1.){
|
||||
return TRIANGLENOTCLOSED;
|
||||
}
|
||||
angles->sample_two_theta = ss*Acosd(cos2t);
|
||||
|
Reference in New Issue
Block a user