aboutsummaryrefslogtreecommitdiff
path: root/src/render_hkl.c
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2010-04-21 22:35:36 +0200
committerThomas White <taw@bitwiz.org.uk>2010-04-21 22:35:36 +0200
commit14031c5f2b8372c750d00dc3e6047338b346c07d (patch)
tree2dc6843a8df5e917b982c32f386c8a6bb99883d4 /src/render_hkl.c
parente345fec713fa747ed5af07310cd15ae93b04716b (diff)
render_hkl: Fix radians/degrees problem
Diffstat (limited to 'src/render_hkl.c')
-rw-r--r--src/render_hkl.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/render_hkl.c b/src/render_hkl.c
index 78418cc0..0d5fab7e 100644
--- a/src/render_hkl.c
+++ b/src/render_hkl.c
@@ -108,7 +108,8 @@ int main(int argc, char *argv[])
/* Second quarter */
fprintf(fh, "#if ( (clock >= 125) & (clock <= 250) )\n");
- fprintf(fh, "camera { location <0.0, -(2.0+cos((clock-125)*(180/125))), 0.0>"
+ fprintf(fh, "camera { location <0.0,"
+ " -(2.0+cos(radians((clock-125)*(180/125)))), 0.0>"
" sky z direction 1.1*y\n"
" right -x*(image_width/image_height)\n"
" look_at <0.0, 0.0, 0.0> }\n\n");
@@ -124,7 +125,8 @@ int main(int argc, char *argv[])
/* Fourth quarter */
fprintf(fh, "#if ( (clock >= 375) & (clock <= 500) )\n");
- fprintf(fh, "camera { location <0.0, -(2.0+cos((clock-375)*(180/125))+180), 0.0>"
+ fprintf(fh, "camera { location <0.0,"
+ " -(2.0+cos(radians((clock-375)*(180/125)+180))), 0.0>"
" sky z direction 1.1*y\n"
" right -x*(image_width/image_height)\n"
" look_at <0.0, 0.0, 0.0> }\n\n");