From 939937a9964ade7ff2c0174a9a92e3c244397689 Mon Sep 17 00:00:00 2001 From: Natsu Kagami Date: Sun, 9 Aug 2020 23:19:06 -0400 Subject: [PATCH] 'JSformat' the bpm float --- youmubot-osu/src/models/mod.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/youmubot-osu/src/models/mod.rs b/youmubot-osu/src/models/mod.rs index 891c6e3..7575f6b 100644 --- a/youmubot-osu/src/models/mod.rs +++ b/youmubot-osu/src/models/mod.rs @@ -131,6 +131,7 @@ impl Difficulty { _ => true, }; let three_lines = is_not_ranked; + let bpm = (self.bpm * 100.0).round() / 100.0; MessageBuilder::new() .push(format!( "[[Link]]({}) (`{}`)", @@ -161,7 +162,7 @@ impl Difficulty { .push_bold(format!("{:.1}", self.od)) .push(", HP") .push_bold(format!("{:.1}", self.hp)) - .push(format!(", BPM**{}**", self.bpm)) + .push(format!(", BPM**{}**", bpm)) .push(", ⌛ ") .push_bold(format!("{}", YoumuDuration(self.drain_length))) .build()