/**
 *
 * @param {number[]} m
 * @param {number} [tolerance]
 * @returns {boolean}
 */
export function m2_is_diagonal(m, tolerance = 1e-6) {
    return Math.abs(m[1]) < tolerance && Math.abs(m[2]) < tolerance;
}