elect
04/30/2019, 12:54 PMN : Number
. If I have a comparison shall I cast if((v as Int) == (vCur as Int))
or I can leave it plain if(v == vCur)
?ribesg
04/30/2019, 12:56 PMInt
. Who says a Number
is an Int
elect
04/30/2019, 12:57 PMribesg
04/30/2019, 12:58 PMNumber
isn’t an easy task, I guess you need to check all the equals implementations to see how that worksribesg
04/30/2019, 1:01 PM1f.equals(1.0)
is falseelect
04/30/2019, 1:02 PMelect
04/30/2019, 1:02 PMribesg
04/30/2019, 1:03 PMribesg
04/30/2019, 1:04 PMFloat.equals(other: Any?)
calls Float.equals(other: Float)
is other is of type Float
, then you should be safe. I expect that it’s how it should work already, but you’re right to want some confirmationribesg
04/30/2019, 1:04 PMDias
04/30/2019, 1:05 PMelect
04/30/2019, 1:07 PM