Skip to content

Commit

Permalink
update: math
Browse files Browse the repository at this point in the history
  • Loading branch information
VsevolodX committed Jul 19, 2024
1 parent 42ab772 commit d1a2cc6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/py/mat3ra/made/tools/build/defect/builders.py
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,8 @@ def create_terrace(
length = np.linalg.norm(
np.dot(np.array(material.basis.cell.vectors_as_nested_array), normalized_direction_vector)
)
angle = -np.arccos(height_cart / np.sqrt(length**2 + height**2)) * 180 / np.pi

angle = -np.arcsin(height_cart / np.sqrt(length**2 + height**2)) * 180 / np.pi

return [self._rotate_material(material=result_material, axis=normalized_rotation_axis, angle=angle)]

Expand Down

0 comments on commit d1a2cc6

Please sign in to comment.