api / koma / format

format

fun format(formatStr:String):Unit

Sets the format for Koma to display numbers in. For example, calling

format("long") println(randn(3))

will cause println(someMatrix) to show more decimals (precision) than

format("short") println(randn(3))

format() must be called before a .toString() request to a Koma matrix in order to have any effect, but setting it will persist for all printing of matrices until called again with a different format string. The default setting is "long". Supported options are "long", "short", "verylong".