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:
@@ -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
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user