From b00e73291dbc732a72e6185f4ce61ad5346d7960 Mon Sep 17 00:00:00 2001 From: Hacene SI HADJ MOHAND Date: Mon, 24 Feb 2020 11:37:34 +0100 Subject: [PATCH] working --- src/Parameters/DataTypeMath.hh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Parameters/DataTypeMath.hh b/src/Parameters/DataTypeMath.hh index 4cfb402..e8cb892 100644 --- a/src/Parameters/DataTypeMath.hh +++ b/src/Parameters/DataTypeMath.hh @@ -288,9 +288,9 @@ Type magnitude_(std::vector a) { template Type1 angle(std::vector a, std::vector b) { -// if(magnitude_(a) ==0 || magnitude_(b)){ -// BOOST_THROW_EXCEPTION(AMDA::AMDA_exception() << AMDA::errno_code(AMDA_OPER_NOT_ALLOWED) << AMDA::ex_msg("Multiply two vector of different size")); -// } + if(magnitude_(a) ==0 || magnitude_(b) == 0){ + BOOST_THROW_EXCEPTION(AMDA::AMDA_exception() << AMDA::errno_code(AMDA_OPER_NOT_ALLOWED) << AMDA::ex_msg("One of the two vectors is NULL")); + } return std::acos(dot(a,b)/magnitude_(a)/magnitude_(b)); } -- libgit2 0.21.2