From: Stas Sergeev Date: Tue, 26 Sep 2006 17:46:57 +0000 (+0000) Subject: better fix for is_valid() X-Git-Tag: 2.0~195 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=a2df241b284e63c0a67dca4df0400439c121987a;p=super-star-trek.git better fix for is_valid() --- diff --git a/src/sst.h b/src/sst.h index fbaa466..f9676f8 100644 --- a/src/sst.h +++ b/src/sst.h @@ -46,7 +46,7 @@ typedef struct {int x; int y;} coord; #define same(c1, c2) ((c1.x == c2.x) && (c1.y == c2.y)) #define distance(c1, c2) sqrt(square(c1.x - c2.x) + square(c1.y - c2.y)) #define invalidate(w) w.x = w.y = 0 -#define is_valid(w) (w.x != 0 || w.y != 0) +#define is_valid(w) (w.x != 0 && w.y != 0) typedef struct { coord w;