1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-27 14:37:16 +00:00

moved mid3 and mid_at functions to hyperpoint.cpp

This commit is contained in:
Zeno Rogue 2018-08-04 22:35:15 +02:00
parent 47c69694bc
commit d8f63a9f3d
2 changed files with 11 additions and 11 deletions

View File

@ -282,17 +282,6 @@ void generate_floorshapes() {
}
}
hyperpoint mid3(hyperpoint h1, hyperpoint h2, hyperpoint h3) {
using namespace hyperpoint_vec;
return mid(h1+h2+h3, h1+h2+h3);
}
hyperpoint mid_at(hyperpoint h1, hyperpoint h2, ld v) {
using namespace hyperpoint_vec;
hyperpoint h = h1 * (1-v) + h2 * v;
return mid(h, h);
}
namespace gp {
int pshid[3][8][32][32][8];
int nextid;

View File

@ -604,4 +604,15 @@ transmatrix rotmatrix(double rotation, int c0, int c1) {
return t;
}
hyperpoint mid3(hyperpoint h1, hyperpoint h2, hyperpoint h3) {
using namespace hyperpoint_vec;
return mid(h1+h2+h3, h1+h2+h3);
}
hyperpoint mid_at(hyperpoint h1, hyperpoint h2, ld v) {
using namespace hyperpoint_vec;
hyperpoint h = h1 * (1-v) + h2 * v;
return mid(h, h);
}
}