if it is in c++ you would do something like
int dividend;//given by the user somehow
int divisor;//given by the user somehow
int quotient = dividend/divisor;//performs integer division you'll get the right number
int remainder = dividend%divisor;//Modulus operator, gives you the remainder
I am making the physics engine for a personal project, and one of the more important parts is that the collisions are detected and respond as accurately as possible. right now I'm in the preliminary phases of designing this, so I'm sticking to basic shapes, axis aligned boxes, axis aligned...