Exported float equality function
This commit is contained in:
parent
06f6e8221f
commit
b703b7dd09
@ -3,7 +3,7 @@ from math import sqrt
|
|||||||
const
|
const
|
||||||
eps = 1.0e-7 ## Epsilon used for float comparisons.
|
eps = 1.0e-7 ## Epsilon used for float comparisons.
|
||||||
|
|
||||||
proc `=~` *(x, y: float): bool =
|
proc `=~`*(x, y: float): bool =
|
||||||
result = abs(x - y) < eps
|
result = abs(x - y) < eps
|
||||||
|
|
||||||
type
|
type
|
||||||
|
Loading…
Reference in New Issue
Block a user