use trunc and not floor for display
This commit is contained in:
parent
1d5ea0599e
commit
7703523749
1 changed files with 1 additions and 1 deletions
|
@ -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) => {
|
macro_rules! f_det { ($formatter: expr, $v: expr, $denorm_v: expr) => {
|
||||||
{
|
{
|
||||||
let sign = if $denorm_v < 0.0 { -1.0 } else { 1.0 };
|
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();
|
let cents = ($denorm_v.fract() * 100.0).round().abs();
|
||||||
|
|
||||||
if (cents > 1.0) {
|
if (cents > 1.0) {
|
||||||
|
|
Loading…
Reference in a new issue