infix operator ~= : ComparisonPrecedence
func ~=<T> (lhs:T,rhs:T)->Bool where T : FloatingPoint {
return lhs == rhs || lhs.nextDown == rhs || lhs.nextUp == rhs
}
0.1+0.2 ~= 0.3 //true
infix operator ~= : ComparisonPrecedence
func ~=<T> (lhs:T,rhs:T)->Bool where T : FloatingPoint {
return lhs == rhs || lhs.nextDown == rhs || lhs.nextUp == rhs
}
0.1+0.2 ~= 0.3 //true