1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-11-20 15:44:48 +00:00

tes:: fixed get_adj with infinite points

This commit is contained in:
Zeno Rogue
2022-04-23 00:42:53 +02:00
parent 47da0d9f09
commit cb654ca990
2 changed files with 13 additions and 13 deletions

View File

@@ -1684,6 +1684,13 @@ EX hyperpoint circumscribe(hyperpoint a, hyperpoint b, hyperpoint c, hyperpoint
return h;
}
/** the point in distance dist from 'material' to 'ideal' */
EX hyperpoint towards_ideal(hyperpoint material, hyperpoint ideal, ld dist IS(1)) {
transmatrix T = gpushxto0(material);
hyperpoint id = T * ideal;
return rgpushxto0(material) * rspintox(id) * xpush0(1);
}
EX bool clockwise(hyperpoint h1, hyperpoint h2) {
return h1[0] * h2[1] > h1[1] * h2[0];
}