openMSX
Public Attributes | List of all members
Math::QuotientRemainder Struct Reference

Divide one integer by another, rounding towards minus infinity. More...

#include <Math.hh>

Public Attributes

int quotient
 
int remainder
 

Detailed Description

Divide one integer by another, rounding towards minus infinity.

The normal C/C++ division rounds towards zero. Based on this article: http://www.microhowto.info/howto/round_towards_minus_infinity_when_dividing_integers_in_c_or_c++.html

Definition at line 184 of file Math.hh.

Member Data Documentation

◆ quotient

int Math::QuotientRemainder::quotient

Definition at line 185 of file Math.hh.

Referenced by Math::div_floor().

◆ remainder

int Math::QuotientRemainder::remainder

Definition at line 186 of file Math.hh.

Referenced by Math::mod_floor().


The documentation for this struct was generated from the following file: