mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2026-11-05 15:34:27 +00:00
moved mid3 and mid_at functions to hyperpoint.cpp
This commit is contained in:
1 parent
47c69694bc
commit
d8f63a9f3d
2 files changed
+11
-11
No files matched your search
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user