pybricks.tools: Document cross product.

This commit is contained in:
Laurens Valk
2023-04-21 13:39:08 +02:00
parent 9cde749e8a
commit 870aae83c0
3 changed files with 18 additions and 0 deletions
+15
View File
@@ -207,6 +207,21 @@ def vector(*args):
"""
def cross(a: Matrix, b: Matrix) -> Matrix:
"""
cross(a, b) -> Matrix
Gets the cross product ``a`` × ``b`` of two vectors.
Arguments:
a (Matrix): A three-dimensional vector.
b (Matrix): A three-dimensional vector.
Returns:
The cross product, also a three-dimensional vector.
"""
# HACK: hide from jedi
if TYPE_CHECKING:
del Number