All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.dev.inmo.micro_utils.matrix.MatrixFactories.kt Maven / Gradle / Ivy

There is a newer version: 0.22.2
Show newest version
package dev.inmo.micro_utils.matrix

fun  matrix(block: MatrixBuilder.() -> Unit): Matrix {
    return MatrixBuilder().also(block).matrix
}

fun  flatMatrix(block: RowBuilder.() -> Unit): Matrix {
    return MatrixBuilder().apply {
        row(block)
    }.matrix
}

fun  flatMatrix(vararg elements: T): Matrix {
    return MatrixBuilder().apply {
        row { elements.forEach { +it } }
    }.matrix
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy