Skip to main content

fraction_to_percent

Function fraction_to_percent 

Source
pub fn fraction_to_percent(share: FloatType) -> String
Available on crate feature musicxml only.
Expand description

music21’s xmlObjects.fractionToPercent: a share as a whole percent, truncated.

use music21::musicxml::fraction_to_percent;

assert_eq!(fraction_to_percent(0.251), "25");