Rosetta
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
 unresizable vector whose size is known at compile time, which may be allocated on the stack, and which indexes from 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