htsky

Load and structure a vertically stratified atmosphere
git clone git://git.meso-star.fr/htsky.git
Log | Files | Refs | README | LICENSE

commit ff61a7fc9a7e714bc53b7fe3fcfc0dafaa672bbc
parent bd97fc49de595b07e563939e71e07a2d89ba6771
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Fri, 17 Apr 2020 09:42:17 +0200

Fix a dumb mistake in handling a numerical issue

Diffstat:
Msrc/htsky.c | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/htsky.c b/src/htsky.c @@ -806,9 +806,9 @@ htsky_fetch_raw_property * upper boundaries */ def = sky->htcp_desc.spatial_definition; upp = cloud_desc->upper; - if(ivox[0] == def[0] && eq_eps(pos_cs[0], upp[0], 1.e-6)) ivox[0] = def[0]; - if(ivox[1] == def[1] && eq_eps(pos_cs[1], upp[1], 1.e-6)) ivox[1] = def[1]; - if(ivox[2] == def[2] && eq_eps(pos_cs[2], upp[2], 1.e-6)) ivox[2] = def[2]; + if(ivox[0] == def[0] && eq_eps(pos_cs[0], upp[0], 1.e-6)) ivox[0] = def[0]-1; + if(ivox[1] == def[1] && eq_eps(pos_cs[1], upp[1], 1.e-6)) ivox[1] = def[1]-1; + if(ivox[2] == def[2] && eq_eps(pos_cs[2], upp[2], 1.e-6)) ivox[2] = def[2]-1; if(ivox[0] >= def[0]) FATAL("Out of bound X voxel coordinate\n"); if(ivox[1] >= def[1]) FATAL("Out of bound Y voxel coordinate\n"); if(ivox[2] >= def[2]) FATAL("Out of bound Z voxel coordinate\n");