* refactor the psi pseudo axes engine.
[hkl.git] / src / hkl-detector.c
blobe7ae11a05a37bac36297deaff61ad58438113d66
1 #include <math.h>
2 #include <hkl/hkl-detector.h>
4 /* public part */
6 int hkl_detector_compute_kf(HklDetector const *self, HklGeometry *g,
7 HklVector *kf)
9 hkl_geometry_update(g);
11 HklHolder *holder = &g->holders[self->idx];
12 if (holder) {
13 hkl_vector_init(kf, HKL_TAU / g->source.wave_length, 0, 0);
14 hkl_vector_rotated_quaternion(kf, &holder->q);
15 return HKL_SUCCESS;
16 } else
17 return HKL_FAIL;