Files
Dec2017-Script-Dump/mscorlib/System/Math.cs
T
2026-06-04 11:42:34 +02:00

953 lines
55 KiB
C#

using System;
using System.Runtime.CompilerServices;
using System.Runtime.ConstrainedExecution;
namespace System
{
/// <summary>Provides constants and static methods for trigonometric, logarithmic, and other common mathematical functions.</summary>
/// <filterpriority>1</filterpriority>
// Token: 0x02000682 RID: 1666
public static class Math
{
/// <summary>Returns the absolute value of a <see cref="T:System.Decimal" /> number.</summary>
/// <returns>A <see cref="T:System.Decimal" />, x, such that 0 ≤ x ≤<see cref="F:System.Decimal.MaxValue" />.</returns>
/// <param name="value">A number that is greater than or equal to <see cref="F:System.Decimal.MinValue" />, but less than or equal to <see cref="F:System.Decimal.MaxValue" />. </param>
/// <filterpriority>1</filterpriority>
// Token: 0x06003EFC RID: 16124 RVA: 0x000D542C File Offset: 0x000D362C
public static decimal Abs(decimal value)
{
return (!(value < 0m)) ? value : (-value);
}
/// <summary>Returns the absolute value of a double-precision floating-point number.</summary>
/// <returns>A double-precision floating-point number, x, such that 0 ≤ x ≤<see cref="F:System.Double.MaxValue" />.</returns>
/// <param name="value">A number that is greater than or equal to <see cref="F:System.Double.MinValue" />, but less than or equal to <see cref="F:System.Double.MaxValue" />.</param>
/// <filterpriority>1</filterpriority>
// Token: 0x06003EFD RID: 16125 RVA: 0x000D544C File Offset: 0x000D364C
public static double Abs(double value)
{
return (value >= 0.0) ? value : (-value);
}
/// <summary>Returns the absolute value of a single-precision floating-point number.</summary>
/// <returns>A single-precision floating-point number, x, such that 0 ≤ x ≤<see cref="F:System.Single.MaxValue" />.</returns>
/// <param name="value">A number that is greater than or equal to <see cref="F:System.Single.MinValue" />, but less than or equal to <see cref="F:System.Single.MaxValue" />.</param>
/// <filterpriority>1</filterpriority>
// Token: 0x06003EFE RID: 16126 RVA: 0x000D5468 File Offset: 0x000D3668
public static float Abs(float value)
{
return (value >= 0f) ? value : (-value);
}
/// <summary>Returns the absolute value of a 32-bit signed integer.</summary>
/// <returns>A 32-bit signed integer, x, such that 0 ≤ x ≤<see cref="F:System.Int32.MaxValue" />.</returns>
/// <param name="value">A number that is greater than <see cref="F:System.Int32.MinValue" />, but less than or equal to <see cref="F:System.Int32.MaxValue" />.</param>
/// <exception cref="T:System.OverflowException">
/// <paramref name="value" /> equals <see cref="F:System.Int32.MinValue" />. </exception>
/// <filterpriority>1</filterpriority>
// Token: 0x06003EFF RID: 16127 RVA: 0x000D5480 File Offset: 0x000D3680
public static int Abs(int value)
{
if (value == -2147483648)
{
throw new OverflowException(Locale.GetText("Value is too small."));
}
return (value >= 0) ? value : (-value);
}
/// <summary>Returns the absolute value of a 64-bit signed integer.</summary>
/// <returns>A 64-bit signed integer, x, such that 0 ≤ x ≤<see cref="F:System.Int64.MaxValue" />.</returns>
/// <param name="value">A number that is greater than <see cref="F:System.Int64.MinValue" />, but less than or equal to <see cref="F:System.Int64.MaxValue" />.</param>
/// <exception cref="T:System.OverflowException">
/// <paramref name="value" /> equals <see cref="F:System.Int64.MinValue" />. </exception>
/// <filterpriority>1</filterpriority>
// Token: 0x06003F00 RID: 16128 RVA: 0x000D54B8 File Offset: 0x000D36B8
public static long Abs(long value)
{
if (value == -9223372036854775808L)
{
throw new OverflowException(Locale.GetText("Value is too small."));
}
return (value >= 0L) ? value : (-value);
}
/// <summary>Returns the absolute value of an 8-bit signed integer.</summary>
/// <returns>An 8-bit signed integer, x, such that 0 ≤ x ≤<see cref="F:System.SByte.MaxValue" />.</returns>
/// <param name="value">A number that is greater than <see cref="F:System.SByte.MinValue" />, but less than or equal to <see cref="F:System.SByte.MaxValue" />.</param>
/// <exception cref="T:System.OverflowException">
/// <paramref name="value" /> equals <see cref="F:System.SByte.MinValue" />. </exception>
/// <filterpriority>1</filterpriority>
// Token: 0x06003F01 RID: 16129 RVA: 0x000D54EC File Offset: 0x000D36EC
[CLSCompliant(false)]
public static sbyte Abs(sbyte value)
{
if ((int)value == -128)
{
throw new OverflowException(Locale.GetText("Value is too small."));
}
return (sbyte)(((int)value >= 0) ? ((int)value) : (-(sbyte)((int)value)));
}
/// <summary>Returns the absolute value of a 16-bit signed integer.</summary>
/// <returns>A 16-bit signed integer, x, such that 0 ≤ x ≤<see cref="F:System.Int16.MaxValue" />.</returns>
/// <param name="value">A number that is greater than <see cref="F:System.Int16.MinValue" />, but less than or equal to <see cref="F:System.Int16.MaxValue" />.</param>
/// <exception cref="T:System.OverflowException">
/// <paramref name="value" /> equals <see cref="F:System.Int16.MinValue" />. </exception>
/// <filterpriority>1</filterpriority>
// Token: 0x06003F02 RID: 16130 RVA: 0x000D5528 File Offset: 0x000D3728
public static short Abs(short value)
{
if (value == -32768)
{
throw new OverflowException(Locale.GetText("Value is too small."));
}
return (value >= 0) ? value : (-value);
}
/// <summary>Returns the smallest integral value that is greater than or equal to the specified decimal number.</summary>
/// <returns>The smallest integer that is greater than or equal to <paramref name="d" />. Note that the method returns a <see cref="T:System.Decimal" /> type instead of an integral type.</returns>
/// <param name="d">A decimal number. </param>
/// <filterpriority>1</filterpriority>
// Token: 0x06003F03 RID: 16131 RVA: 0x000D5558 File Offset: 0x000D3758
public static decimal Ceiling(decimal d)
{
decimal num = Math.Floor(d);
if (num != d)
{
num += 1m;
}
return num;
}
/// <summary>Returns the smallest integral value that is greater than or equal to the specified double-precision floating-point number.</summary>
/// <returns>The smallest integral value that is greater than or equal to <paramref name="a" />. If <paramref name="a" /> is equal to <see cref="F:System.Double.NaN" />, <see cref="F:System.Double.NegativeInfinity" />, or <see cref="F:System.Double.PositiveInfinity" />, that value is returned. Note that this method returns a <see cref="T:System.Double" /> type instead of an integral type.</returns>
/// <param name="a">A double-precision floating-point number. </param>
/// <filterpriority>1</filterpriority>
// Token: 0x06003F04 RID: 16132 RVA: 0x000D5580 File Offset: 0x000D3780
public static double Ceiling(double a)
{
double num = Math.Floor(a);
if (num != a)
{
num += 1.0;
}
return num;
}
/// <summary>Produces the full product of two 32-bit numbers.</summary>
/// <returns>The <see cref="T:System.Int64" /> containing the product of the specified numbers.</returns>
/// <param name="a">The first <see cref="T:System.Int32" /> to multiply. </param>
/// <param name="b">The second <see cref="T:System.Int32" /> to multiply. </param>
/// <filterpriority>1</filterpriority>
// Token: 0x06003F05 RID: 16133 RVA: 0x000D55A8 File Offset: 0x000D37A8
public static long BigMul(int a, int b)
{
return (long)a * (long)b;
}
/// <summary>Calculates the quotient of two 32-bit signed integers and also returns the remainder in an output parameter.</summary>
/// <returns>The quotient of the specified numbers.</returns>
/// <param name="a">The dividend. </param>
/// <param name="b">The divisor. </param>
/// <param name="result">The remainder. </param>
/// <exception cref="T:System.DivideByZeroException">
/// <paramref name="b" /> is zero.</exception>
/// <filterpriority>1</filterpriority>
// Token: 0x06003F06 RID: 16134 RVA: 0x000D55B0 File Offset: 0x000D37B0
public static int DivRem(int a, int b, out int result)
{
result = a % b;
return a / b;
}
/// <summary>Calculates the quotient of two 64-bit signed integers and also returns the remainder in an output parameter.</summary>
/// <returns>The quotient of the specified numbers.</returns>
/// <param name="a">The dividend. </param>
/// <param name="b">The divisor. </param>
/// <param name="result">The remainder. </param>
/// <exception cref="T:System.DivideByZeroException">
/// <paramref name="b" /> is zero.</exception>
/// <filterpriority>1</filterpriority>
// Token: 0x06003F07 RID: 16135 RVA: 0x000D55BC File Offset: 0x000D37BC
public static long DivRem(long a, long b, out long result)
{
result = a % b;
return a / b;
}
/// <summary>Returns the largest integer less than or equal to the specified double-precision floating-point number.</summary>
/// <returns>The largest integer less than or equal to <paramref name="d" />. If <paramref name="d" /> is equal to <see cref="F:System.Double.NaN" />, <see cref="F:System.Double.NegativeInfinity" />, or <see cref="F:System.Double.PositiveInfinity" />, that value is returned.</returns>
/// <param name="d">A double-precision floating-point number. </param>
/// <filterpriority>1</filterpriority>
// Token: 0x06003F08 RID: 16136
[MethodImpl(MethodImplOptions.InternalCall)]
public static extern double Floor(double d);
/// <summary>Returns the remainder resulting from the division of a specified number by another specified number.</summary>
/// <returns>A number equal to <paramref name="x" /> - (<paramref name="y" /> Q), where Q is the quotient of <paramref name="x" /> / <paramref name="y" /> rounded to the nearest integer (if <paramref name="x" /> / <paramref name="y" /> falls halfway between two integers, the even integer is returned).If <paramref name="x" /> - (<paramref name="y" /> Q) is zero, the value +0 is returned if <paramref name="x" /> is positive, or -0 if <paramref name="x" /> is negative.If <paramref name="y" /> = 0, <see cref="F:System.Double.NaN" /> is returned.</returns>
/// <param name="x">A dividend. </param>
/// <param name="y">A divisor. </param>
/// <filterpriority>1</filterpriority>
// Token: 0x06003F09 RID: 16137 RVA: 0x000D55C8 File Offset: 0x000D37C8
public static double IEEERemainder(double x, double y)
{
if (y == 0.0)
{
return double.NaN;
}
double num = x - y * Math.Round(x / y);
if (num != 0.0)
{
return num;
}
return (x <= 0.0) ? BitConverter.Int64BitsToDouble(long.MinValue) : 0.0;
}
/// <summary>Returns the logarithm of a specified number in a specified base.</summary>
/// <returns>In the following table +Infinity denotes <see cref="F:System.Double.PositiveInfinity" />, -Infinity denotes <see cref="F:System.Double.NegativeInfinity" />, and NaN denotes <see cref="F:System.Double.NaN" />.<paramref name="a" /><paramref name="newBase" />Return Value<paramref name="a" />&gt; 0(0 &lt;<paramref name="newBase" />&lt; 1) -or-(<paramref name="newBase" />&gt; 1)lognewBase(a)<paramref name="a" />&lt; 0(any value)NaN(any value)<paramref name="newBase" />&lt; 0NaN<paramref name="a" /> != 1<paramref name="newBase" /> = 0NaN<paramref name="a" /> != 1<paramref name="newBase" /> = +InfinityNaN<paramref name="a" /> = NaN(any value)NaN(any value)<paramref name="newBase" /> = NaNNaN(any value)<paramref name="newBase" /> = 1NaN<paramref name="a" /> = 00 &lt;<paramref name="newBase" />&lt; 1 +Infinity<paramref name="a" /> = 0<paramref name="newBase" />&gt; 1-Infinity<paramref name="a" /> = +Infinity0 &lt;<paramref name="newBase" />&lt; 1-Infinity<paramref name="a" /> = +Infinity<paramref name="newBase" />&gt; 1+Infinity<paramref name="a" /> = 1<paramref name="newBase" /> = 00<paramref name="a" /> = 1<paramref name="newBase" /> = +Infinity0</returns>
/// <param name="a">A number whose logarithm is to be found. </param>
/// <param name="newBase">The base of the logarithm. </param>
/// <filterpriority>1</filterpriority>
// Token: 0x06003F0A RID: 16138 RVA: 0x000D5638 File Offset: 0x000D3838
public static double Log(double a, double newBase)
{
double num = Math.Log(a) / Math.Log(newBase);
return (num != 0.0) ? num : 0.0;
}
/// <summary>Returns the larger of two 8-bit unsigned integers.</summary>
/// <returns>Parameter <paramref name="val1" /> or <paramref name="val2" />, whichever is larger.</returns>
/// <param name="val1">The first of two 8-bit unsigned integers to compare. </param>
/// <param name="val2">The second of two 8-bit unsigned integers to compare. </param>
/// <filterpriority>1</filterpriority>
// Token: 0x06003F0B RID: 16139 RVA: 0x000D5674 File Offset: 0x000D3874
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
public static byte Max(byte val1, byte val2)
{
return (val1 <= val2) ? val2 : val1;
}
/// <summary>Returns the larger of two decimal numbers.</summary>
/// <returns>Parameter <paramref name="val1" /> or <paramref name="val2" />, whichever is larger.</returns>
/// <param name="val1">The first of two <see cref="T:System.Decimal" /> numbers to compare. </param>
/// <param name="val2">The second of two <see cref="T:System.Decimal" /> numbers to compare. </param>
/// <filterpriority>1</filterpriority>
// Token: 0x06003F0C RID: 16140 RVA: 0x000D5684 File Offset: 0x000D3884
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
public static decimal Max(decimal val1, decimal val2)
{
return (!(val1 > val2)) ? val2 : val1;
}
/// <summary>Returns the larger of two double-precision floating-point numbers.</summary>
/// <returns>Parameter <paramref name="val1" /> or <paramref name="val2" />, whichever is larger. If <paramref name="val1" />, <paramref name="val2" />, or both <paramref name="val1" /> and <paramref name="val2" /> are equal to <see cref="F:System.Double.NaN" />, <see cref="F:System.Double.NaN" /> is returned.</returns>
/// <param name="val1">The first of two double-precision floating-point numbers to compare. </param>
/// <param name="val2">The second of two double-precision floating-point numbers to compare. </param>
/// <filterpriority>1</filterpriority>
// Token: 0x06003F0D RID: 16141 RVA: 0x000D569C File Offset: 0x000D389C
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
public static double Max(double val1, double val2)
{
if (double.IsNaN(val1) || double.IsNaN(val2))
{
return double.NaN;
}
return (val1 <= val2) ? val2 : val1;
}
/// <summary>Returns the larger of two single-precision floating-point numbers.</summary>
/// <returns>Parameter <paramref name="val1" /> or <paramref name="val2" />, whichever is larger. If <paramref name="val1" />, or <paramref name="val2" />, or both <paramref name="val1" /> and <paramref name="val2" /> are equal to <see cref="F:System.Single.NaN" />, <see cref="F:System.Single.NaN" /> is returned.</returns>
/// <param name="val1">The first of two single-precision floating-point numbers to compare. </param>
/// <param name="val2">The second of two single-precision floating-point numbers to compare. </param>
/// <filterpriority>1</filterpriority>
// Token: 0x06003F0E RID: 16142 RVA: 0x000D56D8 File Offset: 0x000D38D8
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
public static float Max(float val1, float val2)
{
if (float.IsNaN(val1) || float.IsNaN(val2))
{
return float.NaN;
}
return (val1 <= val2) ? val2 : val1;
}
/// <summary>Returns the larger of two 32-bit signed integers.</summary>
/// <returns>Parameter <paramref name="val1" /> or <paramref name="val2" />, whichever is larger.</returns>
/// <param name="val1">The first of two 32-bit signed integers to compare. </param>
/// <param name="val2">The second of two 32-bit signed integers to compare. </param>
/// <filterpriority>1</filterpriority>
// Token: 0x06003F0F RID: 16143 RVA: 0x000D5710 File Offset: 0x000D3910
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
public static int Max(int val1, int val2)
{
return (val1 <= val2) ? val2 : val1;
}
/// <summary>Returns the larger of two 64-bit signed integers.</summary>
/// <returns>Parameter <paramref name="val1" /> or <paramref name="val2" />, whichever is larger.</returns>
/// <param name="val1">The first of two 64-bit signed integers to compare. </param>
/// <param name="val2">The second of two 64-bit signed integers to compare. </param>
/// <filterpriority>1</filterpriority>
// Token: 0x06003F10 RID: 16144 RVA: 0x000D5720 File Offset: 0x000D3920
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
public static long Max(long val1, long val2)
{
return (val1 <= val2) ? val2 : val1;
}
/// <summary>Returns the larger of two 8-bit signed integers.</summary>
/// <returns>Parameter <paramref name="val1" /> or <paramref name="val2" />, whichever is larger.</returns>
/// <param name="val1">The first of two 8-bit signed integers to compare. </param>
/// <param name="val2">The second of two 8-bit signed integers to compare. </param>
/// <filterpriority>1</filterpriority>
// Token: 0x06003F11 RID: 16145 RVA: 0x000D5730 File Offset: 0x000D3930
[CLSCompliant(false)]
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
public static sbyte Max(sbyte val1, sbyte val2)
{
return ((int)val1 <= (int)val2) ? val2 : val1;
}
/// <summary>Returns the larger of two 16-bit signed integers.</summary>
/// <returns>Parameter <paramref name="val1" /> or <paramref name="val2" />, whichever is larger.</returns>
/// <param name="val1">The first of two 16-bit signed integers to compare. </param>
/// <param name="val2">The second of two 16-bit signed integers to compare. </param>
/// <filterpriority>1</filterpriority>
// Token: 0x06003F12 RID: 16146 RVA: 0x000D5744 File Offset: 0x000D3944
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
public static short Max(short val1, short val2)
{
return (val1 <= val2) ? val2 : val1;
}
/// <summary>Returns the larger of two 32-bit unsigned integers.</summary>
/// <returns>Parameter <paramref name="val1" /> or <paramref name="val2" />, whichever is larger.</returns>
/// <param name="val1">The first of two 32-bit unsigned integers to compare. </param>
/// <param name="val2">The second of two 32-bit unsigned integers to compare. </param>
/// <filterpriority>1</filterpriority>
// Token: 0x06003F13 RID: 16147 RVA: 0x000D5754 File Offset: 0x000D3954
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
[CLSCompliant(false)]
public static uint Max(uint val1, uint val2)
{
return (val1 <= val2) ? val2 : val1;
}
/// <summary>Returns the larger of two 64-bit unsigned integers.</summary>
/// <returns>Parameter <paramref name="val1" /> or <paramref name="val2" />, whichever is larger.</returns>
/// <param name="val1">The first of two 64-bit unsigned integers to compare. </param>
/// <param name="val2">The second of two 64-bit unsigned integers to compare. </param>
/// <filterpriority>1</filterpriority>
// Token: 0x06003F14 RID: 16148 RVA: 0x000D5764 File Offset: 0x000D3964
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
[CLSCompliant(false)]
public static ulong Max(ulong val1, ulong val2)
{
return (val1 <= val2) ? val2 : val1;
}
/// <summary>Returns the larger of two 16-bit unsigned integers.</summary>
/// <returns>Parameter <paramref name="val1" /> or <paramref name="val2" />, whichever is larger.</returns>
/// <param name="val1">The first of two 16-bit unsigned integers to compare. </param>
/// <param name="val2">The second of two 16-bit unsigned integers to compare. </param>
/// <filterpriority>1</filterpriority>
// Token: 0x06003F15 RID: 16149 RVA: 0x000D5774 File Offset: 0x000D3974
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
[CLSCompliant(false)]
public static ushort Max(ushort val1, ushort val2)
{
return (val1 <= val2) ? val2 : val1;
}
/// <summary>Returns the smaller of two 8-bit unsigned integers.</summary>
/// <returns>Parameter <paramref name="val1" /> or <paramref name="val2" />, whichever is smaller.</returns>
/// <param name="val1">The first of two 8-bit unsigned integers to compare. </param>
/// <param name="val2">The second of two 8-bit unsigned integers to compare. </param>
/// <filterpriority>1</filterpriority>
// Token: 0x06003F16 RID: 16150 RVA: 0x000D5784 File Offset: 0x000D3984
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
public static byte Min(byte val1, byte val2)
{
return (val1 >= val2) ? val2 : val1;
}
/// <summary>Returns the smaller of two decimal numbers.</summary>
/// <returns>Parameter <paramref name="val1" /> or <paramref name="val2" />, whichever is smaller.</returns>
/// <param name="val1">The first of two <see cref="T:System.Decimal" /> numbers to compare. </param>
/// <param name="val2">The second of two <see cref="T:System.Decimal" /> numbers to compare. </param>
/// <filterpriority>1</filterpriority>
// Token: 0x06003F17 RID: 16151 RVA: 0x000D5794 File Offset: 0x000D3994
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
public static decimal Min(decimal val1, decimal val2)
{
return (!(val1 < val2)) ? val2 : val1;
}
/// <summary>Returns the smaller of two double-precision floating-point numbers.</summary>
/// <returns>Parameter <paramref name="val1" /> or <paramref name="val2" />, whichever is smaller. If <paramref name="val1" />, <paramref name="val2" />, or both <paramref name="val1" /> and <paramref name="val2" /> are equal to <see cref="F:System.Double.NaN" />, <see cref="F:System.Double.NaN" /> is returned.</returns>
/// <param name="val1">The first of two double-precision floating-point numbers to compare. </param>
/// <param name="val2">The second of two double-precision floating-point numbers to compare. </param>
/// <filterpriority>1</filterpriority>
// Token: 0x06003F18 RID: 16152 RVA: 0x000D57AC File Offset: 0x000D39AC
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
public static double Min(double val1, double val2)
{
if (double.IsNaN(val1) || double.IsNaN(val2))
{
return double.NaN;
}
return (val1 >= val2) ? val2 : val1;
}
/// <summary>Returns the smaller of two single-precision floating-point numbers.</summary>
/// <returns>Parameter <paramref name="val1" /> or <paramref name="val2" />, whichever is smaller. If <paramref name="val1" />, <paramref name="val2" />, or both <paramref name="val1" /> and <paramref name="val2" /> are equal to <see cref="F:System.Single.NaN" />, <see cref="F:System.Single.NaN" /> is returned.</returns>
/// <param name="val1">The first of two single-precision floating-point numbers to compare. </param>
/// <param name="val2">The second of two single-precision floating-point numbers to compare. </param>
/// <filterpriority>1</filterpriority>
// Token: 0x06003F19 RID: 16153 RVA: 0x000D57E8 File Offset: 0x000D39E8
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
public static float Min(float val1, float val2)
{
if (float.IsNaN(val1) || float.IsNaN(val2))
{
return float.NaN;
}
return (val1 >= val2) ? val2 : val1;
}
/// <summary>Returns the smaller of two 32-bit signed integers.</summary>
/// <returns>Parameter <paramref name="val1" /> or <paramref name="val2" />, whichever is smaller.</returns>
/// <param name="val1">The first of two 32-bit signed integers to compare. </param>
/// <param name="val2">The second of two 32-bit signed integers to compare. </param>
/// <filterpriority>1</filterpriority>
// Token: 0x06003F1A RID: 16154 RVA: 0x000D5820 File Offset: 0x000D3A20
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
public static int Min(int val1, int val2)
{
return (val1 >= val2) ? val2 : val1;
}
/// <summary>Returns the smaller of two 64-bit signed integers.</summary>
/// <returns>Parameter <paramref name="val1" /> or <paramref name="val2" />, whichever is smaller.</returns>
/// <param name="val1">The first of two 64-bit signed integers to compare. </param>
/// <param name="val2">The second of two 64-bit signed integers to compare. </param>
/// <filterpriority>1</filterpriority>
// Token: 0x06003F1B RID: 16155 RVA: 0x000D5830 File Offset: 0x000D3A30
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
public static long Min(long val1, long val2)
{
return (val1 >= val2) ? val2 : val1;
}
/// <summary>Returns the smaller of two 8-bit signed integers.</summary>
/// <returns>Parameter <paramref name="val1" /> or <paramref name="val2" />, whichever is smaller.</returns>
/// <param name="val1">The first of two 8-bit signed integers to compare. </param>
/// <param name="val2">The second of two 8-bit signed integers to compare. </param>
/// <filterpriority>1</filterpriority>
// Token: 0x06003F1C RID: 16156 RVA: 0x000D5840 File Offset: 0x000D3A40
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
[CLSCompliant(false)]
public static sbyte Min(sbyte val1, sbyte val2)
{
return ((int)val1 >= (int)val2) ? val2 : val1;
}
/// <summary>Returns the smaller of two 16-bit signed integers.</summary>
/// <returns>Parameter <paramref name="val1" /> or <paramref name="val2" />, whichever is smaller.</returns>
/// <param name="val1">The first of two 16-bit signed integers to compare. </param>
/// <param name="val2">The second of two 16-bit signed integers to compare. </param>
/// <filterpriority>1</filterpriority>
// Token: 0x06003F1D RID: 16157 RVA: 0x000D5854 File Offset: 0x000D3A54
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
public static short Min(short val1, short val2)
{
return (val1 >= val2) ? val2 : val1;
}
/// <summary>Returns the smaller of two 32-bit unsigned integers.</summary>
/// <returns>Parameter <paramref name="val1" /> or <paramref name="val2" />, whichever is smaller.</returns>
/// <param name="val1">The first of two 32-bit unsigned integers to compare. </param>
/// <param name="val2">The second of two 32-bit unsigned integers to compare. </param>
/// <filterpriority>1</filterpriority>
// Token: 0x06003F1E RID: 16158 RVA: 0x000D5864 File Offset: 0x000D3A64
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
[CLSCompliant(false)]
public static uint Min(uint val1, uint val2)
{
return (val1 >= val2) ? val2 : val1;
}
/// <summary>Returns the smaller of two 64-bit unsigned integers.</summary>
/// <returns>Parameter <paramref name="val1" /> or <paramref name="val2" />, whichever is smaller.</returns>
/// <param name="val1">The first of two 64-bit unsigned integers to compare. </param>
/// <param name="val2">The second of two 64-bit unsigned integers to compare. </param>
/// <filterpriority>1</filterpriority>
// Token: 0x06003F1F RID: 16159 RVA: 0x000D5874 File Offset: 0x000D3A74
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
[CLSCompliant(false)]
public static ulong Min(ulong val1, ulong val2)
{
return (val1 >= val2) ? val2 : val1;
}
/// <summary>Returns the smaller of two 16-bit unsigned integers.</summary>
/// <returns>Parameter <paramref name="val1" /> or <paramref name="val2" />, whichever is smaller.</returns>
/// <param name="val1">The first of two 16-bit unsigned integers to compare. </param>
/// <param name="val2">The second of two 16-bit unsigned integers to compare. </param>
/// <filterpriority>1</filterpriority>
// Token: 0x06003F20 RID: 16160 RVA: 0x000D5884 File Offset: 0x000D3A84
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
[CLSCompliant(false)]
public static ushort Min(ushort val1, ushort val2)
{
return (val1 >= val2) ? val2 : val1;
}
/// <summary>Rounds a decimal value to the nearest integral value.</summary>
/// <returns>The integer nearest parameter <paramref name="d" />. If the fractional component of <paramref name="d" /> is halfway between two integers, one of which is even and the other odd, the even number is returned. Note that this method returns a <see cref="T:System.Decimal" /> instead of an integral type.</returns>
/// <param name="d">A decimal number to be rounded. </param>
/// <exception cref="T:System.OverflowException">The result is outside the range of a <see cref="T:System.Decimal" />.</exception>
/// <filterpriority>1</filterpriority>
// Token: 0x06003F21 RID: 16161 RVA: 0x000D5894 File Offset: 0x000D3A94
public static decimal Round(decimal d)
{
decimal num = decimal.Floor(d);
decimal num2 = d - num;
if ((num2 == 0.5m && 2.0m * (num / 2.0m - decimal.Floor(num / 2.0m)) != 0m) || num2 > 0.5m)
{
num += 1m;
}
return num;
}
/// <summary>Rounds a decimal value to a specified number of fractional digits.</summary>
/// <returns>The number nearest to <paramref name="d" /> that contains a number of fractional digits equal to <paramref name="decimals" />. </returns>
/// <param name="d">A decimal number to be rounded. </param>
/// <param name="decimals">The number of decimal places in the return value. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="decimals" /> is less than 0 or greater than 28. </exception>
/// <exception cref="T:System.OverflowException">The result is outside the range of a <see cref="T:System.Decimal" />.</exception>
/// <filterpriority>1</filterpriority>
// Token: 0x06003F22 RID: 16162 RVA: 0x000D5930 File Offset: 0x000D3B30
public static decimal Round(decimal d, int decimals)
{
return decimal.Round(d, decimals);
}
/// <summary>Rounds a decimal value to the nearest integer. A parameter specifies how to round the value if it is midway between two other numbers.</summary>
/// <returns>The integer nearest <paramref name="d" />. If <paramref name="d" /> is halfway between two numbers, one of which is even and the other odd, then <paramref name="mode" /> determines which of the two is returned. </returns>
/// <param name="d">A decimal number to be rounded. </param>
/// <param name="mode">Specification for how to round <paramref name="d" /> if it is midway between two other numbers.</param>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="mode" /> is not a valid value of <see cref="T:System.MidpointRounding" />.</exception>
/// <exception cref="T:System.OverflowException">The result is outside the range of a <see cref="T:System.Decimal" />.</exception>
/// <filterpriority>1</filterpriority>
// Token: 0x06003F23 RID: 16163 RVA: 0x000D593C File Offset: 0x000D3B3C
public static decimal Round(decimal d, MidpointRounding mode)
{
if (mode != MidpointRounding.ToEven && mode != MidpointRounding.AwayFromZero)
{
throw new ArgumentException("The value '" + mode + "' is not valid for this usage of the type MidpointRounding.", "mode");
}
if (mode == MidpointRounding.ToEven)
{
return Math.Round(d);
}
return Math.RoundAwayFromZero(d);
}
// Token: 0x06003F24 RID: 16164 RVA: 0x000D598C File Offset: 0x000D3B8C
private static decimal RoundAwayFromZero(decimal d)
{
decimal num = decimal.Floor(d);
decimal num2 = d - num;
if (num >= 0m && num2 >= 0.5m)
{
num += 1m;
}
else if (num < 0m && num2 > 0.5m)
{
num += 1m;
}
return num;
}
/// <summary>Rounds a decimal value to a specified number of fractional digits. A parameter specifies how to round the value if it is midway between two other numbers.</summary>
/// <returns>The number nearest to <paramref name="d" /> that contains a number of fractional digits equal to <paramref name="decimals" />. If the number of fractional digits in <paramref name="d" /> is less than <paramref name="decimals" />, <paramref name="d" /> is returned unchanged.</returns>
/// <param name="d">A decimal number to be rounded. </param>
/// <param name="decimals">The number of decimal places in the return value. </param>
/// <param name="mode">Specification for how to round <paramref name="d" /> if it is midway between two other numbers.</param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="decimals" /> is less than 0 or greater than 28. </exception>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="mode" /> is not a valid value of <see cref="T:System.MidpointRounding" />.</exception>
/// <exception cref="T:System.OverflowException">The result is outside the range of a <see cref="T:System.Decimal" />.</exception>
/// <filterpriority>1</filterpriority>
// Token: 0x06003F25 RID: 16165 RVA: 0x000D5A08 File Offset: 0x000D3C08
public static decimal Round(decimal d, int decimals, MidpointRounding mode)
{
return decimal.Round(d, decimals, mode);
}
/// <summary>Rounds a double-precision floating-point value to the nearest integral value.</summary>
/// <returns>The integer nearest <paramref name="a" />. If the fractional component of <paramref name="a" /> is halfway between two integers, one of which is even and the other odd, then the even number is returned. Note that this method returns a <see cref="T:System.Double" /> instead of an integral type.</returns>
/// <param name="a">A double-precision floating-point number to be rounded. </param>
/// <filterpriority>1</filterpriority>
// Token: 0x06003F26 RID: 16166
[MethodImpl(MethodImplOptions.InternalCall)]
public static extern double Round(double a);
/// <summary>Rounds a double-precision floating-point value to a specified number of fractional digits.</summary>
/// <returns>The number nearest to <paramref name="value" /> that contains a number of fractional digits equal to <paramref name="digits" />.</returns>
/// <param name="value">A double-precision floating-point number to be rounded. </param>
/// <param name="digits">The number of fractional digits in the return value. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="digits" /> is less than 0 or greater than 15. </exception>
/// <filterpriority>1</filterpriority>
// Token: 0x06003F27 RID: 16167 RVA: 0x000D5A14 File Offset: 0x000D3C14
public static double Round(double value, int digits)
{
if (digits < 0 || digits > 15)
{
throw new ArgumentOutOfRangeException(Locale.GetText("Value is too small or too big."));
}
return Math.Round2(value, digits, false);
}
// Token: 0x06003F28 RID: 16168
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern double Round2(double value, int digits, bool away_from_zero);
/// <summary>Rounds a double-precision floating-point value to the nearest integer. A parameter specifies how to round the value if it is midway between two other numbers.</summary>
/// <returns>The integer nearest <paramref name="value" />. If <paramref name="value" /> is halfway between two integers, one of which is even and the other odd, then <paramref name="mode" /> determines which of the two is returned.</returns>
/// <param name="value">A double-precision floating-point number to be rounded. </param>
/// <param name="mode">Specification for how to round <paramref name="value" /> if it is midway between two other numbers.</param>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="mode" /> is not a valid value of <see cref="T:System.MidpointRounding" />.</exception>
/// <filterpriority>1</filterpriority>
// Token: 0x06003F29 RID: 16169 RVA: 0x000D5A40 File Offset: 0x000D3C40
public static double Round(double value, MidpointRounding mode)
{
if (mode != MidpointRounding.ToEven && mode != MidpointRounding.AwayFromZero)
{
throw new ArgumentException("The value '" + mode + "' is not valid for this usage of the type MidpointRounding.", "mode");
}
if (mode == MidpointRounding.ToEven)
{
return Math.Round(value);
}
if (value > 0.0)
{
return Math.Floor(value + 0.5);
}
return Math.Ceiling(value - 0.5);
}
/// <summary>Rounds a double-precision floating-point value to the specified number of fractional digits. A parameter specifies how to round the value if it is midway between two other numbers.</summary>
/// <returns>The number nearest to <paramref name="value" /> that has a number of fractional digits equal to <paramref name="digits" />. If the number of fractional digits in <paramref name="value" /> is less than <paramref name="digits" />, <paramref name="value" /> is returned unchanged.</returns>
/// <param name="value">A double-precision floating-point number to be rounded. </param>
/// <param name="digits">The number of fractional digits in the return value. </param>
/// <param name="mode">Specification for how to round <paramref name="value" /> if it is midway between two other numbers.</param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="digits" /> is less than 0 or greater than 15. </exception>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="mode" /> is not a valid value of <see cref="T:System.MidpointRounding" />.</exception>
/// <filterpriority>1</filterpriority>
// Token: 0x06003F2A RID: 16170 RVA: 0x000D5AB8 File Offset: 0x000D3CB8
public static double Round(double value, int digits, MidpointRounding mode)
{
if (mode != MidpointRounding.ToEven && mode != MidpointRounding.AwayFromZero)
{
throw new ArgumentException("The value '" + mode + "' is not valid for this usage of the type MidpointRounding.", "mode");
}
if (mode == MidpointRounding.ToEven)
{
return Math.Round(value, digits);
}
return Math.Round2(value, digits, true);
}
/// <summary>Calculates the integral part of a specified double-precision floating-point number. </summary>
/// <returns>The integral part of <paramref name="d" />; that is, the number that remains after any fractional digits have been discarded, or one of the values listed in the following table. <paramref name="d" />Return value<see cref="F:System.Double.NaN" /><see cref="F:System.Double.NaN" /><see cref="F:System.Double.NegativeInfinity" /><see cref="F:System.Double.NegativeInfinity" /><see cref="F:System.Double.PositiveInfinity" /><see cref="F:System.Double.PositiveInfinity" /></returns>
/// <param name="d">A number to truncate.</param>
/// <filterpriority>1</filterpriority>
// Token: 0x06003F2B RID: 16171 RVA: 0x000D5B08 File Offset: 0x000D3D08
public static double Truncate(double d)
{
if (d > 0.0)
{
return Math.Floor(d);
}
if (d < 0.0)
{
return Math.Ceiling(d);
}
return d;
}
/// <summary>Calculates the integral part of a specified decimal number. </summary>
/// <returns>The integral part of <paramref name="d" />; that is, the number that remains after any fractional digits have been discarded.</returns>
/// <param name="d">A number to truncate.</param>
/// <filterpriority>1</filterpriority>
// Token: 0x06003F2C RID: 16172 RVA: 0x000D5B38 File Offset: 0x000D3D38
public static decimal Truncate(decimal d)
{
return decimal.Truncate(d);
}
/// <summary>Returns the largest integer less than or equal to the specified decimal number.</summary>
/// <returns>The largest integer less than or equal to <paramref name="d" />. </returns>
/// <param name="d">A decimal number. </param>
/// <filterpriority>1</filterpriority>
// Token: 0x06003F2D RID: 16173 RVA: 0x000D5B40 File Offset: 0x000D3D40
public static decimal Floor(decimal d)
{
return decimal.Floor(d);
}
/// <summary>Returns a value indicating the sign of a decimal number.</summary>
/// <returns>A number indicating the sign of <paramref name="value" />.Number Description -1 <paramref name="value" /> is less than zero. 0 <paramref name="value" /> is equal to zero. 1 <paramref name="value" /> is greater than zero. </returns>
/// <param name="value">A signed <see cref="T:System.Decimal" /> number. </param>
/// <filterpriority>1</filterpriority>
// Token: 0x06003F2E RID: 16174 RVA: 0x000D5B48 File Offset: 0x000D3D48
public static int Sign(decimal value)
{
if (value > 0m)
{
return 1;
}
return (!(value == 0m)) ? (-1) : 0;
}
/// <summary>Returns a value indicating the sign of a double-precision floating-point number.</summary>
/// <returns>A number indicating the sign of <paramref name="value" />.Number Description -1 <paramref name="value" /> is less than zero. 0 <paramref name="value" /> is equal to zero. 1 <paramref name="value" /> is greater than zero. </returns>
/// <param name="value">A signed number. </param>
/// <exception cref="T:System.ArithmeticException">
/// <paramref name="value" /> is equal to <see cref="F:System.Double.NaN" />. </exception>
/// <filterpriority>1</filterpriority>
// Token: 0x06003F2F RID: 16175 RVA: 0x000D5B78 File Offset: 0x000D3D78
public static int Sign(double value)
{
if (double.IsNaN(value))
{
throw new ArithmeticException("NAN");
}
if (value > 0.0)
{
return 1;
}
return (value != 0.0) ? (-1) : 0;
}
/// <summary>Returns a value indicating the sign of a single-precision floating-point number.</summary>
/// <returns>A number indicating the sign of <paramref name="value" />.Number Description -1 <paramref name="value" /> is less than zero. 0 <paramref name="value" /> is equal to zero. 1 <paramref name="value" /> is greater than zero. </returns>
/// <param name="value">A signed number. </param>
/// <exception cref="T:System.ArithmeticException">
/// <paramref name="value" /> is equal to <see cref="F:System.Single.NaN" />. </exception>
/// <filterpriority>1</filterpriority>
// Token: 0x06003F30 RID: 16176 RVA: 0x000D5BB8 File Offset: 0x000D3DB8
public static int Sign(float value)
{
if (float.IsNaN(value))
{
throw new ArithmeticException("NAN");
}
if (value > 0f)
{
return 1;
}
return (value != 0f) ? (-1) : 0;
}
/// <summary>Returns a value indicating the sign of a 32-bit signed integer.</summary>
/// <returns>A number indicating the sign of <paramref name="value" />.Number Description -1 <paramref name="value" /> is less than zero. 0 <paramref name="value" /> is equal to zero. 1 <paramref name="value" /> is greater than zero. </returns>
/// <param name="value">A signed number. </param>
/// <filterpriority>1</filterpriority>
// Token: 0x06003F31 RID: 16177 RVA: 0x000D5BF0 File Offset: 0x000D3DF0
public static int Sign(int value)
{
if (value > 0)
{
return 1;
}
return (value != 0) ? (-1) : 0;
}
/// <summary>Returns a value indicating the sign of a 64-bit signed integer.</summary>
/// <returns>A number indicating the sign of <paramref name="value" />.Number Description -1 <paramref name="value" /> is less than zero. 0 <paramref name="value" /> is equal to zero. 1 <paramref name="value" /> is greater than zero. </returns>
/// <param name="value">A signed number. </param>
/// <filterpriority>1</filterpriority>
// Token: 0x06003F32 RID: 16178 RVA: 0x000D5C08 File Offset: 0x000D3E08
public static int Sign(long value)
{
if (value > 0L)
{
return 1;
}
return (value != 0L) ? (-1) : 0;
}
/// <summary>Returns a value indicating the sign of an 8-bit signed integer.</summary>
/// <returns>A number indicating the sign of <paramref name="value" />.Number Description -1 <paramref name="value" /> is less than zero. 0 <paramref name="value" /> is equal to zero. 1 <paramref name="value" /> is greater than zero. </returns>
/// <param name="value">A signed number. </param>
/// <filterpriority>1</filterpriority>
// Token: 0x06003F33 RID: 16179 RVA: 0x000D5C24 File Offset: 0x000D3E24
[CLSCompliant(false)]
public static int Sign(sbyte value)
{
if ((int)value > 0)
{
return 1;
}
return ((int)value != 0) ? (-1) : 0;
}
/// <summary>Returns a value indicating the sign of a 16-bit signed integer.</summary>
/// <returns>A number indicating the sign of <paramref name="value" />.Number Description -1 <paramref name="value" /> is less than zero. 0 <paramref name="value" /> is equal to zero. 1 <paramref name="value" /> is greater than zero. </returns>
/// <param name="value">A signed number. </param>
/// <filterpriority>1</filterpriority>
// Token: 0x06003F34 RID: 16180 RVA: 0x000D5C40 File Offset: 0x000D3E40
public static int Sign(short value)
{
if (value > 0)
{
return 1;
}
return (value != 0) ? (-1) : 0;
}
/// <summary>Returns the sine of the specified angle.</summary>
/// <returns>The sine of <paramref name="a" />. If <paramref name="a" /> is equal to <see cref="F:System.Double.NaN" />, <see cref="F:System.Double.NegativeInfinity" />, or <see cref="F:System.Double.PositiveInfinity" />, this method returns <see cref="F:System.Double.NaN" />.</returns>
/// <param name="a">An angle, measured in radians. </param>
/// <filterpriority>1</filterpriority>
// Token: 0x06003F35 RID: 16181
[MethodImpl(MethodImplOptions.InternalCall)]
public static extern double Sin(double a);
/// <summary>Returns the cosine of the specified angle.</summary>
/// <returns>The cosine of <paramref name="d" />. If <paramref name="d" /> is equal to <see cref="F:System.Double.NaN" />, <see cref="F:System.Double.NegativeInfinity" />, or <see cref="F:System.Double.PositiveInfinity" />, this method returns <see cref="F:System.Double.NaN" />. </returns>
/// <param name="d">An angle, measured in radians. </param>
/// <filterpriority>1</filterpriority>
// Token: 0x06003F36 RID: 16182
[MethodImpl(MethodImplOptions.InternalCall)]
public static extern double Cos(double d);
/// <summary>Returns the tangent of the specified angle.</summary>
/// <returns>The tangent of <paramref name="a" />. If <paramref name="a" /> is equal to <see cref="F:System.Double.NaN" />, <see cref="F:System.Double.NegativeInfinity" />, or <see cref="F:System.Double.PositiveInfinity" />, this method returns <see cref="F:System.Double.NaN" />.</returns>
/// <param name="a">An angle, measured in radians. </param>
/// <filterpriority>1</filterpriority>
// Token: 0x06003F37 RID: 16183
[MethodImpl(MethodImplOptions.InternalCall)]
public static extern double Tan(double a);
/// <summary>Returns the hyperbolic sine of the specified angle.</summary>
/// <returns>The hyperbolic sine of <paramref name="value" />. If <paramref name="value" /> is equal to <see cref="F:System.Double.NegativeInfinity" />, <see cref="F:System.Double.PositiveInfinity" />, or <see cref="F:System.Double.NaN" />, this method returns a <see cref="T:System.Double" /> equal to <paramref name="value" />.</returns>
/// <param name="value">An angle, measured in radians. </param>
/// <filterpriority>1</filterpriority>
// Token: 0x06003F38 RID: 16184
[MethodImpl(MethodImplOptions.InternalCall)]
public static extern double Sinh(double value);
/// <summary>Returns the hyperbolic cosine of the specified angle.</summary>
/// <returns>The hyperbolic cosine of <paramref name="value" />. If <paramref name="value" /> is equal to <see cref="F:System.Double.NegativeInfinity" /> or <see cref="F:System.Double.PositiveInfinity" />, <see cref="F:System.Double.PositiveInfinity" /> is returned. If <paramref name="value" /> is equal to <see cref="F:System.Double.NaN" />, <see cref="F:System.Double.NaN" /> is returned.</returns>
/// <param name="value">An angle, measured in radians. </param>
/// <filterpriority>1</filterpriority>
// Token: 0x06003F39 RID: 16185
[MethodImpl(MethodImplOptions.InternalCall)]
public static extern double Cosh(double value);
/// <summary>Returns the hyperbolic tangent of the specified angle.</summary>
/// <returns>The hyperbolic tangent of <paramref name="value" />. If <paramref name="value" /> is equal to <see cref="F:System.Double.NegativeInfinity" />, this method returns -1. If value is equal to <see cref="F:System.Double.PositiveInfinity" />, this method returns 1. If <paramref name="value" /> is equal to <see cref="F:System.Double.NaN" />, this method returns <see cref="F:System.Double.NaN" />.</returns>
/// <param name="value">An angle, measured in radians. </param>
/// <filterpriority>1</filterpriority>
// Token: 0x06003F3A RID: 16186
[MethodImpl(MethodImplOptions.InternalCall)]
public static extern double Tanh(double value);
/// <summary>Returns the angle whose cosine is the specified number.</summary>
/// <returns>An angle, θ, measured in radians, such that 0 ≤θ≤π-or- <see cref="F:System.Double.NaN" /> if <paramref name="d" /> &lt; -1 or <paramref name="d" /> &gt; 1 or <paramref name="d" /> equals <see cref="F:System.Double.NaN" />.</returns>
/// <param name="d">A number representing a cosine, where <paramref name="d" /> must be greater than or equal to -1, but less than or equal to 1. </param>
/// <filterpriority>1</filterpriority>
// Token: 0x06003F3B RID: 16187
[MethodImpl(MethodImplOptions.InternalCall)]
public static extern double Acos(double d);
/// <summary>Returns the angle whose sine is the specified number.</summary>
/// <returns>An angle, θ, measured in radians, such that -π/2 ≤θ≤π/2 -or- <see cref="F:System.Double.NaN" /> if <paramref name="d" /> &lt; -1 or <paramref name="d" /> &gt; 1 or <paramref name="d" /> equals <see cref="F:System.Double.NaN" />.</returns>
/// <param name="d">A number representing a sine, where <paramref name="d" /> must be greater than or equal to -1. </param>
/// <filterpriority>1</filterpriority>
// Token: 0x06003F3C RID: 16188
[MethodImpl(MethodImplOptions.InternalCall)]
public static extern double Asin(double d);
/// <summary>Returns the angle whose tangent is the specified number.</summary>
/// <returns>An angle, θ, measured in radians, such that -π/2 ≤θ≤π/2.-or- <see cref="F:System.Double.NaN" /> if <paramref name="d" /> equals <see cref="F:System.Double.NaN" />, -π/2 rounded to double precision (-1.5707963267949) if <paramref name="d" /> equals <see cref="F:System.Double.NegativeInfinity" />, or π/2 rounded to double precision (1.5707963267949) if <paramref name="d" /> equals <see cref="F:System.Double.PositiveInfinity" />.</returns>
/// <param name="d">A number representing a tangent. </param>
/// <filterpriority>1</filterpriority>
// Token: 0x06003F3D RID: 16189
[MethodImpl(MethodImplOptions.InternalCall)]
public static extern double Atan(double d);
/// <summary>Returns the angle whose tangent is the quotient of two specified numbers.</summary>
/// <returns>An angle, θ, measured in radians, such that -π≤θ≤π, and tan(θ) = <paramref name="y" /> / <paramref name="x" />, where (<paramref name="x" />, <paramref name="y" />) is a point in the Cartesian plane. Observe the following: For (<paramref name="x" />, <paramref name="y" />) in quadrant 1, 0 &lt; θ &lt; π/2.For (<paramref name="x" />, <paramref name="y" />) in quadrant 2, π/2 &lt; θ≤π.For (<paramref name="x" />, <paramref name="y" />) in quadrant 3, -π &lt; θ &lt; -π/2.For (<paramref name="x" />, <paramref name="y" />) in quadrant 4, -π/2 &lt; θ &lt; 0.For points on the boundaries of the quadrants, the return value is the following:If y is 0 and x is not negative, θ = 0.If y is 0 and x is negative, θ = π.If y is positive and x is 0, θ = π/2.If y is negative and x is 0, θ = -π/2.If <paramref name="x" /> or <paramref name="y" /> is <see cref="F:System.Double.NaN" />, or if <paramref name="x" /> and <paramref name="y" /> are either <see cref="F:System.Double.PositiveInfinity" /> or <see cref="F:System.Double.NegativeInfinity" />, the method returns <see cref="F:System.Double.NaN" />.</returns>
/// <param name="y">The y coordinate of a point. </param>
/// <param name="x">The x coordinate of a point. </param>
/// <filterpriority>1</filterpriority>
// Token: 0x06003F3E RID: 16190
[MethodImpl(MethodImplOptions.InternalCall)]
public static extern double Atan2(double y, double x);
/// <summary>Returns e raised to the specified power.</summary>
/// <returns>The number e raised to the power <paramref name="d" />. If <paramref name="d" /> equals <see cref="F:System.Double.NaN" /> or <see cref="F:System.Double.PositiveInfinity" />, that value is returned. If <paramref name="d" /> equals <see cref="F:System.Double.NegativeInfinity" />, 0 is returned.</returns>
/// <param name="d">A number specifying a power. </param>
/// <filterpriority>1</filterpriority>
// Token: 0x06003F3F RID: 16191
[MethodImpl(MethodImplOptions.InternalCall)]
public static extern double Exp(double d);
/// <summary>Returns the natural (base e) logarithm of a specified number.</summary>
/// <returns>Sign of <paramref name="d" />Returns Positive The natural logarithm of <paramref name="d" />; that is, ln <paramref name="d" />, or log e<paramref name="d" />Zero <see cref="F:System.Double.NegativeInfinity" />Negative <see cref="F:System.Double.NaN" />If <paramref name="d" /> is equal to <see cref="F:System.Double.NaN" />, returns <see cref="F:System.Double.NaN" />. If <paramref name="d" /> is equal to <see cref="F:System.Double.PositiveInfinity" />, returns <see cref="F:System.Double.PositiveInfinity" />.</returns>
/// <param name="d">A number whose logarithm is to be found. </param>
/// <filterpriority>1</filterpriority>
// Token: 0x06003F40 RID: 16192
[MethodImpl(MethodImplOptions.InternalCall)]
public static extern double Log(double d);
/// <summary>Returns the base 10 logarithm of a specified number.</summary>
/// <returns>Sign of <paramref name="d" />Returns Positive The base 10 log of <paramref name="d" />; that is, log 10<paramref name="d" />. Zero <see cref="F:System.Double.NegativeInfinity" />Negative <see cref="F:System.Double.NaN" />If <paramref name="d" /> is equal to <see cref="F:System.Double.NaN" />, this method returns <see cref="F:System.Double.NaN" />. If <paramref name="d" /> is equal to <see cref="F:System.Double.PositiveInfinity" />, this method returns <see cref="F:System.Double.PositiveInfinity" />.</returns>
/// <param name="d">A number whose logarithm is to be found. </param>
/// <filterpriority>1</filterpriority>
// Token: 0x06003F41 RID: 16193
[MethodImpl(MethodImplOptions.InternalCall)]
public static extern double Log10(double d);
/// <summary>Returns a specified number raised to the specified power.</summary>
/// <returns>The number <paramref name="x" /> raised to the power <paramref name="y" />.</returns>
/// <param name="x">A double-precision floating-point number to be raised to a power. </param>
/// <param name="y">A double-precision floating-point number that specifies a power. </param>
/// <filterpriority>1</filterpriority>
// Token: 0x06003F42 RID: 16194
[MethodImpl(MethodImplOptions.InternalCall)]
public static extern double Pow(double x, double y);
/// <summary>Returns the square root of a specified number.</summary>
/// <returns>Value of <paramref name="d" />Returns Zero, or positive The positive square root of <paramref name="d" />. Negative <see cref="F:System.Double.NaN" />If <paramref name="d" /> is equal to <see cref="F:System.Double.NaN" /> or <see cref="F:System.Double.PositiveInfinity" />, that value is returned.</returns>
/// <param name="d">A number. </param>
/// <filterpriority>1</filterpriority>
// Token: 0x06003F43 RID: 16195
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
[MethodImpl(MethodImplOptions.InternalCall)]
public static extern double Sqrt(double d);
/// <summary>Represents the natural logarithmic base, specified by the constant, e.</summary>
/// <filterpriority>1</filterpriority>
// Token: 0x0400192A RID: 6442
public const double E = 2.718281828459045;
/// <summary>Represents the ratio of the circumference of a circle to its diameter, specified by the constant, π.</summary>
/// <filterpriority>1</filterpriority>
// Token: 0x0400192B RID: 6443
public const double PI = 3.141592653589793;
}
}