use trunc and not floor for display

This commit is contained in:
Weird Constructor 2021-06-06 13:36:53 +02:00
parent 1d5ea0599e
commit 7703523749

View file

@ -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) {