commit b821909b47cb29c4b68c1f01d5907fde768b5e38
parent 52a098d5d86ffd5c9fa6864ff30979f2c205d152
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Wed, 3 Jun 2020 14:27:06 +0200
Relax the constraints on the camera field of view
The fov can now lie in ]0, 180[ degrees
Diffstat:
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/htrdr_args.c b/src/htrdr_args.c
@@ -138,7 +138,7 @@ parse_fov(const char* str, double* out_fov)
fprintf(stderr, "Invalid field of view `%s'.\n", str);
return RES_BAD_ARG;
}
- if(fov < 30 || fov > 120) {
+ if(fov <= 0 || fov >= 180) {
fprintf(stderr, "The field of view %g is not in [30, 120].\n", fov);
return RES_BAD_ARG;
}
diff --git a/src/htrdr_camera.c b/src/htrdr_camera.c
@@ -73,7 +73,7 @@ htrdr_camera_create
ref_init(&cam->ref);
cam->htrdr = htrdr;
- if(fov <= 0) {
+ if(fov <= 0 || fov >= PI) {
htrdr_log_err(htrdr, "invalid horizontal camera field of view `%g'\n", fov);
res = RES_BAD_ARG;
goto error;