correct normalization at the corners
This commit is contained in:
parent
4e06e9a410
commit
b6f5548d8a
|
@ -103,7 +103,7 @@ def ball_to_cube(ball):
|
|||
https://doi.org/10.1088/0965-0393/22/7/075013
|
||||
|
||||
"""
|
||||
ball_ = ball/np.linalg.norm(ball) if np.isclose(np.linalg.norm(ball),R1) else ball
|
||||
ball_ = ball/np.linalg.norm(ball)*R1 if np.isclose(np.linalg.norm(ball),R1) else ball
|
||||
rs = np.linalg.norm(ball_)
|
||||
if rs > R1:
|
||||
raise ValueError
|
||||
|
|
Loading…
Reference in New Issue