在 python 里,3 / 4 = 0.75 。int(3) / int(4) = 0.75 。 但是 int(3 / 4) = 0 。 所以,cx = ax / a0 * 2 之后,int(cx) 跟 cx 可能不相等。但 float(cx) 和 cx 是相等的。
阅读量:1
点赞量:0