41 #define EPSILON 1.0E-06
44 #define FPzero(A) (fabs(A) <= EPSILON)
49 return A == B || fabs(A - B) <=
EPSILON;
55 return A != B && fabs(A - B) >
EPSILON;
82 #define FPzero(A) ((A) == 0)
83 #define FPeq(A,B) ((A) == (B))
84 #define FPne(A,B) ((A) != (B))
85 #define FPlt(A,B) ((A) < (B))
86 #define FPle(A,B) ((A) <= (B))
87 #define FPgt(A,B) ((A) > (B))
88 #define FPge(A,B) ((A) >= (B))
91 #define HYPOT(A, B) pg_hypot(A, B)
175 #define DatumGetPointP(X) ((Point *) DatumGetPointer(X))
176 #define PointPGetDatum(X) PointerGetDatum(X)
177 #define PG_GETARG_POINT_P(n) DatumGetPointP(PG_GETARG_DATUM(n))
178 #define PG_RETURN_POINT_P(x) return PointPGetDatum(x)
180 #define DatumGetLsegP(X) ((LSEG *) DatumGetPointer(X))
181 #define LsegPGetDatum(X) PointerGetDatum(X)
182 #define PG_GETARG_LSEG_P(n) DatumGetLsegP(PG_GETARG_DATUM(n))
183 #define PG_RETURN_LSEG_P(x) return LsegPGetDatum(x)
185 #define DatumGetPathP(X) ((PATH *) PG_DETOAST_DATUM(X))
186 #define DatumGetPathPCopy(X) ((PATH *) PG_DETOAST_DATUM_COPY(X))
187 #define PathPGetDatum(X) PointerGetDatum(X)
188 #define PG_GETARG_PATH_P(n) DatumGetPathP(PG_GETARG_DATUM(n))
189 #define PG_GETARG_PATH_P_COPY(n) DatumGetPathPCopy(PG_GETARG_DATUM(n))
190 #define PG_RETURN_PATH_P(x) return PathPGetDatum(x)
192 #define DatumGetLineP(X) ((LINE *) DatumGetPointer(X))
193 #define LinePGetDatum(X) PointerGetDatum(X)
194 #define PG_GETARG_LINE_P(n) DatumGetLineP(PG_GETARG_DATUM(n))
195 #define PG_RETURN_LINE_P(x) return LinePGetDatum(x)
197 #define DatumGetBoxP(X) ((BOX *) DatumGetPointer(X))
198 #define BoxPGetDatum(X) PointerGetDatum(X)
199 #define PG_GETARG_BOX_P(n) DatumGetBoxP(PG_GETARG_DATUM(n))
200 #define PG_RETURN_BOX_P(x) return BoxPGetDatum(x)
202 #define DatumGetPolygonP(X) ((POLYGON *) PG_DETOAST_DATUM(X))
203 #define DatumGetPolygonPCopy(X) ((POLYGON *) PG_DETOAST_DATUM_COPY(X))
204 #define PolygonPGetDatum(X) PointerGetDatum(X)
205 #define PG_GETARG_POLYGON_P(n) DatumGetPolygonP(PG_GETARG_DATUM(n))
206 #define PG_GETARG_POLYGON_P_COPY(n) DatumGetPolygonPCopy(PG_GETARG_DATUM(n))
207 #define PG_RETURN_POLYGON_P(x) return PolygonPGetDatum(x)
209 #define DatumGetCircleP(X) ((CIRCLE *) DatumGetPointer(X))
210 #define CirclePGetDatum(X) PointerGetDatum(X)
211 #define PG_GETARG_CIRCLE_P(n) DatumGetCircleP(PG_GETARG_DATUM(n))
212 #define PG_RETURN_CIRCLE_P(x) return CirclePGetDatum(x)
#define FLEXIBLE_ARRAY_MEMBER
static bool FPlt(double A, double B)
static bool FPge(double A, double B)
float8 pg_hypot(float8 x, float8 y)
static bool FPne(double A, double B)
static bool FPgt(double A, double B)
static bool FPle(double A, double B)
static bool FPeq(double A, double B)