From 37aa0dadee188a1f70c96719d1f6afdc6e2ad127 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Wed, 15 Feb 2023 14:47:09 +0100 Subject: [PATCH] embeddings:: fixed actual_to_logical and logical_to_actual in emb_same_in_same Euclidean --- embeddings.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/embeddings.cpp b/embeddings.cpp index 2908d882..12c0a811 100644 --- a/embeddings.cpp +++ b/embeddings.cpp @@ -505,6 +505,7 @@ struct emb_same_in_same : emb_actual { } hyperpoint actual_to_logical(hyperpoint h) override { + if(euclid) { h[3] = 1; return h; } ld z = asin_auto(h[2]); ld u = 1 / cos_auto(z); auto h1 = hpxy3(h[0] * u, h[1] * u, 0); @@ -516,6 +517,7 @@ struct emb_same_in_same : emb_actual { } hyperpoint logical_to_actual(hyperpoint h) override { + if(euclid) { h[3] = 1; return h; } geom3::light_flip(true); auto b = logical_to_base(h); geom3::light_flip(false);