I am translating a library from Java (Android) to -> Swift (iPhone)
Java code, works ok:
long a = 48590108397870l;
short b = ((short)(a & 65535));//b == -28370
Swift code:
let a : Int64 = 48590108397870
let b: Int16 = Int16(a & 65535)//Fatal error: Not enough bits to represent the passed value