mirror of
https://github.com/pybricks/pybricks-api.git
synced 2026-07-28 04:07:46 +00:00
pybricks.geometry: add Axis.ANY
This exists in the firmware but was missing here.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
# SPDX-License-Identifier: MIT
|
||||
# Copyright (c) 2018-2020 The Pybricks Authors
|
||||
# Copyright (c) 2018-2021 The Pybricks Authors
|
||||
|
||||
"""Core linear algebra functionality for orientation sensors and robotics."""
|
||||
|
||||
@@ -42,19 +42,21 @@ def vector(x, y, z=None):
|
||||
|
||||
|
||||
Returns:
|
||||
Matrix: A matrix with the shape of a column vector.
|
||||
Matrix: A matrix with the shape of a column vector.
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
class Axis():
|
||||
class Axis:
|
||||
"""Unit axes of a coordinate system.
|
||||
|
||||
.. data:: X = vector(1, 0, 0)
|
||||
.. data:: Y = vector(0, 1, 0)
|
||||
.. data:: Z = vector(0, 0, 1)
|
||||
.. data:: ANY = None
|
||||
|
||||
"""
|
||||
X = vector(1, 0, 0)
|
||||
Y = vector(0, 1, 0)
|
||||
Z = vector(0, 0, 1)
|
||||
ANY = None
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# SPDX-License-Identifier: MIT
|
||||
# Copyright (c) 2020 The Pybricks Authors
|
||||
# Copyright (c) 2020-2021 The Pybricks Authors
|
||||
|
||||
from _typeshed import NoneType
|
||||
from typing import Collection, Optional, Tuple
|
||||
|
||||
class Matrix:
|
||||
@@ -16,3 +17,4 @@ class Axis:
|
||||
X: Matrix
|
||||
Y: Matrix
|
||||
Z: Matrix
|
||||
ANY: NoneType
|
||||
|
||||
Reference in New Issue
Block a user