mirror of
https://github.com/NehZio/Crystal-MEC
synced 2024-12-22 04:14:30 +01:00
Corrected a bug when orienting the coordinates
This commit is contained in:
parent
9b68ebdc52
commit
8b514b4293
@ -132,7 +132,7 @@ def find_center(centerList, coordinates):
|
||||
if at[3] in centerList:
|
||||
centers = sorted(centers, key=operator.itemgetter(3)) # Sorting the list with respect to the distance to the origin
|
||||
d = distance(at,[0,0,0])
|
||||
if d <= centers[-1][-1]:
|
||||
if d <= centers[-1][-1] and d > 0.0:
|
||||
centers[-1] = [at[0],at[1],at[2],d]
|
||||
|
||||
center = np.mean(centers,axis=0)[:3] # Computing the barycenter
|
||||
|
Loading…
Reference in New Issue
Block a user