Rosetta  2017.18
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Namespaces | Functions
modulo.hh File Reference

calculates modulo for integer, since C++ '' operator has weird behavior for negative numbers. More...

#include <platform/types.hh>
#include <stdlib.h>

Namespaces

 utility
 comment 0
 

Functions

platform::Size utility::modulo (int const &a, int const &b)
 modulo of an input integer a (can be negative) with respect to unsigned integer b More...
 

Detailed Description

calculates modulo for integer, since C++ '' operator has weird behavior for negative numbers.

Author
Rhiju Das