forked from jhamman/DHSVM
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathInArea.c
executable file
·33 lines (31 loc) · 871 Bytes
/
InArea.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/*
* SUMMARY: InArea.c - Check whether a pixel is in the area
* USAGE: Part of DHSVM
*
* AUTHOR: Bart Nijssen
* ORG: University of Washington, Department of Civil Engineering
* E-MAIL: [email protected]
* ORIG-DATE: Apr-96
* DESCRIPTION: Check whether a pixel is in the area
* DESCRIP-END.
* FUNCTIONS: InArea()
* COMMENTS:
* $Id $
*/
#include <stdio.h>
#include <stdlib.h>
#include "constants.h"
#include "settings.h"
#include "data.h"
/*****************************************************************************
InArea()
*****************************************************************************/
uchar InArea(MAPSIZE * Map, COORD * Loc)
{
if (Loc->N < 0 || Loc->N > (Map->NY - 1))
return FALSE;
else if (Loc->E < 0 || Loc->E > (Map->NX - 1))
return FALSE;
else
return TRUE;
}