Function navtk::is_identity

Function Documentation

bool navtk::is_identity(const Matrix &mat)

Check if a square matrix is identity.

Parameters

mat – Matrix to check. Equal rows/cols are required but not checked.

Returns

True if all off-diagonal elements are 0 and all diagonal elements are

  1. Returns false if matrix has 0 size.