From 04db8b02854a0903cf6bc81db28221e5f4d9e5cb Mon Sep 17 00:00:00 2001 From: mwfarb Date: Mon, 28 Oct 2024 11:00:29 -0400 Subject: [PATCH] fix(position): remove duplicate getter --- arena/attributes/position.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/arena/attributes/position.py b/arena/attributes/position.py index bebb6fc..b60af9b 100644 --- a/arena/attributes/position.py +++ b/arena/attributes/position.py @@ -1,7 +1,8 @@ import math +from collections.abc import Iterable, Mapping + from ..utils import Utils from .attribute import Attribute -from collections.abc import Iterable, Mapping class Position(Attribute): @@ -47,10 +48,4 @@ def to_str(self): return Utils.tuple_to_string((self.x, self.y, self.z)) def distance_to(self, pos): - return math.sqrt( - (self.x - pos.x) ** 2 + (self.y - pos.y) ** 2 + (self.z - pos.z) ** 2 - ) - - @property - def array(self): - return [self.x, self.y, self.z] \ No newline at end of file + return math.sqrt((self.x - pos.x) ** 2 + (self.y - pos.y) ** 2 + (self.z - pos.z) ** 2)