examples/moles: apply FIXME with `min` as instructed by past me
authorAlexis Laferrière <alexis.laf@xymus.net>
Tue, 11 Aug 2015 19:21:43 +0000 (15:21 -0400)
committerAlexis Laferrière <alexis.laf@xymus.net>
Wed, 12 Aug 2015 18:42:13 +0000 (14:42 -0400)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

examples/mnit_moles/src/moles_android.nit

index 40e463a..1da39be 100644 (file)
@@ -40,10 +40,7 @@ redef class App
                var ys = display.height.to_f/th.to_f*0.4
 
                # Use the smaller scale so everything fits
-               # FIXME replace these conditions with xs.min(ys) when Float isa Comparable
-               if xs < ys then
-                       display_scale_container.item = xs
-               else display_scale_container.item = ys
+               display_scale_container.item = xs.min(ys)
 
                super
        end