Fixed compilation error: Math.DivRem() doesn't exist in the XNA Framework for XBox 360

git-svn-id: file:///srv/devel/repo-conversion/nusu@198 d2e56fa2-650e-0410-a79f-9358c0239efd
This commit is contained in:
Markus Ewald 2010-05-16 09:45:21 +00:00
parent bbd0849d43
commit d8d7af174a

View File

@ -291,8 +291,13 @@ namespace Nuclex.Support {
/// <param name="builder">String builder the number will be appended to</param>
/// <param name="remaining">Remaining digits that will be recursively processed</param>
private static void recursiveAppend(StringBuilder builder, int remaining) {
#if XBOX
int digit = remaining % 10;
int tenth = remaining / 10;
#else
int digit;
int tenth = Math.DivRem(remaining, 10, out digit);
#endif
if(tenth > 0) {
recursiveAppend(builder, tenth);
@ -305,8 +310,13 @@ namespace Nuclex.Support {
/// <param name="builder">String builder the number will be appended to</param>
/// <param name="remaining">Remaining digits that will be recursively processed</param>
private static void recursiveAppend(StringBuilder builder, long remaining) {
#if XBOX
long digit = remaining % 10;
long tenth = remaining / 10;
#else
long digit;
long tenth = Math.DivRem(remaining, 10, out digit);
#endif
if(tenth > 0) {
recursiveAppend(builder, tenth);