Commit b00e73291dbc732a72e6185f4ce61ad5346d7960

Authored by Hacene SI HADJ MOHAND
1 parent 68af7c4e

working

Showing 1 changed file with 3 additions and 3 deletions   Show diff stats
src/Parameters/DataTypeMath.hh
... ... @@ -288,9 +288,9 @@ Type magnitude_(std::vector<Type> a) {
288 288  
289 289 template <typename Type1, typename Type2>
290 290 Type1 angle(std::vector<Type1> a, std::vector<Type2> b) {
291   -// if(magnitude_(a) ==0 || magnitude_(b)){
292   -// BOOST_THROW_EXCEPTION(AMDA::AMDA_exception() << AMDA::errno_code(AMDA_OPER_NOT_ALLOWED) << AMDA::ex_msg("Multiply two vector of different size"));
293   -// }
  291 + if(magnitude_(a) ==0 || magnitude_(b) == 0){
  292 + BOOST_THROW_EXCEPTION(AMDA::AMDA_exception() << AMDA::errno_code(AMDA_OPER_NOT_ALLOWED) << AMDA::ex_msg("One of the two vectors is NULL"));
  293 + }
294 294 return std::acos(dot(a,b)/magnitude_(a)/magnitude_(b));
295 295 }
296 296  
... ...