Matrix.fromDiagonal

Constructs a Matrix with all diagonal values equal to diag and all others equal to 0.

  1. Matrix fromDiagonal(T diag)
    struct Matrix(T, uint numColumns, uint numRows = numColumns)
    static
    fromDiagonal
    (
    const T diag
    )
    if (
    numColumns > 0 &&
    numRows > 0
    )
  2. Matrix fromDiagonal(T[N] diag)

Meta