unitelabs.labware.math.vector
Attributes
- Name
Number
- Type
- Value
= typing.Union[str, int, float, tuple[int, collections.abc.Sequence[int], int], decimal.Decimal]
- Description
Classes
Vector
Represents coordinates in a Cartesian coordinate system. In the context of robotics, imagine to face the machine's front: the system's origin is the bottom left corner next to you. ``` z ↑ y | ↗ └ - → x ```
- Decorators
- dataclasses.dataclass
Methods
update(self, x : typing.Optional[Number], y : typing.Optional[Number], z : typing.Optional[Number]) -> Vector
Returns a new Vector with the provided coordinate updates.
Parameters
- Name
self
- Type
- Default
- Description
- Name
x
- Type
- typing.Optional[Number]
- Default
- = None
- Description
- Name
y
- Type
- typing.Optional[Number]
- Default
- = None
- Description
- Name
z
- Type
- typing.Optional[Number]
- Default
- = None
- Description
Response
- Type
- Vector
- Description
A new Vector with the updated or same x, y, and z values as the
__bool__(self) -> bool
Response
- Type
- bool
- Description
Attributes
- Name
x
- Type
- Decimal
- Value
= dataclasses.field(metadata={'marshmallow_field': DecimalField()}, default=Decimal(default=0))
- Description
- Name
y
- Type
- Decimal
- Value
= dataclasses.field(metadata={'marshmallow_field': DecimalField()}, default=Decimal(default=0))
- Description
- Name
z
- Type
- Decimal
- Value
= dataclasses.field(metadata={'marshmallow_field': DecimalField()}, default=Decimal(default=0))
- Description