From d1372c6776ab7cdf459de678e2343b66365c219c Mon Sep 17 00:00:00 2001 From: RexBerry <59031902+RexBerry@users.noreply.github.com> Date: Thu, 9 Mar 2023 18:12:12 -0600 Subject: [PATCH] Remove unnecessary truncation from Vector3::hash() #16 --- flight/avoidance/vector/vector3.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/flight/avoidance/vector/vector3.py b/flight/avoidance/vector/vector3.py index bf7cff04..7a0dd55b 100644 --- a/flight/avoidance/vector/vector3.py +++ b/flight/avoidance/vector/vector3.py @@ -89,8 +89,7 @@ def to_mavsdk_velocitynedyaw( return mavsdk.offboard.VelocityNedYaw(self.north, self.east, self.down, yaw_deg) def __hash__(self) -> int: - big_hash: int = ((hash(self.north) * 3) + hash(self.east)) * 3 + hash(self.down) - return big_hash & 0xFFFF_FFFF_FFFF_FFFF + return ((hash(self.north) * 3) + hash(self.east)) * 3 + hash(self.down) # Implement unpacking def __iter__(self) -> Iterator[float]: