class*args, **kwargs)

Bases: pybind11_builtins.pybind11_object

This is a 2D vector struct that supports basic vector operations.

Overloaded function.

  1. __init__(self: -> None

  2. __init__(self:, x: float, y: float) -> None

dot(self:, vec: → float

Returns dot product of this vector with argument.


vec – Vector with which to perform dot product.

magnitude(self: → float

Returns magnitude of vector.

rotate(self:, angle: float) → None

Rotate a vector in Cartesian space.


angle – angle in degrees by which to rotate vector counter-clockwise.

scalarProject(self:, vec: → float

Returns scalar projection of this vector onto argument.


vec – Vector onto which to project this vector.

property x
property y