diff --git a/qpms/lattices.h b/qpms/lattices.h index d8c063d..f0bc038 100644 --- a/qpms/lattices.h +++ b/qpms/lattices.h @@ -16,6 +16,7 @@ static inline point2d point2d_fromxy(const double x, const double y) { point2d p; p.x = x; p.y = y; + return p; } /* @@ -40,6 +41,7 @@ typedef struct { // returns a copy but scaled by a factor points2d_rordered_t *points2d_rordered_scale(const points2d_rordered_t *orig, double factor); + void points2d_rordered_free(points2d_rordered_t *); // use only for result of points2d_rordered_scale static inline point2d points2d_rordered_get_point(const points2d_rordered_t *ps, int r_order, int i) { diff --git a/qpms/lattices2d.c b/qpms/lattices2d.c index d5b9f20..2a4c480 100644 --- a/qpms/lattices2d.c +++ b/qpms/lattices2d.c @@ -295,6 +295,7 @@ static void trilatgen_sort_pointlist(triangular_lattice_gen_t *g) { triangular_lattice_gen_t * triangular_lattice_gen_init(double a, TriangularLatticeOrientation ori, bool include_origin) { triangular_lattice_gen_t *g = malloc(sizeof(triangular_lattice_gen_t)); + g->a = a; g->orientation = ori; g->includes_origin = include_origin; g->ps.nrs = 0;