Skip to content

Commit

Permalink
Use equalWithAbsError instead of equal operator for float (#219)
Browse files Browse the repository at this point in the history
  • Loading branch information
splhack authored and cary-ilm committed Jan 20, 2022
1 parent 1ddf327 commit 7189fa8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/python/PyImathTest/pyImathTest.in
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@ def testBinaryVecMethods(f1, f2):
f = f1.cross(f2)
assert(len(f) == len(f1))
for i in range(0, len(f)):
assert(f[i] == f1[i].cross(f2[i]))
assert(equalWithAbsError(f[i], f1[i].cross(f2[i]), eps))

assert(f1.cross(f2) == -f2.cross(f1))

Expand All @@ -601,7 +601,7 @@ def testBinaryVecMethods(f1, f2):
f = f1.cross(v)
assert(len(f) == len(f1))
for i in range(0, len(f)):
assert(f[i] == f1[i].cross(v))
assert(equalWithAbsError(f[i], f1[i].cross(v), eps))

assert(f1.cross(v) == -v.cross(f1))

Expand Down

0 comments on commit 7189fa8

Please sign in to comment.