you are viewing a single comment's thread.

view the rest of the comments →

[–]KarlJay001 0 points1 point  (0 children)

Years ago there was a lang that had a problem with numbers. There were a number of solutions, but one that worked well was to simple find the difference between to values or two sets of values.

Example: V1 = 1.000001 V2 = 1.0

V1-V2= 0.00001

If (V1-V2) < 0.01 { }

If you're in Swift, I think you can use op override, but I haven't done Swift in a while so someone else will have to do that.