diff options
Diffstat (limited to 'boost/math/distributions/uniform.hpp')
-rw-r--r-- | boost/math/distributions/uniform.hpp | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/boost/math/distributions/uniform.hpp b/boost/math/distributions/uniform.hpp index a20597a66a..856c144e36 100644 --- a/boost/math/distributions/uniform.hpp +++ b/boost/math/distributions/uniform.hpp @@ -269,15 +269,18 @@ namespace boost{ namespace math return result; } if(false == detail::check_probability("boost::math::quantile(const uniform_distribution<%1%>&, %1%)", q, &result, Policy())) - if(q == 0) - { - return lower; - } - if(q == 1) - { - return upper; - } - return -q * (upper - lower) + upper; + { + return result; + } + if(q == 0) + { + return upper; + } + if(q == 1) + { + return lower; + } + return -q * (upper - lower) + upper; } // RealType quantile(const complemented2_type<uniform_distribution<RealType, Policy>, RealType>& c) template <class RealType, class Policy> |