mirror of
https://github.com/3b1b/manim.git
synced 2025-08-02 19:46:21 +08:00
Make sure find_intersection returns a result matching the shape of inputs
This commit is contained in:
@ -294,7 +294,10 @@ def find_intersection(
|
||||
denom[abs(denom) < threshold] = np.inf # So that ratio goes to 0 there
|
||||
ratio = numer / denom
|
||||
ratio = np.repeat(ratio, n).reshape((m, n))
|
||||
return p0 + ratio * v0
|
||||
result = p0 + ratio * v0
|
||||
if m == 1:
|
||||
return result[0]
|
||||
return result
|
||||
|
||||
|
||||
def get_closest_point_on_line(
|
||||
|
Reference in New Issue
Block a user