| Stan Math Library 2.6.3 probability, sampling & optimization

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros
modulus.hpp
Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_FUN_MODULUS_HPP
2 #define STAN_MATH_PRIM_SCAL_FUN_MODULUS_HPP
3
4 #include <cstddef>
5 #include <cstdlib>
6
7 namespace stan {
8 namespace math {
9
10 inline int modulus(const int x, const int y) {
11 return std::div(x, y).rem;
12 }
13
14 }
15 }
16
17 #endif
stan::math::modulus
int modulus(const int x, const int y)
Definition: modulus.hpp:10

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