mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-30 03:50:34 +00:00
arb:: fixed get_corner_position to work with negative cid
This commit is contained in:
parent
7a0e8ec022
commit
97ea8f8c4b
@ -426,7 +426,7 @@ EX hyperpoint get_corner_position(cell *c, int cid, ld cf IS(3)) {
|
|||||||
#endif
|
#endif
|
||||||
if(arb::in()) {
|
if(arb::in()) {
|
||||||
auto& sh = arb::current.shapes[arb::id_of(c->master)];
|
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) {
|
if(PURE) {
|
||||||
return ddspin(c,cid,M_PI/S7) * xpush0(cgi.hcrossf * 3 / cf);
|
return ddspin(c,cid,M_PI/S7) * xpush0(cgi.hcrossf * 3 / cf);
|
||||||
|
Loading…
Reference in New Issue
Block a user