fix du décalage visuel/réel de la décontamination

This commit is contained in:
Zacharie Guet 2025-09-26 09:47:25 +02:00
parent 35bc818399
commit 6d0100d703

View File

@ -93,6 +93,8 @@ func get_value_surface() -> float:
return float(ImageTools.get_color_pixel_count(image)) / UNIT_PER_PIXEL
func get_pixel_point(point : Vector2) -> Vector2i:
var vec : Vector2 = Vector2(point) / UNIT_PER_PIXEL - Vector2.ONE
return Vector2i(
Vector2(point) / UNIT_PER_PIXEL
roundi(vec.x),
roundi(vec.y)
)