@@ -47,136 +47,40 @@ public static class NumberToAmplitudeRatioExtensions
47
47
#region DecibelMicrovolt
48
48
49
49
/// <inheritdoc cref="AmplitudeRatio.FromDecibelMicrovolts(UnitsNet.QuantityValue)" />
50
- public static AmplitudeRatio DecibelMicrovolts ( this int value ) => AmplitudeRatio . FromDecibelMicrovolts ( value ) ;
50
+ public static AmplitudeRatio DecibelMicrovolts < T > ( this T value ) => AmplitudeRatio . FromDecibelMicrovolts ( Convert . ToDouble ( value ) ) ;
51
51
52
52
/// <inheritdoc cref="AmplitudeRatio.FromDecibelMicrovolts(UnitsNet.QuantityValue)" />
53
- public static AmplitudeRatio ? DecibelMicrovolts ( this int ? value ) => AmplitudeRatio . FromDecibelMicrovolts ( value ) ;
54
-
55
- /// <inheritdoc cref="AmplitudeRatio.FromDecibelMicrovolts(UnitsNet.QuantityValue)" />
56
- public static AmplitudeRatio DecibelMicrovolts ( this long value ) => AmplitudeRatio . FromDecibelMicrovolts ( value ) ;
57
-
58
- /// <inheritdoc cref="AmplitudeRatio.FromDecibelMicrovolts(UnitsNet.QuantityValue)" />
59
- public static AmplitudeRatio ? DecibelMicrovolts ( this long ? value ) => AmplitudeRatio . FromDecibelMicrovolts ( value ) ;
60
-
61
- /// <inheritdoc cref="AmplitudeRatio.FromDecibelMicrovolts(UnitsNet.QuantityValue)" />
62
- public static AmplitudeRatio DecibelMicrovolts ( this double value ) => AmplitudeRatio . FromDecibelMicrovolts ( value ) ;
63
-
64
- /// <inheritdoc cref="AmplitudeRatio.FromDecibelMicrovolts(UnitsNet.QuantityValue)" />
65
- public static AmplitudeRatio ? DecibelMicrovolts ( this double ? value ) => AmplitudeRatio . FromDecibelMicrovolts ( value ) ;
66
-
67
- /// <inheritdoc cref="AmplitudeRatio.FromDecibelMicrovolts(UnitsNet.QuantityValue)" />
68
- public static AmplitudeRatio DecibelMicrovolts ( this float value ) => AmplitudeRatio . FromDecibelMicrovolts ( value ) ;
69
-
70
- /// <inheritdoc cref="AmplitudeRatio.FromDecibelMicrovolts(UnitsNet.QuantityValue)" />
71
- public static AmplitudeRatio ? DecibelMicrovolts ( this float ? value ) => AmplitudeRatio . FromDecibelMicrovolts ( value ) ;
72
-
73
- /// <inheritdoc cref="AmplitudeRatio.FromDecibelMicrovolts(UnitsNet.QuantityValue)" />
74
- public static AmplitudeRatio DecibelMicrovolts ( this decimal value ) => AmplitudeRatio . FromDecibelMicrovolts ( Convert . ToDouble ( value ) ) ;
75
-
76
- /// <inheritdoc cref="AmplitudeRatio.FromDecibelMicrovolts(UnitsNet.QuantityValue)" />
77
- public static AmplitudeRatio ? DecibelMicrovolts ( this decimal ? value ) => AmplitudeRatio . FromDecibelMicrovolts ( value == null ? ( double ? ) null : Convert . ToDouble ( value . Value ) ) ;
53
+ public static AmplitudeRatio ? DecibelMicrovolts < T > ( this T ? value ) where T : struct => AmplitudeRatio . FromDecibelMicrovolts ( value == null ? ( double ? ) null : Convert . ToDouble ( value . Value ) ) ;
78
54
79
55
#endregion
80
56
81
57
#region DecibelMillivolt
82
58
83
59
/// <inheritdoc cref="AmplitudeRatio.FromDecibelMillivolts(UnitsNet.QuantityValue)" />
84
- public static AmplitudeRatio DecibelMillivolts ( this int value ) => AmplitudeRatio . FromDecibelMillivolts ( value ) ;
85
-
86
- /// <inheritdoc cref="AmplitudeRatio.FromDecibelMillivolts(UnitsNet.QuantityValue)" />
87
- public static AmplitudeRatio ? DecibelMillivolts ( this int ? value ) => AmplitudeRatio . FromDecibelMillivolts ( value ) ;
88
-
89
- /// <inheritdoc cref="AmplitudeRatio.FromDecibelMillivolts(UnitsNet.QuantityValue)" />
90
- public static AmplitudeRatio DecibelMillivolts ( this long value ) => AmplitudeRatio . FromDecibelMillivolts ( value ) ;
91
-
92
- /// <inheritdoc cref="AmplitudeRatio.FromDecibelMillivolts(UnitsNet.QuantityValue)" />
93
- public static AmplitudeRatio ? DecibelMillivolts ( this long ? value ) => AmplitudeRatio . FromDecibelMillivolts ( value ) ;
94
-
95
- /// <inheritdoc cref="AmplitudeRatio.FromDecibelMillivolts(UnitsNet.QuantityValue)" />
96
- public static AmplitudeRatio DecibelMillivolts ( this double value ) => AmplitudeRatio . FromDecibelMillivolts ( value ) ;
97
-
98
- /// <inheritdoc cref="AmplitudeRatio.FromDecibelMillivolts(UnitsNet.QuantityValue)" />
99
- public static AmplitudeRatio ? DecibelMillivolts ( this double ? value ) => AmplitudeRatio . FromDecibelMillivolts ( value ) ;
100
-
101
- /// <inheritdoc cref="AmplitudeRatio.FromDecibelMillivolts(UnitsNet.QuantityValue)" />
102
- public static AmplitudeRatio DecibelMillivolts ( this float value ) => AmplitudeRatio . FromDecibelMillivolts ( value ) ;
103
-
104
- /// <inheritdoc cref="AmplitudeRatio.FromDecibelMillivolts(UnitsNet.QuantityValue)" />
105
- public static AmplitudeRatio ? DecibelMillivolts ( this float ? value ) => AmplitudeRatio . FromDecibelMillivolts ( value ) ;
106
-
107
- /// <inheritdoc cref="AmplitudeRatio.FromDecibelMillivolts(UnitsNet.QuantityValue)" />
108
- public static AmplitudeRatio DecibelMillivolts ( this decimal value ) => AmplitudeRatio . FromDecibelMillivolts ( Convert . ToDouble ( value ) ) ;
60
+ public static AmplitudeRatio DecibelMillivolts < T > ( this T value ) => AmplitudeRatio . FromDecibelMillivolts ( Convert . ToDouble ( value ) ) ;
109
61
110
62
/// <inheritdoc cref="AmplitudeRatio.FromDecibelMillivolts(UnitsNet.QuantityValue)" />
111
- public static AmplitudeRatio ? DecibelMillivolts ( this decimal ? value ) => AmplitudeRatio . FromDecibelMillivolts ( value == null ? ( double ? ) null : Convert . ToDouble ( value . Value ) ) ;
63
+ public static AmplitudeRatio ? DecibelMillivolts < T > ( this T ? value ) where T : struct => AmplitudeRatio . FromDecibelMillivolts ( value == null ? ( double ? ) null : Convert . ToDouble ( value . Value ) ) ;
112
64
113
65
#endregion
114
66
115
67
#region DecibelUnloaded
116
68
117
69
/// <inheritdoc cref="AmplitudeRatio.FromDecibelsUnloaded(UnitsNet.QuantityValue)" />
118
- public static AmplitudeRatio DecibelsUnloaded ( this int value ) => AmplitudeRatio . FromDecibelsUnloaded ( value ) ;
70
+ public static AmplitudeRatio DecibelsUnloaded < T > ( this T value ) => AmplitudeRatio . FromDecibelsUnloaded ( Convert . ToDouble ( value ) ) ;
119
71
120
72
/// <inheritdoc cref="AmplitudeRatio.FromDecibelsUnloaded(UnitsNet.QuantityValue)" />
121
- public static AmplitudeRatio ? DecibelsUnloaded ( this int ? value ) => AmplitudeRatio . FromDecibelsUnloaded ( value ) ;
122
-
123
- /// <inheritdoc cref="AmplitudeRatio.FromDecibelsUnloaded(UnitsNet.QuantityValue)" />
124
- public static AmplitudeRatio DecibelsUnloaded ( this long value ) => AmplitudeRatio . FromDecibelsUnloaded ( value ) ;
125
-
126
- /// <inheritdoc cref="AmplitudeRatio.FromDecibelsUnloaded(UnitsNet.QuantityValue)" />
127
- public static AmplitudeRatio ? DecibelsUnloaded ( this long ? value ) => AmplitudeRatio . FromDecibelsUnloaded ( value ) ;
128
-
129
- /// <inheritdoc cref="AmplitudeRatio.FromDecibelsUnloaded(UnitsNet.QuantityValue)" />
130
- public static AmplitudeRatio DecibelsUnloaded ( this double value ) => AmplitudeRatio . FromDecibelsUnloaded ( value ) ;
131
-
132
- /// <inheritdoc cref="AmplitudeRatio.FromDecibelsUnloaded(UnitsNet.QuantityValue)" />
133
- public static AmplitudeRatio ? DecibelsUnloaded ( this double ? value ) => AmplitudeRatio . FromDecibelsUnloaded ( value ) ;
134
-
135
- /// <inheritdoc cref="AmplitudeRatio.FromDecibelsUnloaded(UnitsNet.QuantityValue)" />
136
- public static AmplitudeRatio DecibelsUnloaded ( this float value ) => AmplitudeRatio . FromDecibelsUnloaded ( value ) ;
137
-
138
- /// <inheritdoc cref="AmplitudeRatio.FromDecibelsUnloaded(UnitsNet.QuantityValue)" />
139
- public static AmplitudeRatio ? DecibelsUnloaded ( this float ? value ) => AmplitudeRatio . FromDecibelsUnloaded ( value ) ;
140
-
141
- /// <inheritdoc cref="AmplitudeRatio.FromDecibelsUnloaded(UnitsNet.QuantityValue)" />
142
- public static AmplitudeRatio DecibelsUnloaded ( this decimal value ) => AmplitudeRatio . FromDecibelsUnloaded ( Convert . ToDouble ( value ) ) ;
143
-
144
- /// <inheritdoc cref="AmplitudeRatio.FromDecibelsUnloaded(UnitsNet.QuantityValue)" />
145
- public static AmplitudeRatio ? DecibelsUnloaded ( this decimal ? value ) => AmplitudeRatio . FromDecibelsUnloaded ( value == null ? ( double ? ) null : Convert . ToDouble ( value . Value ) ) ;
73
+ public static AmplitudeRatio ? DecibelsUnloaded < T > ( this T ? value ) where T : struct => AmplitudeRatio . FromDecibelsUnloaded ( value == null ? ( double ? ) null : Convert . ToDouble ( value . Value ) ) ;
146
74
147
75
#endregion
148
76
149
77
#region DecibelVolt
150
78
151
79
/// <inheritdoc cref="AmplitudeRatio.FromDecibelVolts(UnitsNet.QuantityValue)" />
152
- public static AmplitudeRatio DecibelVolts ( this int value ) => AmplitudeRatio . FromDecibelVolts ( value ) ;
153
-
154
- /// <inheritdoc cref="AmplitudeRatio.FromDecibelVolts(UnitsNet.QuantityValue)" />
155
- public static AmplitudeRatio ? DecibelVolts ( this int ? value ) => AmplitudeRatio . FromDecibelVolts ( value ) ;
156
-
157
- /// <inheritdoc cref="AmplitudeRatio.FromDecibelVolts(UnitsNet.QuantityValue)" />
158
- public static AmplitudeRatio DecibelVolts ( this long value ) => AmplitudeRatio . FromDecibelVolts ( value ) ;
159
-
160
- /// <inheritdoc cref="AmplitudeRatio.FromDecibelVolts(UnitsNet.QuantityValue)" />
161
- public static AmplitudeRatio ? DecibelVolts ( this long ? value ) => AmplitudeRatio . FromDecibelVolts ( value ) ;
162
-
163
- /// <inheritdoc cref="AmplitudeRatio.FromDecibelVolts(UnitsNet.QuantityValue)" />
164
- public static AmplitudeRatio DecibelVolts ( this double value ) => AmplitudeRatio . FromDecibelVolts ( value ) ;
165
-
166
- /// <inheritdoc cref="AmplitudeRatio.FromDecibelVolts(UnitsNet.QuantityValue)" />
167
- public static AmplitudeRatio ? DecibelVolts ( this double ? value ) => AmplitudeRatio . FromDecibelVolts ( value ) ;
168
-
169
- /// <inheritdoc cref="AmplitudeRatio.FromDecibelVolts(UnitsNet.QuantityValue)" />
170
- public static AmplitudeRatio DecibelVolts ( this float value ) => AmplitudeRatio . FromDecibelVolts ( value ) ;
171
-
172
- /// <inheritdoc cref="AmplitudeRatio.FromDecibelVolts(UnitsNet.QuantityValue)" />
173
- public static AmplitudeRatio ? DecibelVolts ( this float ? value ) => AmplitudeRatio . FromDecibelVolts ( value ) ;
174
-
175
- /// <inheritdoc cref="AmplitudeRatio.FromDecibelVolts(UnitsNet.QuantityValue)" />
176
- public static AmplitudeRatio DecibelVolts ( this decimal value ) => AmplitudeRatio . FromDecibelVolts ( Convert . ToDouble ( value ) ) ;
80
+ public static AmplitudeRatio DecibelVolts < T > ( this T value ) => AmplitudeRatio . FromDecibelVolts ( Convert . ToDouble ( value ) ) ;
177
81
178
82
/// <inheritdoc cref="AmplitudeRatio.FromDecibelVolts(UnitsNet.QuantityValue)" />
179
- public static AmplitudeRatio ? DecibelVolts ( this decimal ? value ) => AmplitudeRatio . FromDecibelVolts ( value == null ? ( double ? ) null : Convert . ToDouble ( value . Value ) ) ;
83
+ public static AmplitudeRatio ? DecibelVolts < T > ( this T ? value ) where T : struct => AmplitudeRatio . FromDecibelVolts ( value == null ? ( double ? ) null : Convert . ToDouble ( value . Value ) ) ;
180
84
181
85
#endregion
182
86
0 commit comments