From 61de16af8d2aca00d7eabcf800c3bcd6e0ebcb79 Mon Sep 17 00:00:00 2001 From: ThisBirchWood Date: Sat, 15 Mar 2025 22:40:04 +0100 Subject: [PATCH] REMOVE: coordinate manager --- coordinate_manager.py | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 coordinate_manager.py diff --git a/coordinate_manager.py b/coordinate_manager.py deleted file mode 100644 index ab86d85..0000000 --- a/coordinate_manager.py +++ /dev/null @@ -1,17 +0,0 @@ -# Description: This file contains the CoordinateManager class which is responsible for converting coordinates to pixels and vice versa. - -class CoordinateManager: - def __init__(self, width, height): - self.width = width - self.height = height - - def mapped_value(self, value, in_min, in_max, out_min, out_max): - return (value - in_min) * (out_max - out_min) / (in_max - in_min) + out_min - - def coord_to_pixel(self, x, y): - mapped_x = self.mapped_value(x, -3000, 3000, 0, self.width) - mapped_y = self.mapped_value(y, -3000, 3000, 0, self.height) - return mapped_x, mapped_y - - def get_top_left(self, width, height, scale): - return (width - scale) // 2, (height - scale) // 2 \ No newline at end of file