From 5f3503004f4b0f2d3d85783f6187a6f7619bb30b Mon Sep 17 00:00:00 2001 From: tec <tec@ucc.gu.uwa.edu.au> Date: Sun, 27 Oct 2019 20:56:41 +0800 Subject: [PATCH] Make odd commite sizes not get rounded down --- src/voting.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/voting.rs b/src/voting.rs index a652e41..40573c3 100644 --- a/src/voting.rs +++ b/src/voting.rs @@ -306,10 +306,10 @@ fn update_motion( .expect("No previous status") .clone() .value; - if for_strength > (config::VOTE_POOL_SIZE / 2) as f32 { + if for_strength > (config::VOTE_POOL_SIZE as f32 / 2.0) { e.colour(serenity::utils::Colour::TEAL); update_status(e, "Passed", last_status_full, &topic); - } else if against_strength + abstain_strength > (config::VOTE_POOL_SIZE / 2) as f32 { + } else if against_strength + abstain_strength > (config::VOTE_POOL_SIZE as f32 / 2.0) { e.colour(serenity::utils::Colour::RED); update_status(e, "Failed", last_status_full, &topic); } else { -- GitLab