mat3: nml::mat3 nml::mat3::identity()

Return a ([1.0, 0.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, 1.0]) identity matrix.

\(\begin{bmatrix} 1.0 & 0.0 & 0.0 \\ 0.0 & 1.0 & 0.0 \\ 0.0 & 0.0 & 1.0 \end{bmatrix}\)

Example

#include "include/mat3.h"
#include <iostream>

int main() {
        nml::mat3 m = nml::mat3::identity();
        std::cout << nml::to_string(m) << std::endl;

        return 0;
}

Result:

[[1.000000, 0.000000, 0.000000], [0.000000, 1.000000, 0.000000], [0.000000, 0.000000, 1.000000]]