================
@@ -71,6 +71,27 @@ constexpr vector<T, L> reflect_vec_impl(vector<T, L> I,
vector<T, L> N) {
#endif
}
+template <typename T> constexpr T refract_impl(T I, T N, T eta) {
+ T k = 1 - eta * eta * (1 - (N * I * N *I));
+ if(k < 0)
----------------
farzonl wrote:
I feel like we can simplify these conditionals to use a select instead.
https://github.com/llvm/llvm-project/pull/136026
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits