1
0

Exported float equality function

This commit is contained in:
neviyn 2020-07-22 14:27:41 +01:00
parent 06f6e8221f
commit b703b7dd09

View File

@ -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