标签: ios swift
为什么我打印时会这样:
print((buildingConstants.jitterClickConstantCost * 11)/10)
buildingConstants.jitterClickConstantCost = 1我得到了
buildingConstants.jitterClickConstantCost = 1
> 1
(预期)
但如果我打印
print(ceil(Double((buildingConstants.jitterClickConstantCost * 11)/10)))
(你假设它会产生2),产生:
> 0