scripts
This commit is contained in:
@@ -0,0 +1,82 @@
|
||||
using System;
|
||||
|
||||
namespace System.Globalization
|
||||
{
|
||||
// Token: 0x0200016A RID: 362
|
||||
internal class CCMath
|
||||
{
|
||||
// Token: 0x060011B6 RID: 4534 RVA: 0x00046118 File Offset: 0x00044318
|
||||
public static double round(double x)
|
||||
{
|
||||
return Math.Floor(x + 0.5);
|
||||
}
|
||||
|
||||
// Token: 0x060011B7 RID: 4535 RVA: 0x0004612C File Offset: 0x0004432C
|
||||
public static double mod(double x, double y)
|
||||
{
|
||||
return x - y * Math.Floor(x / y);
|
||||
}
|
||||
|
||||
// Token: 0x060011B8 RID: 4536 RVA: 0x0004613C File Offset: 0x0004433C
|
||||
public static int div(int x, int y)
|
||||
{
|
||||
return (int)Math.Floor((double)x / (double)y);
|
||||
}
|
||||
|
||||
// Token: 0x060011B9 RID: 4537 RVA: 0x0004614C File Offset: 0x0004434C
|
||||
public static int mod(int x, int y)
|
||||
{
|
||||
return x - y * CCMath.div(x, y);
|
||||
}
|
||||
|
||||
// Token: 0x060011BA RID: 4538 RVA: 0x0004615C File Offset: 0x0004435C
|
||||
public static int div_mod(out int remainder, int x, int y)
|
||||
{
|
||||
int num = CCMath.div(x, y);
|
||||
remainder = x - y * num;
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x060011BB RID: 4539 RVA: 0x0004617C File Offset: 0x0004437C
|
||||
public static int signum(double x)
|
||||
{
|
||||
if (x < 0.0)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
if (x == 0.0)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Token: 0x060011BC RID: 4540 RVA: 0x000461A4 File Offset: 0x000443A4
|
||||
public static int signum(int x)
|
||||
{
|
||||
if (x < 0)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
if (x == 0)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Token: 0x060011BD RID: 4541 RVA: 0x000461B8 File Offset: 0x000443B8
|
||||
public static double amod(double x, double y)
|
||||
{
|
||||
double num = CCMath.mod(x, y);
|
||||
return (num != 0.0) ? num : y;
|
||||
}
|
||||
|
||||
// Token: 0x060011BE RID: 4542 RVA: 0x000461E4 File Offset: 0x000443E4
|
||||
public static int amod(int x, int y)
|
||||
{
|
||||
int num = CCMath.mod(x, y);
|
||||
return (num != 0) ? num : y;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user