On 27 November 2011 18:15, Eduard - Gabriel Munteanu eduard.munteanu@linux360.ro wrote:
On Sun, Nov 27, 2011 at 05:25:08PM +0100, Henri Verbeet wrote:
What happens for cases like "60 / 0"? Do we get an exception, or does the function return an error? MSDN for DXGI_RATIONAL says that whole numbers should be represented with a denominator of 1, is something like "120 / 2" valid?
I'm wasn't sure what needed to be done for stuff like 60 / 0, so I thought that should result in division by zero for now. Maybe it should be NaN if we convert to a float, or maybe UINT_MAX for UINT, but the MSDN docs for DXGI_RATIONAL don't say anything about that.
Perhaps an ERR/WARN/FIXME is in order?
As for 120 / 2, I took "should" as a recommendation, rather than a definitive "must".
Possibly. The point of writing the tests is to find out what actually happens.