On Sunday, October 11, 2015 at 4:48:55 PM UTC-4, Kristoffer Carlsson wrote: > > Some unsolicited comments on the code. > > You probably want to change line 118 and 119 to > > sxloc = trunc(Int, mxnx / 2) > szloc = trunc(Int, mxnz / 2) > > so that they really are ints, Without the "Int" it will still be a float. >
Probably it is cleaner to use div, via div(mxnx, 2) or simply mxnx÷2, if you want truncated integer division (similar to / in C).