From 1d9760e41c8e0158aca6af5dc8599a93f5fe16e1 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Tue, 18 Jun 2024 11:21:59 +0200 Subject: [PATCH] ray:: fixed ray_kleinize_twisted for nil to return correct coordinates for top/bottom --- polygons.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/polygons.cpp b/polygons.cpp index 21bb6bf5..18573cd5 100644 --- a/polygons.cpp +++ b/polygons.cpp @@ -891,7 +891,7 @@ hyperpoint ray_kleinize_twisted(hyperpoint h, int ks, int id) { if(id < ks) h = spin(-TAU * id / ks) * h; - if(nil) return hyperpoint(x, y, z - x * y / 2, 1); + if(nil) return id >= ks ? hyperpoint(x, y, 0, 1) : hyperpoint(x, y, (z - x * y / 2) / nilv::nilwidth / nilv::nilwidth, 1); ld dx, dy;