Stan  1.3
probability, sampling & optimization
 All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Pages
as_bool.hpp
Go to the documentation of this file.
1 #ifndef __STAN__MATH__FUNCTIONS__AS_BOOL_HPP__
2 #define __STAN__MATH__FUNCTIONS__AS_BOOL_HPP__
3 
4 namespace stan {
5  namespace math {
6 
13  template <typename T>
14  inline int as_bool(const T x) {
15  return x != 0.0;
16  }
17 
25  template <>
26  inline int as_bool<int>(const int x) {
27  return x;
28  }
29 
30 
31  }
32 }
33 
34 #endif

     [ Stan Home Page ] © 2011–2013, Stan Development Team.