A solution which worked very well is:
var vertexArray = Array<Float>(repeating: 0.0, count: <# of elements>)
I suppose that Swift is not used very much for numerical computation - this problem does not exist with other languages like Fortran of flavors of C. The few hits when I searched either thought it was not possible to do this or gave extremely complicated solutions.
Topic:
Programming Languages
SubTopic:
Swift
Tags: