mirror of
https://github.com/3b1b/manim.git
synced 2025-09-01 00:48:45 +00:00
Ensure get_height, etc. all return positive values
This commit is contained in:
parent
003fafc20f
commit
0726dccd0a
1 changed files with 1 additions and 1 deletions
|
@ -1002,7 +1002,7 @@ class Mobject(object):
|
|||
|
||||
def length_over_dim(self, dim):
|
||||
bb = self.get_bounding_box()
|
||||
return (bb[2] - bb[0])[dim]
|
||||
return abs((bb[2] - bb[0])[dim])
|
||||
|
||||
def get_width(self):
|
||||
return self.length_over_dim(0)
|
||||
|
|
Loading…
Add table
Reference in a new issue