Function wt::reflect

Function Documentation

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

Reflects the direction vector w w.r.t. surface normal n. w is assumed to point away from the surface.