Xcode 9: 无法将 float3 转换为 int3

Xcode 9: can't convert float3 to int3

在 Xcode 9 中尝试编译我的项目时,我收到从 float3int3 的转换错误。以下行现在无法编译:

var max : int3 = vector_int(bounds.maxBounds * float3(1.0/8.0) + float3(1.0))

出现错误:

Use of unresolved identifier 'vector_int'

所以旧的转换函数 vector_int 已经消失了。 "fix it" 建议也不行。

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)'

我可以编写自己的小转换函数,但肯定有一种内置方法可以做到这一点,不是吗?

vector_int 已替换为 simd_int:

var max : int3 = simd_int(bounds.maxBounds * float3(1.0/8.0) + float3(1.0))