let aa = 5.5 let bb = 2.2 // aa%bb 这种求余方法在 swift3.0 废除, 使用下面的方法 aa.truncatingRemainder(dividingBy: bb) 屏幕快照 2018-03-20 下午5.53.50.png