我一直试图舍入长浮点数,例如: 32.268907563; 32.268907563; 31.2396694215; 33.6206896552; ... 到目前为止没有成功。我想math.ceil(x),math.floor(x)(尽管这或圆形上下,这是不是我要找的)和round(x)它没有任何工作(还是浮点数)。 我能做什么? 编辑:代码: for i in widthRange: for j in heightRange: r, g, b = rgb_im.getpixel((i, j)) h, s, v = colorsys.rgb_to_hsv(r/255.0, g/255.0, b/255.0) h = h * 360 int(round(h)) print(h)
我正在尝试在模拟器中运行应用程序,但收到以下错误消息: Unable to run app in Simulator An error was encountered while running (Domain = FBSSystemServiceDomain, Code = 4) 谷歌搜索之前,我还没有看到任何对此的参考。 该应用程序使用XCode 6 Beta,在Swift中链接到Obj-C静态库。它在设备上运行良好。 有任何想法吗?