a-conjecture-of-mine

An exercise on polyglossy: the same problem solved on multiple languages

commit adfd52d53c6f4a6b1e0a0dd1cbf5b06f0afdf470
parent 40b7cae777a49cbc6d369b6a003c4324a0b36cd0
Author: Gark Garcia <37553739+GarkGarcia@users.noreply.github.com>
Date:   Fri,  2 Nov 2018 19:19:53 -0300

Cleaned unecessary type conversions.

Diffstat:
Msrc/main.rs | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/main.rs b/src/main.rs
@@ -54,12 +54,12 @@ fn main() {
 // Test the conjecture for all values up to max and return the counterexamples
 fn get_counter_expl(max : i32) -> Vec<[i32; 2]> {
     let mut counter_examples : Vec<[i32; 2]> = Vec::new();
-    let mut load_bar = 0f32;
+    let mut load_bar = 0;
 
     for a in 0..max {
 
         // Print the progress on the screen
-        let new_load_bar = ((a as f32) * 100f32 / (max as f32)).ceil();
+        let new_load_bar = a * 100 / max;
         if new_load_bar != load_bar {
             load_bar = new_load_bar;
             clear_console();