fix(pre_commit): 🎨 auto format pre-commit hooks
This commit is contained in:
1 parent
b7d18681b1
commit
960e2529b1
1 file changed
+2
-2
@@ -36,7 +36,7 @@ def get_polygon_center(polygon: np.ndarray) -> Point:
|
||||
shifted_polygon = np.roll(polygon, 1, axis=0)
|
||||
points = (shifted_polygon + polygon) / 2
|
||||
vectors = shifted_polygon - polygon
|
||||
mass = np.sum(vectors ** 2, axis=1) ** 0.5
|
||||
mass = np.sum(vectors**2, axis=1) ** 0.5
|
||||
center = ((mass @ points) / np.sum(mass)).round()
|
||||
|
||||
|
||||
return Point(x=center[0], y=center[1])
|
||||
Reference in new issue
Block a user