From 7703523749d9b46d3f97d880f55693a09b58baf4 Mon Sep 17 00:00:00 2001 From: Weird Constructor Date: Sun, 6 Jun 2021 13:36:53 +0200 Subject: [PATCH] use trunc and not floor for display --- src/dsp/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dsp/mod.rs b/src/dsp/mod.rs index 11407c6..6147c3b 100644 --- a/src/dsp/mod.rs +++ b/src/dsp/mod.rs @@ -284,7 +284,7 @@ macro_rules! f_freq { ($formatter: expr, $v: expr, $denorm_v: expr) => { macro_rules! f_det { ($formatter: expr, $v: expr, $denorm_v: expr) => { { let sign = if $denorm_v < 0.0 { -1.0 } else { 1.0 }; - let semitones = $denorm_v.floor().abs(); + let semitones = $denorm_v.trunc().abs(); let cents = ($denorm_v.fract() * 100.0).round().abs(); if (cents > 1.0) {