fibomat.linalg.vectors package#

fibomat.linalg.vectors.VectorLike#

vector-like objects for type hints

alias of Union[Vector, Iterable[float]]

fibomat.linalg.vectors.DimVectorLike#

dim-vector-like objects for type hints

alias of Union[DimVector, Quantity]

fibomat.linalg.vectors.angle_between(vec_1: Vector | Iterable[float] | DimVector | Quantity, vec_2: Vector | Iterable[float] | DimVector | Quantity) float[source]#

Returns the the angle between two vectors.

Args:

vec_1 (VectorLike): first vector vec_2 (VectorLike): second vector

Returns:

float

fibomat.linalg.vectors.signed_angle_between(vec_1: Vector | Iterable[float] | DimVector | Quantity, vec_2: Vector | Iterable[float] | DimVector | Quantity)[source]#

Returns the signed the angle between two vectors. The angle is positive if the rotation from vec_1 to vec_2 is in positive direction using the smaller angle between them.

https://stackoverflow.com/a/16544330

Args:

vec_1 (VectorLike): first vector vec_2 (VectorLike): second vector

Returns:

float

Submodules#