From beddfd0319b61a59617dc8ca98ce038262264390 Mon Sep 17 00:00:00 2001 From: WU Qi Date: Sun, 14 Jan 2024 22:34:34 -0800 Subject: [PATCH 1/2] Propagate updates from internal branch (7d0650) --- extern/gdt/gdt/math/mat/LinearSpace.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extern/gdt/gdt/math/mat/LinearSpace.h b/extern/gdt/gdt/math/mat/LinearSpace.h index 5048ecb..60a45f9 100644 --- a/extern/gdt/gdt/math/mat/LinearSpace.h +++ b/extern/gdt/gdt/math/mat/LinearSpace.h @@ -277,7 +277,7 @@ namespace gdt { { const T dx0 = cross(T(one,zero,zero),N); const T dx1 = cross(T(zero,one,zero),N); - const T dx = normalize(select(dot(dx0,dx0) > dot(dx1,dx1),dx0,dx1)); + const T dx = normalize(::select(dot(dx0,dx0) > dot(dx1,dx1),dx0,dx1)); const T dy = normalize(cross(N,dx)); return LinearSpace3(dx,dy,N); } From c0934bcc395a3655d1337ca73b22890073629e8a Mon Sep 17 00:00:00 2001 From: WU Qi Date: Sun, 14 Jan 2024 22:50:23 -0800 Subject: [PATCH 2/2] Fix (1fba3b4) --- extern/gdt/gdt/math/mat/LinearSpace.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extern/gdt/gdt/math/mat/LinearSpace.h b/extern/gdt/gdt/math/mat/LinearSpace.h index 60a45f9..6a5bcaa 100644 --- a/extern/gdt/gdt/math/mat/LinearSpace.h +++ b/extern/gdt/gdt/math/mat/LinearSpace.h @@ -277,7 +277,7 @@ namespace gdt { { const T dx0 = cross(T(one,zero,zero),N); const T dx1 = cross(T(zero,one,zero),N); - const T dx = normalize(::select(dot(dx0,dx0) > dot(dx1,dx1),dx0,dx1)); + const T dx = normalize(dot(dx0,dx0) > dot(dx1,dx1) ? dx0 : dx1); const T dy = normalize(cross(N,dx)); return LinearSpace3(dx,dy,N); }