BraggPredictionRotation: Guard for negative rotation direction
This commit is contained in:
@@ -27,6 +27,8 @@ namespace {
|
||||
inline int solve_trig(float A, float B, float D,
|
||||
float phi0, float phi1,
|
||||
float out_phi[2]) {
|
||||
if (phi1 < phi0) std::swap(phi0, phi1);
|
||||
|
||||
const float R = std::sqrt(A*A + B*B);
|
||||
if (!(R > 0.0f))
|
||||
return 0;
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
class BraggPredictionRotation : public BraggPrediction {
|
||||
public:
|
||||
BraggPredictionRotation(int max_reflections);
|
||||
BraggPredictionRotation(int max_reflections = 200*200*200);
|
||||
|
||||
int Calc(const DiffractionExperiment &experiment,
|
||||
const CrystalLattice &lattice,
|
||||
|
||||
Reference in New Issue
Block a user