From 9f71fa38a272717aa893cfabac69e33c6626c646 Mon Sep 17 00:00:00 2001 From: Teodora Iulia Craciun Date: Sat, 15 Aug 2026 21:49:51 +0200 Subject: [PATCH] semantic name --- src/hello_world/__init__.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/hello_world/__init__.py b/src/hello_world/__init__.py index 5ecf5d9..1f5dcd2 100644 --- a/src/hello_world/__init__.py +++ b/src/hello_world/__init__.py @@ -12,18 +12,19 @@ zero_vector = Vector(0,0) def main() -> None: print("Hello Teodora!") - distance = displacementVector(current_pos, target_pos) + displacement = displacementVector(current_pos, target_pos) # define function displacement + print(displacement) + + distance = length(displacement) ## define function distance print(distance) - lengthOfDistanceVector = length(distance) - print(lengthOfDistanceVector) - - direction = safe_normalize(distance, 0.001) + direction = safe_normalize(displacement, 0.001) # define function safe normalisation print(direction) -## calculate the displacement from current position to target position +## calculate the displacement from current position to target position + def displacementVector(current_pos, target_pos): displacementVector = Vector(target_pos.x - current_pos.x, target_pos.y - current_pos.y) return displacementVector