minus.hpp
Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_MINUS_HPP
2 #define STAN_MATH_PRIM_MAT_FUN_MINUS_HPP
3 
4 namespace stan {
5 namespace math {
6 
7 /**
8  * Returns the negation of the specified scalar or matrix.
9  *
10  * @tparam T Type of subtrahend.
11  * @param x Subtrahend.
12  * @return Negation of subtrahend.
13  */
14 template <typename T>
15 inline T minus(const T& x) {
16  return -x;
17 }
18 
19 } // namespace math
20 } // namespace stan
21 #endif
double T
Definition: Xdiff_gwt.C:5
T minus(const T &x)
Definition: minus.hpp:15