From 57bf1ad3c78aef694c13363598360ef0f6c0d6a1 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Wed, 24 Apr 2019 09:30:58 -0400 Subject: [PATCH] Correct sgn(). --- sst.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sst.py b/sst.py index 8e14eb2..b8e7985 100755 --- a/sst.py +++ b/sst.py @@ -119,8 +119,8 @@ class JumpOut(Exception): class Coord: def __init__(self, x=None, y=None): - self.i = x - self.j = y + self.i = x # Row + self.j = y # Column def valid_quadrant(self): return self.i >= 0 and self.i < GALSIZE and self.j >= 0 and self.j < GALSIZE def valid_sector(self): @@ -164,12 +164,12 @@ class Coord: if self.i == 0: s.i = 0 elif s.i < 0: - s.i =-1 + s.i = -1 else: s.i = 1 if self.j == 0: s.j = 0 - elif s.j < 0: + elif self.j < 0: s.j = -1 else: s.j = 1 -- 2.31.1