/*
* Empire - A multi-player, client/server Internet based war game.
- * Copyright (C) 1986-2008, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ * Copyright (C) 1986-2009, Dave Pare, Jeff Bailey, Thomas Ruschak,
* Ken Stevens, Steve McClure
*
* This program is free software; you can redistribute it and/or modify
* ---
*
* xy.c: x-y related conversion routines
- *
+ *
* Known contributors to this file:
* Dave Pare, 1989
+ * Markus Armbruster, 2004-2008
*/
#include <config.h>
int
xyinrange(coord x, coord y, struct range *rp)
{
- if (rp->lx < rp->hx) {
+ if (rp->lx <= rp->hx) {
/* xrange doesn't wrap */
if (x < rp->lx || x > rp->hx)
return 0;
if (x < rp->lx && x > rp->hx)
return 0;
}
- if (rp->ly < rp->hy) {
+ if (rp->ly <= rp->hy) {
/* yrange doesn't wrap */
if (y < rp->ly || y > rp->hy)
return 0;