B2G/gecko/browser/devtools/tilt/TiltMath.jsm
/**
   * Generates a perspective projection matrix with the given bounds.
   *
   * @param {Number} aFovy
   *                 scalar, vertical field of view (degrees)
   * @param {Number} aAspect
   *                 scalar, aspect ratio (typically viewport width/height)
   * @param {Number} aNear
   *                 scalar, near bound of the frustum
   * @param {Number} aFar
   *                 scalar, far bound of the frustum
   * @param {Array} aDest
   *                optional, mat4 frustum matrix will be written into
   *                if not specified result is written to a new mat4
   *
   * @return {Array} the destination mat4 if specified, a new mat4 otherwise
   */
Generates a perspective projection matrix with the given bounds.

@return {Array} the destination mat4 if specified, a new mat4 otherwise
Generates a perspective projection matrix with the given bounds . @return { Array } the destination mat4 if specified a new mat4 otherwise
function M4_perspective(
    aFovy, aAspect, aNear, aFar, aDest, aFlip)
  {
    let upper = aNear * Math.tan(aFovy * 0.00872664626); 
    let right = upper * aAspect;
    let top = upper * (aFlip || 1);
    return mat4.frustum(-right, right, -top, top, aNear, aFar, aDest);
  }
function M4_perspective ( aFovy , aAspect , aNear , aFar , aDest , aFlip ) { let upper = aNear * Math . tan ( aFovy * 0.00872664626 ) ; let right = upper * aAspect ; let top = upper * ( aFlip || 1 ) ; return mat4 . frustum ( - right , right , - top , top , aNear , aFar , aDest ) ; }
Generates a perspective projection matrix with the given bounds.
Generates a perspective projection matrix with the given bounds .
// PI * 180 / 2