pub fn mixed_numeral(value: FloatType, limit: u64) -> Result<String>Expand description
A number as a whole number and a fraction, 1 1/3, with the fraction’s
denominator limited to limit: music21’s mixedNumeral for a float.
use music21::common::numbertools::mixed_numeral;
assert_eq!(mixed_numeral(1.333333, 65535)?, "1 1/3");
assert_eq!(mixed_numeral(-0.333333, 65535)?, "-1/3");
assert_eq!(mixed_numeral(2.0000001, 65535)?, "2");§Errors
A value that is not finite, or a limit below one.