[kit] Add Array extension to create one from a Float4
This commit is contained in:
parent
5fdd624f21
commit
73a4bec59c
1 changed files with 6 additions and 0 deletions
|
@ -39,3 +39,9 @@ public struct Float4 {
|
|||
w = a
|
||||
}
|
||||
}
|
||||
|
||||
extension Array where Element == Float {
|
||||
init(float4: Float4) {
|
||||
self.init(arrayLiteral: float4.x, float4.y, float4.z, float4.w)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue