diff options
Diffstat (limited to 'libcrystfel/src/cell-utils.c')
-rw-r--r-- | libcrystfel/src/cell-utils.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libcrystfel/src/cell-utils.c b/libcrystfel/src/cell-utils.c index 75419c99..764646dd 100644 --- a/libcrystfel/src/cell-utils.c +++ b/libcrystfel/src/cell-utils.c @@ -1586,21 +1586,21 @@ double cell_get_volume(UnitCell *cell) double csx, csy, csz; struct rvec aCb; double rec_volume; - + if ( cell_get_reciprocal(cell, &asx, &asy, &asz, &bsx, &bsy, &bsz, &csx, &csy, &csz) ) { ERROR("Couldn't get reciprocal cell.\n"); return 0; } - + /* "a" cross "b" */ aCb.u = asy*bsz - asz*bsy; aCb.v = - (asx*bsz - asz*bsx); aCb.w = asx*bsy - asy*bsx; - + /* "a cross b" dot "c" */ rec_volume = (aCb.u*csx + aCb.v*csy + aCb.w*csz)/1e30; - + return 1/rec_volume; } |