From 97ea8f8c4ba1642266fa52c5273dba9bb311f5e1 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Mon, 23 Dec 2019 20:51:36 +0100 Subject: [PATCH] arb:: fixed get_corner_position to work with negative cid --- geometry2.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/geometry2.cpp b/geometry2.cpp index e003a393..410157dc 100644 --- a/geometry2.cpp +++ b/geometry2.cpp @@ -426,7 +426,7 @@ EX hyperpoint get_corner_position(cell *c, int cid, ld cf IS(3)) { #endif if(arb::in()) { auto& sh = arb::current.shapes[arb::id_of(c->master)]; - return normalize(C0 + (sh.vertices[cid % c->type] - C0) * 3 / cf); + return normalize(C0 + (sh.vertices[gmod(cid, c->type)] - C0) * 3 / cf); } if(PURE) { return ddspin(c,cid,M_PI/S7) * xpush0(cgi.hcrossf * 3 / cf);