PostGIS
2.4.9dev-r@@SVN_REVISION@@
box2d.c
Go to the documentation of this file.
1
/**********************************************************************
2
*
3
* PostGIS - Spatial Types for PostgreSQL
4
* http://postgis.net
5
*
6
* PostGIS is free software: you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation, either version 2 of the License, or
9
* (at your option) any later version.
10
*
11
* PostGIS is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
15
*
16
* You should have received a copy of the GNU General Public License
17
* along with PostGIS. If not, see <http://www.gnu.org/licenses/>.
18
*
19
**********************************************************************
20
*
21
* Copyright (C) 2004-2015 Sandro Santilli <strk@kbt.io>
22
* Copyright (C) 2008-2011 Paul Ramsey <pramsey@cleverelephant.ca>
23
* Copyright (C) 2008 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
24
*
25
**********************************************************************/
26
27
#include <stdio.h>
28
#include <stdlib.h>
29
#include <string.h>
30
31
#include "
liblwgeom_internal.h
"
32
33
#ifndef EPSILON
34
#define EPSILON 1.0E-06
35
#endif
36
#ifndef FPeq
37
#define FPeq(A,B) (fabs((A) - (B)) <= EPSILON)
38
#endif
39
40
41
42
GBOX
*
43
box2d_clone
(
const
GBOX
*in)
44
{
45
GBOX
*ret =
lwalloc
(
sizeof
(
GBOX
));
46
memcpy(ret, in,
sizeof
(
GBOX
));
47
return
ret;
48
}
GBOX
Definition:
liblwgeom.h:289
box2d_clone
GBOX * box2d_clone(const GBOX *in)
Definition:
box2d.c:43
liblwgeom_internal.h
lwalloc
void * lwalloc(size_t size)
Definition:
lwutil.c:229
liblwgeom
box2d.c
Generated by
1.8.13