Skip to content

Commit 6398f59

Browse files
committed
fixed edge case for numberline where step is very small
1 parent 44522bb commit 6398f59

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

manim/mobject/graphing/number_line.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -352,10 +352,10 @@ def get_tick_range(self) -> np.ndarray:
352352
"""
353353
x_min, x_max, x_step = self.x_range
354354
if not self.include_tip and not self.include_double_sided_tip:
355-
x_max += 1e-6
355+
x_max += min(1e-6, x_step/2)
356356

357357
if not self.include_double_sided_tip:
358-
x_min -= 1e-6
358+
x_min -= min(1e-6, x_step/2)
359359

360360
# Handle cases where min and max are both positive or both negative
361361
if x_min < x_max < 0 or x_max > x_min > 0:

0 commit comments

Comments
 (0)