/**
 *return bool if value of v i inside interval (ref-offset;ref+offset)
 */

template <class T> bool similar_to(T v, T ref, T offset){
  bool res=false;
  if( (v >= ref - offset) && (v <= ref + offset) ){
    res=!res;
  }
  return res;
}
