Vector2:refract

From Wake
Jump to: navigation, search

Calculate the refraction vector.

Function

Synopsis

result = Vector2:refract(i, n, eta)

Arguments

Vector2 i

Normalized incident vector.


Vector2 n

Surface normal.


Vector2 eta

Ratio of indices of refraction.

Returns

number result

Refraction vector.

See Also