makeInfiniteMatrix function Null safety

Matrix4 makeInfiniteMatrix (
  1. double fovYRadians,
  2. double aspectRatio,
  3. double zNear
)

Constructs a new OpenGL infinite projection matrix.

fovYRadians specifies the field of view angle, in radians, in the y direction. aspectRatio specifies the aspect ratio that determines the field of view in the x direction. The aspect ratio of x (width) to y (height). zNear specifies the distance from the viewer to the near plane (always positive).

Implementation

Matrix4 makeInfiniteMatrix(
    double fovYRadians, double aspectRatio, double zNear) {
  final r = Matrix4.zero();
  setInfiniteMatrix(r, fovYRadians, aspectRatio, zNear);
  return r;
}