ManimCommunity / ManimCommunity/manim

DecimalNumber changes height unexpectedly

Open
#3,842 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

issue:bug
Dominant language
Python
Stars
40.9k
Forks
3.1k
Avg merge
3d 12h
Merged PRs (30d)
25

Description

Credit for all this goes to Abulafia
## MRE
```py
class Test(Scene):
def construct(self):
weird = DecimalNumber(0.1234, num_decimal_places=4)
weird.add_updater(lambda m, dt:
m.rotate(0.2*dt)
)
self.add(weird)
self.play(ChangeDecimalToValue(weird, 0.5678), run_time=5)
```

## Explanation of Cause
It is explained in this forum post:
https://discord.com/channels/581738731934056449/1252654031634173983/1252963107840725025

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the MRE with DecimalNumber and ChangeDecimalToValue, then read the linked forum explanation for the cause. Trace how the updater and value change affect the DecimalNumber's height; done means the displayed number keeps a stable height during the five-second animation.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
computer-graphics
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.