maths: matrix.is_magic should check for integers
This commit is contained in:
parent
5c030bf0ea
commit
6e2a78fc3b
@ -246,7 +246,8 @@ matrix::is_magic (void) const {
|
|||||||
double a = (*this)[i][j],
|
double a = (*this)[i][j],
|
||||||
b = (*this)[j][i];
|
b = (*this)[j][i];
|
||||||
|
|
||||||
if (!exactly_zero (a) || !exactly_zero (b))
|
if (!exactly_equal (static_cast<uintmax_t> (a), a) ||
|
||||||
|
!exactly_equal (static_cast<uintmax_t> (b), b))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (!numbers.contains (a) ||
|
if (!numbers.contains (a) ||
|
||||||
|
Loading…
x
Reference in New Issue
Block a user