mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-02-24 23:10:09 +00:00
moved mid3 and mid_at functions to hyperpoint.cpp
This commit is contained in:
parent
47c69694bc
commit
d8f63a9f3d
@ -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 {
|
namespace gp {
|
||||||
int pshid[3][8][32][32][8];
|
int pshid[3][8][32][32][8];
|
||||||
int nextid;
|
int nextid;
|
||||||
|
@ -604,4 +604,15 @@ transmatrix rotmatrix(double rotation, int c0, int c1) {
|
|||||||
return t;
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user