Swift Limit is to store biggest Integer Value is (Int64):9223372036854775807
Need to compare: 20000000000000000000
That is larger than the max value , How can I tell that it is beyond upper bound, it simply overflows. Can’t compare.
I need to return 2147483648 if entered value crossed 9223372036854775807
Any suggestions? I know it can be simple enough, but no idea at the moment.