1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-23 13:07:16 +00:00

cleaner nil model conversions

This commit is contained in:
Zeno Rogue 2024-08-21 19:21:11 +02:00
parent cd364831f8
commit bb26fe314c

View File

@ -766,8 +766,12 @@ EX namespace nilv {
return H[0] * H[1] / 2;
}
EX ld convert_bonus(hyperpoint H, ld from, ld to) {
return sym_to_heis_bonus(H) * (to - from);
}
EX hyperpoint convert(hyperpoint H, ld from, ld to) {
H[2] += sym_to_heis_bonus(H) * (to - from);
H[2] += convert_bonus(H, from, to);
return H;
}