diff options
author | Thomas White <taw@physics.org> | 2011-02-01 15:55:15 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2012-02-22 15:27:12 +0100 |
commit | 671c1cef62c90851baa40dd3d6888af538c76bf3 (patch) | |
tree | e7bc1ed1fe6a8ec266622e8cd5b0d181f96706cf /src/cell.c | |
parent | 7c93c89421b5be2b37426b51ef997760fcb2e08d (diff) |
Don't get greedy in cell_new_from_cell()
Diffstat (limited to 'src/cell.c')
-rw-r--r-- | src/cell.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -185,10 +185,12 @@ UnitCell *cell_new_from_axes(struct rvec as, struct rvec bs, struct rvec cs) UnitCell *cell_new_from_cell(UnitCell *orig) { UnitCell *new; + double a, b, c, al, be, ga; - new = malloc(sizeof(UnitCell)); + new = cell_new(); - *new = *orig; + cell_get_parameters(orig, &a, &b, &c, &al, &be, &ga); + cell_set_parameters(new, a, b, c, al, be, ga); cell_set_pointgroup(new, orig->pointgroup); cell_set_spacegroup(new, orig->spacegroup); |