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:
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 {
|
||||
int pshid[3][8][32][32][8];
|
||||
int nextid;
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user