musescore / musescore/MuseScore
Fraction from/to ticks does not work properly
Open
Nobody has claimed this yet.
tech debt
- Dominant language
- C++
- Stars
- 15.1k
- Forks
- 3.3k
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 91
Description
Fraction fr1(1, 256);
int ticks = fr1.ticks();
Fraction fr2 = Fraction::fromTicks(ticks);
EXPECT_EQ(fr2.numerator(), 1);
EXPECT_EQ(fr2.denominator(), 256); // fail: denominator == 240
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the Fraction implementation and the ticks() and Fraction::fromTicks entry points, then reproduce the supplied conversion case. Done means converting Fraction(1, 256) to ticks and back preserves numerator 1 and denominator 256; add or update a focused test if the existing test suite has coverage for Fraction conversions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100