From 4de7d345a3dc703b2da279851661ad36ef500638 Mon Sep 17 00:00:00 2001 From: lisyarus Date: Wed, 21 Oct 2020 22:26:27 +0300 Subject: [PATCH] Fix orthographic transform inverse --- libs/geom/include/psemek/geom/orthographic.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/geom/include/psemek/geom/orthographic.hpp b/libs/geom/include/psemek/geom/orthographic.hpp index 0748008c..d508efcb 100644 --- a/libs/geom/include/psemek/geom/orthographic.hpp +++ b/libs/geom/include/psemek/geom/orthographic.hpp @@ -94,8 +94,8 @@ namespace psemek::geom { auto inv = [](interval const & i) { - auto const s = i.length(); - auto const d = i.max - i.min; + auto const s = i.min + i.max; + auto const d = i.length(); return interval{ (- s - 2) / d, (- s + 2) / d }; };