mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-05 21:56:17 +00:00
solv:: removed pt, only hyperpoint now
This commit is contained in:
parent
36dbe1d63b
commit
78116c6383
11
sol.cpp
11
sol.cpp
@ -9,7 +9,6 @@ namespace solv {
|
|||||||
|
|
||||||
int PRECX, PRECY, PRECZ;
|
int PRECX, PRECY, PRECZ;
|
||||||
|
|
||||||
typedef hyperpoint pt;
|
|
||||||
typedef array<float, 3> ptlow;
|
typedef array<float, 3> ptlow;
|
||||||
|
|
||||||
vector<ptlow> inverse_exp_table;
|
vector<ptlow> inverse_exp_table;
|
||||||
@ -18,7 +17,7 @@ namespace solv {
|
|||||||
|
|
||||||
string solfname = "solv-geodesics.dat";
|
string solfname = "solv-geodesics.dat";
|
||||||
|
|
||||||
pt inverse_exp(pt h);
|
hyperpoint inverse_exp(hyperpoint h);
|
||||||
|
|
||||||
void load_table() {
|
void load_table() {
|
||||||
if(table_loaded) return;
|
if(table_loaded) return;
|
||||||
@ -61,8 +60,8 @@ namespace solv {
|
|||||||
vz += az2;
|
vz += az2;
|
||||||
}
|
}
|
||||||
|
|
||||||
pt direct_exp(pt v, int steps) {
|
hyperpoint direct_exp(hyperpoint v, int steps) {
|
||||||
pt at;
|
hyperpoint at;
|
||||||
at[0] = 0;
|
at[0] = 0;
|
||||||
at[1] = 0;
|
at[1] = 0;
|
||||||
at[2] = 0;
|
at[2] = 0;
|
||||||
@ -86,7 +85,7 @@ namespace solv {
|
|||||||
wz += dwz * t;
|
wz += dwz * t;
|
||||||
}
|
}
|
||||||
|
|
||||||
pt direct_exp(pt v, int steps, vector<pt> transported) {
|
hyperpoint direct_exp(hyperpoint v, int steps, vector<hyperpoint> transported) {
|
||||||
ld x = 0, y = 0, z = 0;
|
ld x = 0, y = 0, z = 0;
|
||||||
v[0] /= steps;
|
v[0] /= steps;
|
||||||
v[1] /= steps;
|
v[1] /= steps;
|
||||||
@ -112,7 +111,7 @@ namespace solv {
|
|||||||
return 0.5 - atan((0.5-x) / y) / M_PI;
|
return 0.5 - atan((0.5-x) / y) / M_PI;
|
||||||
}
|
}
|
||||||
|
|
||||||
pt inverse_exp(pt h, bool lazy) {
|
hyperpoint inverse_exp(hyperpoint h, bool lazy) {
|
||||||
load_table();
|
load_table();
|
||||||
|
|
||||||
ld ix = h[0] >= 0. ? x_to_ix(h[0]) : x_to_ix(-h[0]);
|
ld ix = h[0] >= 0. ? x_to_ix(h[0]) : x_to_ix(-h[0]);
|
||||||
|
Loading…
Reference in New Issue
Block a user