MatrixPerspective function

Matrix4 MatrixPerspective(
  1. double fovy,
  2. double aspect,
  3. double near,
  4. double far,
)

Implementation

Matrix4 MatrixPerspective(double fovy, double aspect, double near, double far) {
  final top = near * math.tan(fovy / 2);
  return MatrixFrustum(-top * aspect, top * aspect, -top, top, near, far);
}