tighten.cpp
// Use of modulos: careful with negative numbers
Use of modulos: careful with negative numbers
Use of modulos : careful with negative numbers
int round_lower(int pos, int pitch){
    int modulo = pos % pitch;
    if(modulo < 0) modulo += pitch; 
    return pos - modulo;
}
int round_lower ( int pos , int pitch ) { int modulo = pos % pitch ; if ( modulo < 0 ) modulo += pitch ; return pos - modulo ; }
Use of modulos: careful with negative numbers
Use of modulos : careful with negative numbers
// Obtain the mathematical modulo result