| 161 | |
| 162 | template<typename T> |
| 163 | bool IsM44Identity(const T * m44) |
| 164 | { |
| 165 | static_assert(std::is_floating_point<T>::value, |
| 166 | "Only single and double precision floats are supported"); |
| 167 | |
| 168 | unsigned int index=0; |
| 169 | |
| 170 | for(unsigned int j=0; j<4; ++j) |
| 171 | { |
| 172 | for(unsigned int i=0; i<4; ++i) |
| 173 | { |
| 174 | index = 4*j+i; |
| 175 | |
| 176 | if(i==j) |
| 177 | { |
| 178 | if(!IsScalarEqualToOne(m44[index])) return false; |
| 179 | } |
| 180 | else |
| 181 | { |
| 182 | if(!IsScalarEqualToZero(m44[index])) return false; |
| 183 | } |
| 184 | } |
| 185 | } |
| 186 | |
| 187 | return true; |
| 188 | } |
| 189 | |
| 190 | template bool IsM44Identity(const float * m44); |
| 191 | template bool IsM44Identity(const double * m44); |
no test coverage detected