From: Pierre Racine Date: Mon, 28 Mar 2011 23:10:51 +0000 (+0000) Subject: -Minimal value for float is -FLT_MAX, not FLT_MIN X-Git-Tag: 2.0.0alpha1~1819 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d6fe9d1e8d57e0b4b91eb03b611c9395613981ae;p=postgis -Minimal value for float is -FLT_MAX, not FLT_MIN git-svn-id: http://svn.osgeo.org/postgis/trunk@6983 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/raster/rt_core/rt_api.c b/raster/rt_core/rt_api.c index 070c2db75..44bf45a6e 100644 --- a/raster/rt_core/rt_api.c +++ b/raster/rt_core/rt_api.c @@ -122,7 +122,7 @@ rt_util_clamp_to_32BUI(double value) { float rt_util_clamp_to_32F(double value) { - return (float)fmin(fmax((value), FLT_MIN), FLT_MAX); + return (float)fmin(fmax((value), -FLT_MAX), FLT_MAX); } /*- rt_context -------------------------------------------------------*/