Skip to content

raylib.MatrixTrace

JoeStrout edited this page Apr 29, 2026 · 2 revisions

Get the trace of the matrix (sum of the values along the diagonal)

Parameters

Parameter Default Value Note
mat MatrixIdentity

Return value

Condition Return Value
(always) number

Notes

Example

mat = raylib.MatrixIdentity
t = raylib.MatrixTrace(mat)
print t  // 4 (sum of diagonal of 4x4 identity)

Clone this wiki locally