Thanks Steven. It is far more elegant than the trunc function.
Another question is the way that I use to produce image/bitmap using Gadfly. Is there a more efficient way to produce those bitmaps and to display them ? 2015-10-12 6:14 GMT+03:00 Steven G. Johnson <[email protected]>: > > > 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). >
