1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-12-19 04:18:06 +00:00

moved hyperpoint inlines to hyperpoint.cpp

This commit is contained in:
Zeno Rogue
2019-08-10 00:28:28 +02:00
parent 19a01caf55
commit aa1b3f3057
3 changed files with 30 additions and 28 deletions

View File

@@ -791,4 +791,32 @@ EX ld ortho_error(transmatrix T) {
return err;
}
#if HDR
inline hyperpoint cpush0(int c, ld x) {
hyperpoint h = Hypc;
h[GDIM] = cos_auto(x);
h[c] = sin_auto(x);
return h;
}
inline hyperpoint xspinpush0(ld alpha, ld x) {
hyperpoint h = Hypc;
h[GDIM] = cos_auto(x);
h[0] = sin_auto(x) * cos(alpha);
h[1] = sin_auto(x) * -sin(alpha);
return h;
}
inline hyperpoint xpush0(ld x) { return cpush0(0, x); }
inline hyperpoint ypush0(ld x) { return cpush0(1, x); }
inline void reset_projection() { new_projection_needed = true; }
// T * C0, optimized
inline hyperpoint tC0(const transmatrix &T) {
hyperpoint z;
for(int i=0; i<MDIM; i++) z[i] = T[i][DIM];
return z;
}
#endif
}