@@ -28,16 +28,29 @@ internal static class MathMethod
28
28
private static readonly MethodInfo __absInt64 ;
29
29
private static readonly MethodInfo __absSByte ;
30
30
private static readonly MethodInfo __absSingle ;
31
+ private static readonly MethodInfo __acos ;
32
+ private static readonly MethodInfo __acosh = null ; // null when target framework does not have this method
33
+ private static readonly MethodInfo __asin ;
34
+ private static readonly MethodInfo __asinh = null ; // null when target framework does not have this method
35
+ private static readonly MethodInfo __atan ;
36
+ private static readonly MethodInfo __atan2 ;
37
+ private static readonly MethodInfo __atanh = null ; // null when target framework does not have this method
31
38
private static readonly MethodInfo __ceilingWithDecimal ;
32
39
private static readonly MethodInfo __ceilingWithDouble ;
40
+ private static readonly MethodInfo __cos ;
41
+ private static readonly MethodInfo __cosh ;
33
42
private static readonly MethodInfo __exp ;
34
43
private static readonly MethodInfo __floorWithDecimal ;
35
44
private static readonly MethodInfo __floorWithDouble ;
36
45
private static readonly MethodInfo __log ;
37
46
private static readonly MethodInfo __logWithNewBase ;
38
47
private static readonly MethodInfo __log10 ;
39
48
private static readonly MethodInfo __pow ;
49
+ private static readonly MethodInfo __sin ;
50
+ private static readonly MethodInfo __sinh ;
40
51
private static readonly MethodInfo __sqrt ;
52
+ private static readonly MethodInfo __tan ;
53
+ private static readonly MethodInfo __tanh ;
41
54
private static readonly MethodInfo __truncateDecimal ;
42
55
private static readonly MethodInfo __truncateDouble ;
43
56
@@ -51,16 +64,35 @@ static MathMethod()
51
64
__absInt64 = ReflectionInfo . Method ( ( long value ) => Math . Abs ( value ) ) ;
52
65
__absSByte = ReflectionInfo . Method ( ( sbyte value ) => Math . Abs ( value ) ) ;
53
66
__absSingle = ReflectionInfo . Method ( ( float value ) => Math . Abs ( value ) ) ;
67
+ __acos = ReflectionInfo . Method ( ( double d ) => Math . Acos ( d ) ) ;
68
+ #if NETSTANDARD2_1_OR_GREATER
69
+ __acosh = ReflectionInfo . Method ( ( double d ) => Math . Acosh ( d ) ) ;
70
+ #endif
71
+ __asin = ReflectionInfo . Method ( ( double d ) => Math . Asin ( d ) ) ;
72
+ #if NETSTANDARD2_1_OR_GREATER
73
+ __asinh = ReflectionInfo . Method ( ( double d ) => Math . Asinh ( d ) ) ;
74
+ #endif
75
+ __atan = ReflectionInfo . Method ( ( double d ) => Math . Atan ( d ) ) ;
76
+ __atan2 = ReflectionInfo . Method ( ( double x , double y ) => Math . Atan2 ( x , y ) ) ;
77
+ #if NETSTANDARD2_1_OR_GREATER
78
+ __atanh = ReflectionInfo . Method ( ( double d ) => Math . Atanh ( d ) ) ;
79
+ #endif
54
80
__ceilingWithDecimal = ReflectionInfo . Method ( ( decimal d ) => Math . Ceiling ( d ) ) ;
55
81
__ceilingWithDouble = ReflectionInfo . Method ( ( double a ) => Math . Ceiling ( a ) ) ;
82
+ __cos = ReflectionInfo . Method ( ( double d ) => Math . Cos ( d ) ) ;
83
+ __cosh = ReflectionInfo . Method ( ( double a ) => Math . Cosh ( a ) ) ;
56
84
__exp = ReflectionInfo . Method ( ( double d ) => Math . Exp ( d ) ) ;
57
85
__floorWithDecimal = ReflectionInfo . Method ( ( decimal d ) => Math . Floor ( d ) ) ;
58
86
__floorWithDouble = ReflectionInfo . Method ( ( double d ) => Math . Floor ( d ) ) ;
59
87
__log = ReflectionInfo . Method ( ( double d ) => Math . Log ( d ) ) ;
60
88
__logWithNewBase = ReflectionInfo . Method ( ( double a , double newBase ) => Math . Log ( a , newBase ) ) ;
61
89
__log10 = ReflectionInfo . Method ( ( double d ) => Math . Log10 ( d ) ) ;
62
90
__pow = ReflectionInfo . Method ( ( double x , double y ) => Math . Pow ( x , y ) ) ;
91
+ __sin = ReflectionInfo . Method ( ( double a ) => Math . Sin ( a ) ) ;
92
+ __sinh = ReflectionInfo . Method ( ( double a ) => Math . Sinh ( a ) ) ;
63
93
__sqrt = ReflectionInfo . Method ( ( double d ) => Math . Sqrt ( d ) ) ;
94
+ __tan = ReflectionInfo . Method ( ( double a ) => Math . Tan ( a ) ) ;
95
+ __tanh = ReflectionInfo . Method ( ( double a ) => Math . Tanh ( a ) ) ;
64
96
__truncateDecimal = ReflectionInfo . Method ( ( decimal d ) => Math . Truncate ( d ) ) ;
65
97
__truncateDouble = ReflectionInfo . Method ( ( double d ) => Math . Truncate ( d ) ) ;
66
98
}
@@ -73,16 +105,29 @@ static MathMethod()
73
105
public static MethodInfo AbsInt64 => __absInt64 ;
74
106
public static MethodInfo AbsSByte => __absSByte ;
75
107
public static MethodInfo AbsSingle => __absSingle ;
108
+ public static MethodInfo Acos => __acos ;
109
+ public static MethodInfo Acosh => __acosh ;
110
+ public static MethodInfo Asin => __asin ;
111
+ public static MethodInfo Asinh => __asinh ;
112
+ public static MethodInfo Atan => __atan ;
113
+ public static MethodInfo Atan2 => __atan2 ;
114
+ public static MethodInfo Atanh => __atanh ;
76
115
public static MethodInfo CeilingWithDecimal => __ceilingWithDecimal ;
77
116
public static MethodInfo CeilingWithDouble => __ceilingWithDouble ;
117
+ public static MethodInfo Cos => __cos ;
118
+ public static MethodInfo Cosh => __cosh ;
78
119
public static MethodInfo Exp => __exp ;
79
120
public static MethodInfo FloorWithDecimal => __floorWithDecimal ;
80
121
public static MethodInfo FloorWithDouble => __floorWithDouble ;
81
122
public static MethodInfo Log => __log ;
82
123
public static MethodInfo LogWithNewBase => __logWithNewBase ;
83
124
public static MethodInfo Log10 => __log10 ;
84
125
public static MethodInfo Pow => __pow ;
126
+ public static MethodInfo Sin => __sin ;
127
+ public static MethodInfo Sinh => __sinh ;
85
128
public static MethodInfo Sqrt => __sqrt ;
129
+ public static MethodInfo Tan => __tan ;
130
+ public static MethodInfo Tanh => __tanh ;
86
131
public static MethodInfo TruncateDecimal => __truncateDecimal ;
87
132
public static MethodInfo TruncateDouble => __truncateDouble ;
88
133
}
0 commit comments