arb:: fixed get_corner_position to work with negative cid

This commit is contained in:
Zeno Rogue 2019-12-23 20:51:36 +01:00
parent 7a0e8ec022
commit 97ea8f8c4b
1 changed files with 1 additions and 1 deletions

View File

@ -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);