My basic maths tells me: 4.0/10.0 == 0.4
But in swift, I get:
4.0/10.0
> Double = 0.40000000000000002
What is the cause of this weirdness? How do I get the number I expected?
My basic maths tells me: 4.0/10.0 == 0.4
But in swift, I get:
4.0/10.0
> Double = 0.40000000000000002
What is the cause of this weirdness? How do I get the number I expected?