diff options
author | Thomas White <taw@physics.org> | 2010-04-22 18:25:37 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2010-04-22 18:25:37 +0200 |
commit | 8c788132f5eb8ca35dafe229a3ad9c3739c90c89 (patch) | |
tree | 7c3c37159a4d01f0dc6bbd1f24ff19c01ddf49b0 | |
parent | 265d2a112856f1619ed643c1b018dae236c91839 (diff) |
render_hkl: Fix -j n > 1
-rw-r--r-- | src/render_hkl.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/render_hkl.c b/src/render_hkl.c index 87242b54..984db40d 100644 --- a/src/render_hkl.c +++ b/src/render_hkl.c @@ -321,14 +321,14 @@ int main(int argc, char *argv[]) char minf[256]; char maxf[256]; - int nf, xf, nsec; + float nf, xf, nsec; - nsec = 500 / nproc; - nf = nsec * i; - xf = (nsec * i + nsec)-1; + nsec = 500.0 / (float)nproc; + nf = nsec * (float)i; + xf = (nsec * (float)i + nsec) - 1.0; - snprintf(minf, 255, "+SF%i", nf); - snprintf(maxf, 255, "+EF%i", xf); + snprintf(minf, 255, "+SF%i", (int)nf); + snprintf(maxf, 255, "+EF%i", (int)xf); /* Forked successfully, child process */ execlp("povray", "", "+W1024", "+H768", |