Graphviz 13.0.0~dev.20241220.2304
|
trapezoid elements and utilities for partition.c More...
#include <stdbool.h>
#include <stddef.h>
Go to the source code of this file.
Data Structures | |
struct | segment_t |
struct | trap_t |
struct | traps_t |
an array of trapezoids More... | |
Macros | |
#define | ST_VALID 1 /* for trapezium state */ |
#define | ST_INVALID 2 |
#define | C_EPS 1.0e-7 /* tolerance value: Used for making */ |
#define | FP_EQUAL(s, t) (fabs(s - t) <= C_EPS) |
#define | _equal_to(v0, v1) (FP_EQUAL((v0)->y, (v1)->y) && FP_EQUAL((v0)->x, (v1)->x)) |
#define | _greater_than(v0, v1) (((v0)->y > (v1)->y + C_EPS) ? true : (((v0)->y < (v1)->y - C_EPS) ? false : ((v0)->x > (v1)->x))) |
Functions | |
static int | dfp_cmp (double f1, double f2) |
double floating point three-way comparison | |
traps_t | construct_trapezoids (int, segment_t *, int *) |
See Fast polygon triangulation based on Seidel's algorithm
Definition in file trap.h.
Definition at line 924 of file trapezoid.c.
References add_segment(), qnodes_t::data, find_new_roots(), free(), gv_calloc(), init_query_structure(), traps_t::length, qnodes_t::length, math_logstar_n(), and math_N().
Referenced by partition().
|
inlinestatic |
Returns -1, 0, or 1 if f1 respectively, less than, almost equal with tolerance C_EPS, or greater than f2. The purpose of the function is workaround precision issues.
Definition at line 71 of file trap.h.
References C_EPS.
Referenced by hcmpid(), and vcmpid().