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(vec: float

Returns dot product of this vector with argument.


vec – Vector with which to perform dot product.

magnitude() float

Returns magnitude of vector.

rotate(angle: float) None

Rotate a vector in Cartesian space.


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

scalarProject(vec: float

Returns scalar projection of this vector onto argument.


vec – Vector onto which to project this vector.

property x
property y