Function wt::refract

Function Documentation

inline auto wt::refract(f_t eta_12, const dir3_t &w, const dir3_t &n = {0, 0, 1}) noexcept

Refracts the direction vector w w.r.t. surface normal n. w is assumed to point away from the surface. On total-internal-reflection returns TIR=true.

Parameters:

eta_12 – Refractive-index ratio