From: Francois Fleuret Date: Thu, 28 May 2009 19:33:54 +0000 (+0200) Subject: Automatic commit X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=commitdiff_plain;h=2e613b166590300fdc80bb324903ded4a0cb0403;p=universe.git Automatic commit --- diff --git a/hit_shape.cc b/hit_shape.cc index 28b2778..189cadc 100644 --- a/hit_shape.cc +++ b/hit_shape.cc @@ -73,7 +73,7 @@ public: if(manipulator->grabbing()) { for(int k = 0; k < _nb_shapes; k++) if(_shapes[k] == manipulator->grabbing()) { bool hit = _targets[k]; - if(hit & drand48() < 0.25) { + if(hit && (drand48() < 0.25)) { manipulator->force_release(); scramble(universe); return 1.0; diff --git a/polygon.cc b/polygon.cc index b560b8b..6f980bd 100644 --- a/polygon.cc +++ b/polygon.cc @@ -146,7 +146,7 @@ void Polygon::triangularize(int &nt, int nb, int *index) { _relative_x[index[(k+1)%nb]] - _relative_x[index[m]], _relative_y[index[(k+1)%nb]] - _relative_y[index[m]]); - if(a1 * a2 > 0 && best_split < 0 || (abs(a1 - a2) < best_split)) { + if((a1 * a2 > 0 && best_split < 0) || (abs(a1 - a2) < best_split)) { best_n = n; best_m = m; best_split = abs(a1 - a2); }