diff options
-rw-r--r-- | lib/convex.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/convex.c b/lib/convex.c index 33af1b4..4816aeb 100644 --- a/lib/convex.c +++ b/lib/convex.c @@ -6,6 +6,10 @@ double slope(point_t *P, point_t *Q) { } double *get_convex_minorant(uint64_t n, double *Gammas) { + if (n < 2) { + return Gammas; + } + list_t *L = (list_t *)calloc(1, sizeof(list_t)); L->p = (point_t *)calloc(1, sizeof(point_t)); L->p->x = 0; |