mirror of
https://github.com/3b1b/manim.git
synced 2025-07-28 12:32:36 +08:00
Fixed (most) uses of cmp functions for sorting
This commit is contained in:
@ -689,7 +689,7 @@ class IntroduceElectricField(PiCreatureScene):
|
||||
])
|
||||
shading_list = list(result)
|
||||
shading_list.sort(
|
||||
lambda m1, m2 : cmp(m1.get_length(), m2.get_length())
|
||||
key=lambda m: m1.get_length()
|
||||
)
|
||||
VGroup(*shading_list).set_color_by_gradient(*self.vector_field_colors)
|
||||
result.set_fill(opacity = 0.75)
|
||||
|
Reference in New Issue
Block a user