【发布时间】:2017-06-07 15:56:34
【问题描述】:
尝试在 Xcode 9 中编译我的项目时,我收到从 float3 到 int3 的转换错误。以下行现在无法编译:
var max : int3 = vector_int(bounds.maxBounds * float3(1.0/8.0) + float3(1.0))
出现错误:
Use of unresolved identifier 'vector_int'
所以旧的转换函数vector_int 已经消失了。 “修复它”的建议也不起作用。
var max : int3 = vector_int3(bounds.maxBounds * float3(1.0/8.0) + float3(1.0))
产量:
Cannot invoke initializer for type 'vector_int3' with an argument list of type '(float3)'
我可以编写自己的小转换函数,但肯定有内置的方法可以做到这一点,不是吗?
【问题讨论】:
标签: swift xcode simd xcode9-beta