Skip to content

Geometry

src.components.geometry

View source code

Minimal 2D vector used as a replacement for pygame.Vector2.

Vec2

Minimal 2D vector for this project: - rotate_ip(degrees): in-place rotation (degrees, counter-clockwise) - angle_to(other): signed angle to another vector (degrees) - magnitude(): vector length

x = float(x) instance-attribute

y = float(y) instance-attribute

__init__(x=0.0, y=0.0)

angle_to(other: Vec2) -> float

copy() -> Vec2

magnitude() -> float

rotate_ip(degrees: float) -> None