From 2e613b166590300fdc80bb324903ded4a0cb0403 Mon Sep 17 00:00:00 2001 From: Francois Fleuret Date: Thu, 28 May 2009 21:33:54 +0200 Subject: [PATCH] Automatic commit --- hit_shape.cc | 2 +- polygon.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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); } -- 2.39.5