Make refraction_angle compatible with Ray3D and plane. [skip ci]
Add test_util