You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: source/nanoFramework.CoreLibrary/System/Math.cs
+4-118Lines changed: 4 additions & 118 deletions
Original file line number
Diff line number
Diff line change
@@ -8,129 +8,15 @@ namespace System
8
8
{
9
9
usingRuntime.CompilerServices;
10
10
11
-
/// <summary>
12
-
/// Provides constants and static methods for trigonometric, logarithmic, and other common mathematical functions.
13
-
/// </summary>
14
-
/// <remarks>
15
-
/// Specific for nanoFramework: this class library is split between mscorlib and it's own assembly.
16
-
/// If you require any of the other methods that are not available here add the NuGet package nanoFramework.System.Math.
17
-
/// </remarks>
18
-
publicstaticpartialclassMath
11
+
internalstaticclassMathInternal
19
12
{
20
-
/// <summary>
21
-
/// Represents the ratio of the circumference of a circle to its diameter, specified by the constant, π.
22
-
/// </summary>
23
-
/// <remarks>The value of this field is 3.14159265358979323846.</remarks>
24
-
publicconstdoublePI=3.14159265358979323846;
25
-
/// <summary>
26
-
/// Represents the natural logarithmic base, specified by the constant, e.
27
-
/// </summary>
28
-
/// <remarks>The value of this field is 2.7182818284590452354.</remarks>
29
-
publicconstdoubleE=2.7182818284590452354;
30
-
31
-
/// <summary>
32
-
/// Returns the absolute value of a 32-bit signed integer.
33
-
/// </summary>
34
-
/// <param name="val">A number that is greater than Int32..::..MinValue, but less than or equal to Int32..::..MaxValue.</param>
35
-
/// <returns>A 32-bit signed integer, x, such that 0 ≤ x ≤ Int32..::..MaxValue.</returns>
36
-
[MethodImpl(MethodImplOptions.InternalCall)]
37
-
publicstaticexternintAbs(intval);
38
-
39
-
/// <summary>
40
-
/// Returns the absolute value of a double-precision floating-point number.
41
-
/// </summary>
42
-
/// <param name="val">A number that is greater than or equal to Double..::..MinValue, but less than or equal to Double..::..MaxValue.</param>
43
-
/// <returns>A double-precision floating-point number, x, such that 0 ≤ x ≤ Double..::..MaxValue.</returns>
44
-
/// <remarks>
45
-
/// This method with double-precision floating-point parameter might not be available in all platforms or with firmware images that where build with single point FPU option.
46
-
/// </remarks>
47
-
/// <exception cref="NotImplementedException"/>
48
-
[MethodImpl(MethodImplOptions.InternalCall)]
49
-
publicstaticexterndoubleAbs(doubleval);
50
-
51
-
/// <summary>
52
-
/// Returns the absolute value of a single-precision floating-point number.
53
-
/// </summary>
54
-
/// <param name="val">A number that is greater than or equal to Double..::..MinValue, but less than or equal to Double..::..MaxValue.</param>
55
-
/// <returns>A single-precision floating-point number, x, such that 0 ≤ x ≤ Double..::..MaxValue.</returns>
56
-
/// <remarks>
57
-
/// This method with single-precision floating-point parameter is exclusive of nanoFramework. It doesn't exist in the .NET API, only the double-precision floating-point version.
58
-
/// It might not be available in all platforms or with firmware images that where build with double point FPU option.
59
-
/// </remarks>
60
-
/// <exception cref="NotImplementedException"/>
61
-
[MethodImpl(MethodImplOptions.InternalCall)]
62
-
publicstaticexternfloatAbs(floatval);
63
-
64
-
/// <summary>
65
-
/// Returns the larger of two 32-bit signed integers.
66
-
/// </summary>
67
-
/// <param name="val1">The first of two 32-bit signed integers to compare. </param>
68
-
/// <param name="val2">The second of two 32-bit signed integers to compare. </param>
69
-
/// <returns>Parameter val1 or val2, whichever is larger.</returns>
70
-
[MethodImpl(MethodImplOptions.InternalCall)]
71
-
publicstaticexternintMax(intval1,intval2);
72
-
73
-
/// <summary>
74
-
/// Returns the larger of two double-precision floating-point numbers.
75
-
/// </summary>
76
-
/// <param name="x">The first of two double-precision floating-point numbers to compare. </param>
77
-
/// <param name="y">The second of two double-precision floating-point numbers to compare. </param>
78
-
/// <returns>Parameter x or y, whichever is larger. If x, y, or both x and y are equal to NaN, NaN is returned.</returns>
79
-
/// <remarks>
80
-
/// This method with double-precision floating-point parameter might not be available in all platforms or with firmware images that where build with single point FPU option.
81
-
/// </remarks>
82
-
/// <exception cref="NotImplementedException"/>
83
13
[MethodImpl(MethodImplOptions.InternalCall)]
84
-
publicstaticexterndoubleMax(doublex,doubley);
85
-
86
-
/// <summary>
87
-
/// Returns the larger of two single-precision floating-point numbers.
88
-
/// </summary>
89
-
/// <param name="x">The first of two single-precision floating-point numbers to compare. </param>
90
-
/// <param name="y">The second of two single-precision floating-point numbers to compare. </param>
91
-
/// <returns>Parameter x or y, whichever is larger. If x, y, or both x and y are equal to NaN, NaN is returned.</returns>
92
-
/// <remarks>
93
-
/// This method with single-precision floating-point parameter is exclusive of nanoFramework. It doesn't exist in the .NET API, only the double-precision floating-point version.
94
-
/// It might not be available in all platforms or with firmware images that where build with double point FPU option.
95
-
/// </remarks>
96
-
/// <exception cref="NotImplementedException"/>
97
-
[MethodImpl(MethodImplOptions.InternalCall)]
98
-
publicstaticexternfloatMax(floatx,floaty);
14
+
internalstaticexternintAbs(intval);
99
15
100
-
/// <summary>
101
-
/// Returns the smaller of two 32-bit signed integers.
102
-
/// </summary>
103
-
/// <param name="val1">The first of two 32-bit signed integers to compare. </param>
104
-
/// <param name="val2">The second of two 32-bit signed integers to compare. </param>
105
-
/// <returns>Parameter val1 or val2, whichever is smaller.</returns>
106
16
[MethodImpl(MethodImplOptions.InternalCall)]
107
-
publicstaticexternintMin(intval1,intval2);
17
+
internalstaticexternintMin(intval1,intval2);
108
18
109
-
/// <summary>
110
-
/// Returns the smaller of two double-precision floating-point numbers.
111
-
/// </summary>
112
-
/// <param name="x">The first of two double-precision floating-point numbers to compare. </param>
113
-
/// <param name="y">The second of two double-precision floating-point numbers to compare. </param>
114
-
/// <returns>Parameter x or y, whichever is smaller. If x, y, or both x and y are equal to NaN, NaN is returned.</returns>
115
-
/// <remarks>
116
-
/// This method with double-precision floating-point parameter might not be available in all platforms or with firmware images that where build with single point FPU option.
117
-
/// </remarks>
118
-
/// <exception cref="NotImplementedException"/>
119
-
[MethodImpl(MethodImplOptions.InternalCall)]
120
-
publicstaticexterndoubleMin(doublex,doubley);
121
-
/// <summary>
122
-
/// Returns the smaller of two single-precision floating-point numbers.
123
-
/// </summary>
124
-
/// <param name="x">The first of two single-precision floating-point numbers to compare. </param>
125
-
/// <param name="y">The second of two single-precision floating-point numbers to compare. </param>
126
-
/// <returns>Parameter x or y, whichever is smaller. If x, y, or both x and y are equal to NaN, NaN is returned.</returns>
127
-
/// <remarks>
128
-
/// This method with single-precision floating-point parameter is exclusive of nanoFramework. It doesn't exist in the .NET API, only the double-precision floating-point version.
129
-
/// It might not be available in all platforms or with firmware images that where build with double point FPU option.
0 commit comments