Commit af74e466 authored by TURPIN Laurent's avatar TURPIN Laurent Committed by ROUZAUD-CORNABAS Jonathan
Browse files

Fix merge when cherry picking fix for Fuzzy #2

parent c26328b6
......@@ -122,9 +122,9 @@ ProteinConcentration Vector_Fuzzy::x(const Point& p1, const Point& p2, ProteinCo
ProteinConcentration x = p1.x + (y - p1.y) * (p2.x - p1.x) /
(p2.y - p1.y);
// if (AeTime::time() == 280) printf("P1 %e %e P2 %e %e Y %e X %e\n",p1.x,p1.y,p2.x,p2.y,y,x);
// assert((p2.x <= x and x <= p1.x) or
// (p1.x <= x and x <= p2.x));
// Order of operation (divide then multiply) is important !!
// Without this order, because of float calculation,
// it is possible that x does not belong to [p1.x, p2.x]
// TODO: Check if this order guarantees the belowing assertion
assert((p2.x <= x and x <= p1.x) or
(p1.x <= x and x <= p2.x));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment