I have the following for loop in Objective C code and am trying to transfer it to Swift.
double lastAx[4],lastAy[4],lastAz[4];
for (int i = 0; i < 4; ++i){
lastAx[i] = lastAy[i] = lastAz[i] = 0;
}
My Code so far gives me the error: Type Double has no subscript members
var lastAx:Double = 4
var lastAy:Double = 4
var lastAz:Double = 4
for i: Int32 in 0 ..< 4 {
lastAx[i] = lastAy[i] = lastAz[i] = 0
}
What am I missing? Help is very appreciated.