mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-10-31 19:36:16 +00:00
embeddings:: fixed product embedding
This commit is contained in:
parent
caf5b5dc8e
commit
3183e10168
@ -484,7 +484,7 @@ struct emb_same_in_same : emb_actual {
|
|||||||
|
|
||||||
struct emb_product_embedding : emb_actual {
|
struct emb_product_embedding : emb_actual {
|
||||||
virtual bool is_product_embedding() { return true; }
|
virtual bool is_product_embedding() { return true; }
|
||||||
transmatrix intermediate_to_actual_translation(hyperpoint i) { return rgpushxto0(i); }
|
transmatrix intermediate_to_actual_translation(hyperpoint i) { return rgpushxto0(logical_to_actual(i)); }
|
||||||
hyperpoint actual_to_intermediate(hyperpoint a) { return a; }
|
hyperpoint actual_to_intermediate(hyperpoint a) { return a; }
|
||||||
hyperpoint flatten(hyperpoint h) { h /= exp(zlevel(h)); return h; }
|
hyperpoint flatten(hyperpoint h) { h /= exp(zlevel(h)); return h; }
|
||||||
hyperpoint orthogonal_move(const hyperpoint& h, ld z) { return h * exp(z); }
|
hyperpoint orthogonal_move(const hyperpoint& h, ld z) { return h * exp(z); }
|
||||||
|
@ -30,9 +30,9 @@ pair<bool, hyperpoint> makeradar(shiftpoint h) {
|
|||||||
h1 = cgi.emb->actual_to_base(h1);
|
h1 = cgi.emb->actual_to_base(h1);
|
||||||
h1 = current_display->radar_transform_post * h1;
|
h1 = current_display->radar_transform_post * h1;
|
||||||
if(mhyperbolic) {
|
if(mhyperbolic) {
|
||||||
h1[LDIM] = h1[2]; h1[2] = 0;
|
h1[LDIM] = h1[2]; if(!gproduct) h1[2] = 0;
|
||||||
for(int a=0; a<LDIM; a++) h1[a] = h1[a] / (1 + h1[LDIM]);
|
for(int a=0; a<LDIM; a++) h1[a] = h1[a] / (1 + h1[LDIM]);
|
||||||
h1[3] *= 2;
|
h1[LDIM] *= 2;
|
||||||
}
|
}
|
||||||
if(meuclid) {
|
if(meuclid) {
|
||||||
ld d = hypot_d(2, h1);
|
ld d = hypot_d(2, h1);
|
||||||
|
Loading…
Reference in New Issue
Block a user