commit | 960a37950cca5ec8d1efe76ed4eec9dfe3065bd6 | [log] [tgz] |
---|---|---|
author | Dan Kortschak <dan@kortschak.io> | Thu Feb 27 05:12:02 2020 +1030 |
committer | Dan Kortschak <dan@kortschak.io> | Thu Feb 27 06:58:45 2020 +1030 |
tree | 6848fa537cf255f6988aff59aab5d41761c9bcad | |
parent | 32189f28b71ad0780d99b0dfd39523492dc72a71 [diff] |
mat: document that Trace will use a Tracer's implementation
diff --git a/mat/matrix.go b/mat/matrix.go index ed90c99..efcf7da 100644 --- a/mat/matrix.go +++ b/mat/matrix.go
@@ -938,7 +938,8 @@ } // Trace returns the trace of the matrix. Trace will panic if the -// matrix is not square. +// matrix is not square. If a is a Tracer, its Trace method will be +// used to calculate the matrix trace. func Trace(a Matrix) float64 { m, _ := untransposeExtract(a) if t, ok := m.(Tracer); ok {