math.perspective

From Wake
Jump to: navigation, search

Create a perspective projection matrix.

Function

Synopsis

result = math.perspective(fovy, aspect, near)
result = math.perspective(fovy, aspect, near, far)

Arguments

number fovy

The vertical field of view, in radians.


number aspect

The aspect ratio.


number near

The near plane.


number far

The far plane. If this is unspecified, then the matrix will be created with the far plane at infinity.

Returns

Matrix4x4 result

The perspective projection matrix.

See Also