1
2use core::fmt;
5use super::UnitStruct;
6use super::NumLike;
7use super::base::*;
8use super::geometry::*;
9use super::mechanical::*;
10
11#[cfg(feature="serde")]
13use serde::{Serialize, Deserialize};
14#[cfg(feature="num-bigfloat")]
15use num_bigfloat;
16#[cfg(feature="num-complex")]
17use num_complex;
18
19
20
21#[derive(UnitStruct, Debug, Clone)]
23#[cfg_attr(feature="serde", derive(Serialize, Deserialize))]
24pub struct AreaPerLumen<T: NumLike>{
25 pub m2_per_lm: T
27}
28
29impl<T> AreaPerLumen<T> where T: NumLike {
30
31 pub fn unit_name() -> &'static str { "square meters per lumen" }
33
34 pub fn unit_symbol() -> &'static str { "m²/lm" }
36
37 pub fn from_m2_per_lm(m2_per_lm: T) -> Self { AreaPerLumen{m2_per_lm: m2_per_lm} }
42
43 pub fn to_m2_per_lm(&self) -> T { self.m2_per_lm.clone() }
45
46 pub fn from_square_meters_per_lumen(square_meters_per_lumen: T) -> Self { AreaPerLumen{m2_per_lm: square_meters_per_lumen} }
51
52 pub fn to_square_meters_per_lumen(&self) -> T { self.m2_per_lm.clone() }
54
55 pub fn from_per_lux(per_lux: T) -> Self { AreaPerLumen{m2_per_lm: per_lux} }
60
61 pub fn to_per_lux(&self) -> T { self.m2_per_lm.clone() }
63
64}
65
66impl<T> fmt::Display for AreaPerLumen<T> where T: NumLike {
67 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
68 write!(f, "{} {}", &self.m2_per_lm, Self::unit_symbol())
69 }
70}
71
72impl<T> AreaPerLumen<T> where T: NumLike+From<f64> {
73
74}
75
76
77#[cfg(feature="num-bigfloat")]
79impl core::ops::Mul<AreaPerLumen<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
80 type Output = AreaPerLumen<num_bigfloat::BigFloat>;
81 fn mul(self, rhs: AreaPerLumen<num_bigfloat::BigFloat>) -> Self::Output {
82 AreaPerLumen{m2_per_lm: self * rhs.m2_per_lm}
83 }
84}
85#[cfg(feature="num-bigfloat")]
87impl core::ops::Mul<AreaPerLumen<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
88 type Output = AreaPerLumen<num_bigfloat::BigFloat>;
89 fn mul(self, rhs: AreaPerLumen<num_bigfloat::BigFloat>) -> Self::Output {
90 AreaPerLumen{m2_per_lm: self.clone() * rhs.m2_per_lm}
91 }
92}
93#[cfg(feature="num-bigfloat")]
95impl core::ops::Mul<&AreaPerLumen<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
96 type Output = AreaPerLumen<num_bigfloat::BigFloat>;
97 fn mul(self, rhs: &AreaPerLumen<num_bigfloat::BigFloat>) -> Self::Output {
98 AreaPerLumen{m2_per_lm: self * rhs.m2_per_lm.clone()}
99 }
100}
101#[cfg(feature="num-bigfloat")]
103impl core::ops::Mul<&AreaPerLumen<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
104 type Output = AreaPerLumen<num_bigfloat::BigFloat>;
105 fn mul(self, rhs: &AreaPerLumen<num_bigfloat::BigFloat>) -> Self::Output {
106 AreaPerLumen{m2_per_lm: self.clone() * rhs.m2_per_lm.clone()}
107 }
108}
109
110#[cfg(feature="num-complex")]
112impl core::ops::Mul<AreaPerLumen<num_complex::Complex32>> for num_complex::Complex32 {
113 type Output = AreaPerLumen<num_complex::Complex32>;
114 fn mul(self, rhs: AreaPerLumen<num_complex::Complex32>) -> Self::Output {
115 AreaPerLumen{m2_per_lm: self * rhs.m2_per_lm}
116 }
117}
118#[cfg(feature="num-complex")]
120impl core::ops::Mul<AreaPerLumen<num_complex::Complex32>> for &num_complex::Complex32 {
121 type Output = AreaPerLumen<num_complex::Complex32>;
122 fn mul(self, rhs: AreaPerLumen<num_complex::Complex32>) -> Self::Output {
123 AreaPerLumen{m2_per_lm: self.clone() * rhs.m2_per_lm}
124 }
125}
126#[cfg(feature="num-complex")]
128impl core::ops::Mul<&AreaPerLumen<num_complex::Complex32>> for num_complex::Complex32 {
129 type Output = AreaPerLumen<num_complex::Complex32>;
130 fn mul(self, rhs: &AreaPerLumen<num_complex::Complex32>) -> Self::Output {
131 AreaPerLumen{m2_per_lm: self * rhs.m2_per_lm.clone()}
132 }
133}
134#[cfg(feature="num-complex")]
136impl core::ops::Mul<&AreaPerLumen<num_complex::Complex32>> for &num_complex::Complex32 {
137 type Output = AreaPerLumen<num_complex::Complex32>;
138 fn mul(self, rhs: &AreaPerLumen<num_complex::Complex32>) -> Self::Output {
139 AreaPerLumen{m2_per_lm: self.clone() * rhs.m2_per_lm.clone()}
140 }
141}
142
143#[cfg(feature="num-complex")]
145impl core::ops::Mul<AreaPerLumen<num_complex::Complex64>> for num_complex::Complex64 {
146 type Output = AreaPerLumen<num_complex::Complex64>;
147 fn mul(self, rhs: AreaPerLumen<num_complex::Complex64>) -> Self::Output {
148 AreaPerLumen{m2_per_lm: self * rhs.m2_per_lm}
149 }
150}
151#[cfg(feature="num-complex")]
153impl core::ops::Mul<AreaPerLumen<num_complex::Complex64>> for &num_complex::Complex64 {
154 type Output = AreaPerLumen<num_complex::Complex64>;
155 fn mul(self, rhs: AreaPerLumen<num_complex::Complex64>) -> Self::Output {
156 AreaPerLumen{m2_per_lm: self.clone() * rhs.m2_per_lm}
157 }
158}
159#[cfg(feature="num-complex")]
161impl core::ops::Mul<&AreaPerLumen<num_complex::Complex64>> for num_complex::Complex64 {
162 type Output = AreaPerLumen<num_complex::Complex64>;
163 fn mul(self, rhs: &AreaPerLumen<num_complex::Complex64>) -> Self::Output {
164 AreaPerLumen{m2_per_lm: self * rhs.m2_per_lm.clone()}
165 }
166}
167#[cfg(feature="num-complex")]
169impl core::ops::Mul<&AreaPerLumen<num_complex::Complex64>> for &num_complex::Complex64 {
170 type Output = AreaPerLumen<num_complex::Complex64>;
171 fn mul(self, rhs: &AreaPerLumen<num_complex::Complex64>) -> Self::Output {
172 AreaPerLumen{m2_per_lm: self.clone() * rhs.m2_per_lm.clone()}
173 }
174}
175
176
177
178
179impl<T> core::ops::Div<InverseLuminousFlux<T>> for AreaPerLumen<T> where T: NumLike {
182 type Output = Area<T>;
183 fn div(self, rhs: InverseLuminousFlux<T>) -> Self::Output {
184 Area{m2: self.m2_per_lm / rhs.per_lm}
185 }
186}
187impl<T> core::ops::Div<InverseLuminousFlux<T>> for &AreaPerLumen<T> where T: NumLike {
189 type Output = Area<T>;
190 fn div(self, rhs: InverseLuminousFlux<T>) -> Self::Output {
191 Area{m2: self.m2_per_lm.clone() / rhs.per_lm}
192 }
193}
194impl<T> core::ops::Div<&InverseLuminousFlux<T>> for AreaPerLumen<T> where T: NumLike {
196 type Output = Area<T>;
197 fn div(self, rhs: &InverseLuminousFlux<T>) -> Self::Output {
198 Area{m2: self.m2_per_lm / rhs.per_lm.clone()}
199 }
200}
201impl<T> core::ops::Div<&InverseLuminousFlux<T>> for &AreaPerLumen<T> where T: NumLike {
203 type Output = Area<T>;
204 fn div(self, rhs: &InverseLuminousFlux<T>) -> Self::Output {
205 Area{m2: self.m2_per_lm.clone() / rhs.per_lm.clone()}
206 }
207}
208
209impl<T> core::ops::Mul<LuminousFlux<T>> for AreaPerLumen<T> where T: NumLike {
212 type Output = Area<T>;
213 fn mul(self, rhs: LuminousFlux<T>) -> Self::Output {
214 Area{m2: self.m2_per_lm * rhs.lm}
215 }
216}
217impl<T> core::ops::Mul<LuminousFlux<T>> for &AreaPerLumen<T> where T: NumLike {
219 type Output = Area<T>;
220 fn mul(self, rhs: LuminousFlux<T>) -> Self::Output {
221 Area{m2: self.m2_per_lm.clone() * rhs.lm}
222 }
223}
224impl<T> core::ops::Mul<&LuminousFlux<T>> for AreaPerLumen<T> where T: NumLike {
226 type Output = Area<T>;
227 fn mul(self, rhs: &LuminousFlux<T>) -> Self::Output {
228 Area{m2: self.m2_per_lm * rhs.lm.clone()}
229 }
230}
231impl<T> core::ops::Mul<&LuminousFlux<T>> for &AreaPerLumen<T> where T: NumLike {
233 type Output = Area<T>;
234 fn mul(self, rhs: &LuminousFlux<T>) -> Self::Output {
235 Area{m2: self.m2_per_lm.clone() * rhs.lm.clone()}
236 }
237}
238
239impl<T> core::ops::Div<Area<T>> for AreaPerLumen<T> where T: NumLike {
242 type Output = InverseLuminousFlux<T>;
243 fn div(self, rhs: Area<T>) -> Self::Output {
244 InverseLuminousFlux{per_lm: self.m2_per_lm / rhs.m2}
245 }
246}
247impl<T> core::ops::Div<Area<T>> for &AreaPerLumen<T> where T: NumLike {
249 type Output = InverseLuminousFlux<T>;
250 fn div(self, rhs: Area<T>) -> Self::Output {
251 InverseLuminousFlux{per_lm: self.m2_per_lm.clone() / rhs.m2}
252 }
253}
254impl<T> core::ops::Div<&Area<T>> for AreaPerLumen<T> where T: NumLike {
256 type Output = InverseLuminousFlux<T>;
257 fn div(self, rhs: &Area<T>) -> Self::Output {
258 InverseLuminousFlux{per_lm: self.m2_per_lm / rhs.m2.clone()}
259 }
260}
261impl<T> core::ops::Div<&Area<T>> for &AreaPerLumen<T> where T: NumLike {
263 type Output = InverseLuminousFlux<T>;
264 fn div(self, rhs: &Area<T>) -> Self::Output {
265 InverseLuminousFlux{per_lm: self.m2_per_lm.clone() / rhs.m2.clone()}
266 }
267}
268
269impl<T> core::ops::Mul<InverseArea<T>> for AreaPerLumen<T> where T: NumLike {
272 type Output = InverseLuminousFlux<T>;
273 fn mul(self, rhs: InverseArea<T>) -> Self::Output {
274 InverseLuminousFlux{per_lm: self.m2_per_lm * rhs.per_m2}
275 }
276}
277impl<T> core::ops::Mul<InverseArea<T>> for &AreaPerLumen<T> where T: NumLike {
279 type Output = InverseLuminousFlux<T>;
280 fn mul(self, rhs: InverseArea<T>) -> Self::Output {
281 InverseLuminousFlux{per_lm: self.m2_per_lm.clone() * rhs.per_m2}
282 }
283}
284impl<T> core::ops::Mul<&InverseArea<T>> for AreaPerLumen<T> where T: NumLike {
286 type Output = InverseLuminousFlux<T>;
287 fn mul(self, rhs: &InverseArea<T>) -> Self::Output {
288 InverseLuminousFlux{per_lm: self.m2_per_lm * rhs.per_m2.clone()}
289 }
290}
291impl<T> core::ops::Mul<&InverseArea<T>> for &AreaPerLumen<T> where T: NumLike {
293 type Output = InverseLuminousFlux<T>;
294 fn mul(self, rhs: &InverseArea<T>) -> Self::Output {
295 InverseLuminousFlux{per_lm: self.m2_per_lm.clone() * rhs.per_m2.clone()}
296 }
297}
298
299impl<T> core::ops::Div<AreaPerLumen<T>> for f64 where T: NumLike+From<f64> {
302 type Output = Illuminance<T>;
303 fn div(self, rhs: AreaPerLumen<T>) -> Self::Output {
304 Illuminance{lux: T::from(self) / rhs.m2_per_lm}
305 }
306}
307impl<T> core::ops::Div<AreaPerLumen<T>> for &f64 where T: NumLike+From<f64> {
309 type Output = Illuminance<T>;
310 fn div(self, rhs: AreaPerLumen<T>) -> Self::Output {
311 Illuminance{lux: T::from(self.clone()) / rhs.m2_per_lm}
312 }
313}
314impl<T> core::ops::Div<&AreaPerLumen<T>> for f64 where T: NumLike+From<f64> {
316 type Output = Illuminance<T>;
317 fn div(self, rhs: &AreaPerLumen<T>) -> Self::Output {
318 Illuminance{lux: T::from(self) / rhs.m2_per_lm.clone()}
319 }
320}
321impl<T> core::ops::Div<&AreaPerLumen<T>> for &f64 where T: NumLike+From<f64> {
323 type Output = Illuminance<T>;
324 fn div(self, rhs: &AreaPerLumen<T>) -> Self::Output {
325 Illuminance{lux: T::from(self.clone()) / rhs.m2_per_lm.clone()}
326 }
327}
328
329impl<T> core::ops::Div<AreaPerLumen<T>> for f32 where T: NumLike+From<f32> {
332 type Output = Illuminance<T>;
333 fn div(self, rhs: AreaPerLumen<T>) -> Self::Output {
334 Illuminance{lux: T::from(self) / rhs.m2_per_lm}
335 }
336}
337impl<T> core::ops::Div<AreaPerLumen<T>> for &f32 where T: NumLike+From<f32> {
339 type Output = Illuminance<T>;
340 fn div(self, rhs: AreaPerLumen<T>) -> Self::Output {
341 Illuminance{lux: T::from(self.clone()) / rhs.m2_per_lm}
342 }
343}
344impl<T> core::ops::Div<&AreaPerLumen<T>> for f32 where T: NumLike+From<f32> {
346 type Output = Illuminance<T>;
347 fn div(self, rhs: &AreaPerLumen<T>) -> Self::Output {
348 Illuminance{lux: T::from(self) / rhs.m2_per_lm.clone()}
349 }
350}
351impl<T> core::ops::Div<&AreaPerLumen<T>> for &f32 where T: NumLike+From<f32> {
353 type Output = Illuminance<T>;
354 fn div(self, rhs: &AreaPerLumen<T>) -> Self::Output {
355 Illuminance{lux: T::from(self.clone()) / rhs.m2_per_lm.clone()}
356 }
357}
358
359impl<T> core::ops::Div<AreaPerLumen<T>> for i64 where T: NumLike+From<i64> {
362 type Output = Illuminance<T>;
363 fn div(self, rhs: AreaPerLumen<T>) -> Self::Output {
364 Illuminance{lux: T::from(self) / rhs.m2_per_lm}
365 }
366}
367impl<T> core::ops::Div<AreaPerLumen<T>> for &i64 where T: NumLike+From<i64> {
369 type Output = Illuminance<T>;
370 fn div(self, rhs: AreaPerLumen<T>) -> Self::Output {
371 Illuminance{lux: T::from(self.clone()) / rhs.m2_per_lm}
372 }
373}
374impl<T> core::ops::Div<&AreaPerLumen<T>> for i64 where T: NumLike+From<i64> {
376 type Output = Illuminance<T>;
377 fn div(self, rhs: &AreaPerLumen<T>) -> Self::Output {
378 Illuminance{lux: T::from(self) / rhs.m2_per_lm.clone()}
379 }
380}
381impl<T> core::ops::Div<&AreaPerLumen<T>> for &i64 where T: NumLike+From<i64> {
383 type Output = Illuminance<T>;
384 fn div(self, rhs: &AreaPerLumen<T>) -> Self::Output {
385 Illuminance{lux: T::from(self.clone()) / rhs.m2_per_lm.clone()}
386 }
387}
388
389impl<T> core::ops::Div<AreaPerLumen<T>> for i32 where T: NumLike+From<i32> {
392 type Output = Illuminance<T>;
393 fn div(self, rhs: AreaPerLumen<T>) -> Self::Output {
394 Illuminance{lux: T::from(self) / rhs.m2_per_lm}
395 }
396}
397impl<T> core::ops::Div<AreaPerLumen<T>> for &i32 where T: NumLike+From<i32> {
399 type Output = Illuminance<T>;
400 fn div(self, rhs: AreaPerLumen<T>) -> Self::Output {
401 Illuminance{lux: T::from(self.clone()) / rhs.m2_per_lm}
402 }
403}
404impl<T> core::ops::Div<&AreaPerLumen<T>> for i32 where T: NumLike+From<i32> {
406 type Output = Illuminance<T>;
407 fn div(self, rhs: &AreaPerLumen<T>) -> Self::Output {
408 Illuminance{lux: T::from(self) / rhs.m2_per_lm.clone()}
409 }
410}
411impl<T> core::ops::Div<&AreaPerLumen<T>> for &i32 where T: NumLike+From<i32> {
413 type Output = Illuminance<T>;
414 fn div(self, rhs: &AreaPerLumen<T>) -> Self::Output {
415 Illuminance{lux: T::from(self.clone()) / rhs.m2_per_lm.clone()}
416 }
417}
418
419#[cfg(feature="num-bigfloat")]
422impl<T> core::ops::Div<AreaPerLumen<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
423 type Output = Illuminance<T>;
424 fn div(self, rhs: AreaPerLumen<T>) -> Self::Output {
425 Illuminance{lux: T::from(self) / rhs.m2_per_lm}
426 }
427}
428#[cfg(feature="num-bigfloat")]
430impl<T> core::ops::Div<AreaPerLumen<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
431 type Output = Illuminance<T>;
432 fn div(self, rhs: AreaPerLumen<T>) -> Self::Output {
433 Illuminance{lux: T::from(self.clone()) / rhs.m2_per_lm}
434 }
435}
436#[cfg(feature="num-bigfloat")]
438impl<T> core::ops::Div<&AreaPerLumen<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
439 type Output = Illuminance<T>;
440 fn div(self, rhs: &AreaPerLumen<T>) -> Self::Output {
441 Illuminance{lux: T::from(self) / rhs.m2_per_lm.clone()}
442 }
443}
444#[cfg(feature="num-bigfloat")]
446impl<T> core::ops::Div<&AreaPerLumen<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
447 type Output = Illuminance<T>;
448 fn div(self, rhs: &AreaPerLumen<T>) -> Self::Output {
449 Illuminance{lux: T::from(self.clone()) / rhs.m2_per_lm.clone()}
450 }
451}
452
453#[cfg(feature="num-complex")]
456impl<T> core::ops::Div<AreaPerLumen<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
457 type Output = Illuminance<T>;
458 fn div(self, rhs: AreaPerLumen<T>) -> Self::Output {
459 Illuminance{lux: T::from(self) / rhs.m2_per_lm}
460 }
461}
462#[cfg(feature="num-complex")]
464impl<T> core::ops::Div<AreaPerLumen<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
465 type Output = Illuminance<T>;
466 fn div(self, rhs: AreaPerLumen<T>) -> Self::Output {
467 Illuminance{lux: T::from(self.clone()) / rhs.m2_per_lm}
468 }
469}
470#[cfg(feature="num-complex")]
472impl<T> core::ops::Div<&AreaPerLumen<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
473 type Output = Illuminance<T>;
474 fn div(self, rhs: &AreaPerLumen<T>) -> Self::Output {
475 Illuminance{lux: T::from(self) / rhs.m2_per_lm.clone()}
476 }
477}
478#[cfg(feature="num-complex")]
480impl<T> core::ops::Div<&AreaPerLumen<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
481 type Output = Illuminance<T>;
482 fn div(self, rhs: &AreaPerLumen<T>) -> Self::Output {
483 Illuminance{lux: T::from(self.clone()) / rhs.m2_per_lm.clone()}
484 }
485}
486
487#[cfg(feature="num-complex")]
490impl<T> core::ops::Div<AreaPerLumen<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
491 type Output = Illuminance<T>;
492 fn div(self, rhs: AreaPerLumen<T>) -> Self::Output {
493 Illuminance{lux: T::from(self) / rhs.m2_per_lm}
494 }
495}
496#[cfg(feature="num-complex")]
498impl<T> core::ops::Div<AreaPerLumen<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
499 type Output = Illuminance<T>;
500 fn div(self, rhs: AreaPerLumen<T>) -> Self::Output {
501 Illuminance{lux: T::from(self.clone()) / rhs.m2_per_lm}
502 }
503}
504#[cfg(feature="num-complex")]
506impl<T> core::ops::Div<&AreaPerLumen<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
507 type Output = Illuminance<T>;
508 fn div(self, rhs: &AreaPerLumen<T>) -> Self::Output {
509 Illuminance{lux: T::from(self) / rhs.m2_per_lm.clone()}
510 }
511}
512#[cfg(feature="num-complex")]
514impl<T> core::ops::Div<&AreaPerLumen<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
515 type Output = Illuminance<T>;
516 fn div(self, rhs: &AreaPerLumen<T>) -> Self::Output {
517 Illuminance{lux: T::from(self.clone()) / rhs.m2_per_lm.clone()}
518 }
519}
520
521#[derive(UnitStruct, Debug, Clone)]
523#[cfg_attr(feature="serde", derive(Serialize, Deserialize))]
524pub struct Capacitance<T: NumLike>{
525 pub F: T
527}
528
529impl<T> Capacitance<T> where T: NumLike {
530
531 pub fn unit_name() -> &'static str { "farads" }
533
534 pub fn unit_symbol() -> &'static str { "F" }
536
537 pub fn from_F(F: T) -> Self { Capacitance{F: F} }
542
543 pub fn to_F(&self) -> T { self.F.clone() }
545
546 pub fn from_farads(farads: T) -> Self { Capacitance{F: farads} }
551
552 pub fn to_farads(&self) -> T { self.F.clone() }
554
555}
556
557impl<T> fmt::Display for Capacitance<T> where T: NumLike {
558 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
559 write!(f, "{} {}", &self.F, Self::unit_symbol())
560 }
561}
562
563impl<T> Capacitance<T> where T: NumLike+From<f64> {
564
565 pub fn to_mF(&self) -> T {
569 return self.F.clone() * T::from(1000.0_f64);
570 }
571
572 pub fn from_mF(mF: T) -> Self {
579 Capacitance{F: mF * T::from(0.001_f64)}
580 }
581
582 pub fn to_uF(&self) -> T {
586 return self.F.clone() * T::from(1000000.0_f64);
587 }
588
589 pub fn from_uF(uF: T) -> Self {
596 Capacitance{F: uF * T::from(1e-06_f64)}
597 }
598
599 pub fn to_nF(&self) -> T {
603 return self.F.clone() * T::from(1000000000.0_f64);
604 }
605
606 pub fn from_nF(nF: T) -> Self {
613 Capacitance{F: nF * T::from(1e-09_f64)}
614 }
615
616 pub fn to_pF(&self) -> T {
620 return self.F.clone() * T::from(1000000000000.0_f64);
621 }
622
623 pub fn from_pF(pF: T) -> Self {
630 Capacitance{F: pF * T::from(1e-12_f64)}
631 }
632
633 pub fn to_kF(&self) -> T {
637 return self.F.clone() * T::from(0.001_f64);
638 }
639
640 pub fn from_kF(kF: T) -> Self {
647 Capacitance{F: kF * T::from(1000.0_f64)}
648 }
649
650 pub fn to_MF(&self) -> T {
654 return self.F.clone() * T::from(1e-06_f64);
655 }
656
657 pub fn from_MF(MF: T) -> Self {
664 Capacitance{F: MF * T::from(1000000.0_f64)}
665 }
666
667 pub fn to_GF(&self) -> T {
671 return self.F.clone() * T::from(1e-09_f64);
672 }
673
674 pub fn from_GF(GF: T) -> Self {
681 Capacitance{F: GF * T::from(1000000000.0_f64)}
682 }
683
684}
685
686
687#[cfg(feature="num-bigfloat")]
689impl core::ops::Mul<Capacitance<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
690 type Output = Capacitance<num_bigfloat::BigFloat>;
691 fn mul(self, rhs: Capacitance<num_bigfloat::BigFloat>) -> Self::Output {
692 Capacitance{F: self * rhs.F}
693 }
694}
695#[cfg(feature="num-bigfloat")]
697impl core::ops::Mul<Capacitance<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
698 type Output = Capacitance<num_bigfloat::BigFloat>;
699 fn mul(self, rhs: Capacitance<num_bigfloat::BigFloat>) -> Self::Output {
700 Capacitance{F: self.clone() * rhs.F}
701 }
702}
703#[cfg(feature="num-bigfloat")]
705impl core::ops::Mul<&Capacitance<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
706 type Output = Capacitance<num_bigfloat::BigFloat>;
707 fn mul(self, rhs: &Capacitance<num_bigfloat::BigFloat>) -> Self::Output {
708 Capacitance{F: self * rhs.F.clone()}
709 }
710}
711#[cfg(feature="num-bigfloat")]
713impl core::ops::Mul<&Capacitance<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
714 type Output = Capacitance<num_bigfloat::BigFloat>;
715 fn mul(self, rhs: &Capacitance<num_bigfloat::BigFloat>) -> Self::Output {
716 Capacitance{F: self.clone() * rhs.F.clone()}
717 }
718}
719
720#[cfg(feature="num-complex")]
722impl core::ops::Mul<Capacitance<num_complex::Complex32>> for num_complex::Complex32 {
723 type Output = Capacitance<num_complex::Complex32>;
724 fn mul(self, rhs: Capacitance<num_complex::Complex32>) -> Self::Output {
725 Capacitance{F: self * rhs.F}
726 }
727}
728#[cfg(feature="num-complex")]
730impl core::ops::Mul<Capacitance<num_complex::Complex32>> for &num_complex::Complex32 {
731 type Output = Capacitance<num_complex::Complex32>;
732 fn mul(self, rhs: Capacitance<num_complex::Complex32>) -> Self::Output {
733 Capacitance{F: self.clone() * rhs.F}
734 }
735}
736#[cfg(feature="num-complex")]
738impl core::ops::Mul<&Capacitance<num_complex::Complex32>> for num_complex::Complex32 {
739 type Output = Capacitance<num_complex::Complex32>;
740 fn mul(self, rhs: &Capacitance<num_complex::Complex32>) -> Self::Output {
741 Capacitance{F: self * rhs.F.clone()}
742 }
743}
744#[cfg(feature="num-complex")]
746impl core::ops::Mul<&Capacitance<num_complex::Complex32>> for &num_complex::Complex32 {
747 type Output = Capacitance<num_complex::Complex32>;
748 fn mul(self, rhs: &Capacitance<num_complex::Complex32>) -> Self::Output {
749 Capacitance{F: self.clone() * rhs.F.clone()}
750 }
751}
752
753#[cfg(feature="num-complex")]
755impl core::ops::Mul<Capacitance<num_complex::Complex64>> for num_complex::Complex64 {
756 type Output = Capacitance<num_complex::Complex64>;
757 fn mul(self, rhs: Capacitance<num_complex::Complex64>) -> Self::Output {
758 Capacitance{F: self * rhs.F}
759 }
760}
761#[cfg(feature="num-complex")]
763impl core::ops::Mul<Capacitance<num_complex::Complex64>> for &num_complex::Complex64 {
764 type Output = Capacitance<num_complex::Complex64>;
765 fn mul(self, rhs: Capacitance<num_complex::Complex64>) -> Self::Output {
766 Capacitance{F: self.clone() * rhs.F}
767 }
768}
769#[cfg(feature="num-complex")]
771impl core::ops::Mul<&Capacitance<num_complex::Complex64>> for num_complex::Complex64 {
772 type Output = Capacitance<num_complex::Complex64>;
773 fn mul(self, rhs: &Capacitance<num_complex::Complex64>) -> Self::Output {
774 Capacitance{F: self * rhs.F.clone()}
775 }
776}
777#[cfg(feature="num-complex")]
779impl core::ops::Mul<&Capacitance<num_complex::Complex64>> for &num_complex::Complex64 {
780 type Output = Capacitance<num_complex::Complex64>;
781 fn mul(self, rhs: &Capacitance<num_complex::Complex64>) -> Self::Output {
782 Capacitance{F: self.clone() * rhs.F.clone()}
783 }
784}
785
786
787
788#[cfg(feature = "uom")]
790impl<T> Into<uom::si::f32::Capacitance> for Capacitance<T> where T: NumLike+Into<f32> {
791 fn into(self) -> uom::si::f32::Capacitance {
792 uom::si::f32::Capacitance::new::<uom::si::capacitance::farad>(self.F.into())
793 }
794}
795
796#[cfg(feature = "uom")]
798impl<T> From<uom::si::f32::Capacitance> for Capacitance<T> where T: NumLike+From<f32> {
799 fn from(src: uom::si::f32::Capacitance) -> Self {
800 Capacitance{F: T::from(src.value)}
801 }
802}
803
804#[cfg(feature = "uom")]
806impl<T> Into<uom::si::f64::Capacitance> for Capacitance<T> where T: NumLike+Into<f64> {
807 fn into(self) -> uom::si::f64::Capacitance {
808 uom::si::f64::Capacitance::new::<uom::si::capacitance::farad>(self.F.into())
809 }
810}
811
812#[cfg(feature = "uom")]
814impl<T> From<uom::si::f64::Capacitance> for Capacitance<T> where T: NumLike+From<f64> {
815 fn from(src: uom::si::f64::Capacitance) -> Self {
816 Capacitance{F: T::from(src.value)}
817 }
818}
819
820
821impl<T> core::ops::Div<Time<T>> for Capacitance<T> where T: NumLike {
824 type Output = Conductance<T>;
825 fn div(self, rhs: Time<T>) -> Self::Output {
826 Conductance{S: self.F / rhs.s}
827 }
828}
829impl<T> core::ops::Div<Time<T>> for &Capacitance<T> where T: NumLike {
831 type Output = Conductance<T>;
832 fn div(self, rhs: Time<T>) -> Self::Output {
833 Conductance{S: self.F.clone() / rhs.s}
834 }
835}
836impl<T> core::ops::Div<&Time<T>> for Capacitance<T> where T: NumLike {
838 type Output = Conductance<T>;
839 fn div(self, rhs: &Time<T>) -> Self::Output {
840 Conductance{S: self.F / rhs.s.clone()}
841 }
842}
843impl<T> core::ops::Div<&Time<T>> for &Capacitance<T> where T: NumLike {
845 type Output = Conductance<T>;
846 fn div(self, rhs: &Time<T>) -> Self::Output {
847 Conductance{S: self.F.clone() / rhs.s.clone()}
848 }
849}
850
851impl<T> core::ops::Div<Charge<T>> for Capacitance<T> where T: NumLike {
854 type Output = InverseVoltage<T>;
855 fn div(self, rhs: Charge<T>) -> Self::Output {
856 InverseVoltage{per_V: self.F / rhs.C}
857 }
858}
859impl<T> core::ops::Div<Charge<T>> for &Capacitance<T> where T: NumLike {
861 type Output = InverseVoltage<T>;
862 fn div(self, rhs: Charge<T>) -> Self::Output {
863 InverseVoltage{per_V: self.F.clone() / rhs.C}
864 }
865}
866impl<T> core::ops::Div<&Charge<T>> for Capacitance<T> where T: NumLike {
868 type Output = InverseVoltage<T>;
869 fn div(self, rhs: &Charge<T>) -> Self::Output {
870 InverseVoltage{per_V: self.F / rhs.C.clone()}
871 }
872}
873impl<T> core::ops::Div<&Charge<T>> for &Capacitance<T> where T: NumLike {
875 type Output = InverseVoltage<T>;
876 fn div(self, rhs: &Charge<T>) -> Self::Output {
877 InverseVoltage{per_V: self.F.clone() / rhs.C.clone()}
878 }
879}
880
881impl<T> core::ops::Div<Conductance<T>> for Capacitance<T> where T: NumLike {
884 type Output = Time<T>;
885 fn div(self, rhs: Conductance<T>) -> Self::Output {
886 Time{s: self.F / rhs.S}
887 }
888}
889impl<T> core::ops::Div<Conductance<T>> for &Capacitance<T> where T: NumLike {
891 type Output = Time<T>;
892 fn div(self, rhs: Conductance<T>) -> Self::Output {
893 Time{s: self.F.clone() / rhs.S}
894 }
895}
896impl<T> core::ops::Div<&Conductance<T>> for Capacitance<T> where T: NumLike {
898 type Output = Time<T>;
899 fn div(self, rhs: &Conductance<T>) -> Self::Output {
900 Time{s: self.F / rhs.S.clone()}
901 }
902}
903impl<T> core::ops::Div<&Conductance<T>> for &Capacitance<T> where T: NumLike {
905 type Output = Time<T>;
906 fn div(self, rhs: &Conductance<T>) -> Self::Output {
907 Time{s: self.F.clone() / rhs.S.clone()}
908 }
909}
910
911impl<T> core::ops::Mul<InverseCharge<T>> for Capacitance<T> where T: NumLike {
914 type Output = InverseVoltage<T>;
915 fn mul(self, rhs: InverseCharge<T>) -> Self::Output {
916 InverseVoltage{per_V: self.F * rhs.per_C}
917 }
918}
919impl<T> core::ops::Mul<InverseCharge<T>> for &Capacitance<T> where T: NumLike {
921 type Output = InverseVoltage<T>;
922 fn mul(self, rhs: InverseCharge<T>) -> Self::Output {
923 InverseVoltage{per_V: self.F.clone() * rhs.per_C}
924 }
925}
926impl<T> core::ops::Mul<&InverseCharge<T>> for Capacitance<T> where T: NumLike {
928 type Output = InverseVoltage<T>;
929 fn mul(self, rhs: &InverseCharge<T>) -> Self::Output {
930 InverseVoltage{per_V: self.F * rhs.per_C.clone()}
931 }
932}
933impl<T> core::ops::Mul<&InverseCharge<T>> for &Capacitance<T> where T: NumLike {
935 type Output = InverseVoltage<T>;
936 fn mul(self, rhs: &InverseCharge<T>) -> Self::Output {
937 InverseVoltage{per_V: self.F.clone() * rhs.per_C.clone()}
938 }
939}
940
941impl<T> core::ops::Div<InverseVoltage<T>> for Capacitance<T> where T: NumLike {
944 type Output = Charge<T>;
945 fn div(self, rhs: InverseVoltage<T>) -> Self::Output {
946 Charge{C: self.F / rhs.per_V}
947 }
948}
949impl<T> core::ops::Div<InverseVoltage<T>> for &Capacitance<T> where T: NumLike {
951 type Output = Charge<T>;
952 fn div(self, rhs: InverseVoltage<T>) -> Self::Output {
953 Charge{C: self.F.clone() / rhs.per_V}
954 }
955}
956impl<T> core::ops::Div<&InverseVoltage<T>> for Capacitance<T> where T: NumLike {
958 type Output = Charge<T>;
959 fn div(self, rhs: &InverseVoltage<T>) -> Self::Output {
960 Charge{C: self.F / rhs.per_V.clone()}
961 }
962}
963impl<T> core::ops::Div<&InverseVoltage<T>> for &Capacitance<T> where T: NumLike {
965 type Output = Charge<T>;
966 fn div(self, rhs: &InverseVoltage<T>) -> Self::Output {
967 Charge{C: self.F.clone() / rhs.per_V.clone()}
968 }
969}
970
971impl<T> core::ops::Mul<Resistance<T>> for Capacitance<T> where T: NumLike {
974 type Output = Time<T>;
975 fn mul(self, rhs: Resistance<T>) -> Self::Output {
976 Time{s: self.F * rhs.Ohm}
977 }
978}
979impl<T> core::ops::Mul<Resistance<T>> for &Capacitance<T> where T: NumLike {
981 type Output = Time<T>;
982 fn mul(self, rhs: Resistance<T>) -> Self::Output {
983 Time{s: self.F.clone() * rhs.Ohm}
984 }
985}
986impl<T> core::ops::Mul<&Resistance<T>> for Capacitance<T> where T: NumLike {
988 type Output = Time<T>;
989 fn mul(self, rhs: &Resistance<T>) -> Self::Output {
990 Time{s: self.F * rhs.Ohm.clone()}
991 }
992}
993impl<T> core::ops::Mul<&Resistance<T>> for &Capacitance<T> where T: NumLike {
995 type Output = Time<T>;
996 fn mul(self, rhs: &Resistance<T>) -> Self::Output {
997 Time{s: self.F.clone() * rhs.Ohm.clone()}
998 }
999}
1000
1001impl<T> core::ops::Mul<Voltage<T>> for Capacitance<T> where T: NumLike {
1004 type Output = Charge<T>;
1005 fn mul(self, rhs: Voltage<T>) -> Self::Output {
1006 Charge{C: self.F * rhs.V}
1007 }
1008}
1009impl<T> core::ops::Mul<Voltage<T>> for &Capacitance<T> where T: NumLike {
1011 type Output = Charge<T>;
1012 fn mul(self, rhs: Voltage<T>) -> Self::Output {
1013 Charge{C: self.F.clone() * rhs.V}
1014 }
1015}
1016impl<T> core::ops::Mul<&Voltage<T>> for Capacitance<T> where T: NumLike {
1018 type Output = Charge<T>;
1019 fn mul(self, rhs: &Voltage<T>) -> Self::Output {
1020 Charge{C: self.F * rhs.V.clone()}
1021 }
1022}
1023impl<T> core::ops::Mul<&Voltage<T>> for &Capacitance<T> where T: NumLike {
1025 type Output = Charge<T>;
1026 fn mul(self, rhs: &Voltage<T>) -> Self::Output {
1027 Charge{C: self.F.clone() * rhs.V.clone()}
1028 }
1029}
1030
1031impl<T> core::ops::Mul<Frequency<T>> for Capacitance<T> where T: NumLike {
1034 type Output = Conductance<T>;
1035 fn mul(self, rhs: Frequency<T>) -> Self::Output {
1036 Conductance{S: self.F * rhs.Hz}
1037 }
1038}
1039impl<T> core::ops::Mul<Frequency<T>> for &Capacitance<T> where T: NumLike {
1041 type Output = Conductance<T>;
1042 fn mul(self, rhs: Frequency<T>) -> Self::Output {
1043 Conductance{S: self.F.clone() * rhs.Hz}
1044 }
1045}
1046impl<T> core::ops::Mul<&Frequency<T>> for Capacitance<T> where T: NumLike {
1048 type Output = Conductance<T>;
1049 fn mul(self, rhs: &Frequency<T>) -> Self::Output {
1050 Conductance{S: self.F * rhs.Hz.clone()}
1051 }
1052}
1053impl<T> core::ops::Mul<&Frequency<T>> for &Capacitance<T> where T: NumLike {
1055 type Output = Conductance<T>;
1056 fn mul(self, rhs: &Frequency<T>) -> Self::Output {
1057 Conductance{S: self.F.clone() * rhs.Hz.clone()}
1058 }
1059}
1060
1061impl<T> core::ops::Div<Capacitance<T>> for f64 where T: NumLike+From<f64> {
1064 type Output = Elastance<T>;
1065 fn div(self, rhs: Capacitance<T>) -> Self::Output {
1066 Elastance{per_F: T::from(self) / rhs.F}
1067 }
1068}
1069impl<T> core::ops::Div<Capacitance<T>> for &f64 where T: NumLike+From<f64> {
1071 type Output = Elastance<T>;
1072 fn div(self, rhs: Capacitance<T>) -> Self::Output {
1073 Elastance{per_F: T::from(self.clone()) / rhs.F}
1074 }
1075}
1076impl<T> core::ops::Div<&Capacitance<T>> for f64 where T: NumLike+From<f64> {
1078 type Output = Elastance<T>;
1079 fn div(self, rhs: &Capacitance<T>) -> Self::Output {
1080 Elastance{per_F: T::from(self) / rhs.F.clone()}
1081 }
1082}
1083impl<T> core::ops::Div<&Capacitance<T>> for &f64 where T: NumLike+From<f64> {
1085 type Output = Elastance<T>;
1086 fn div(self, rhs: &Capacitance<T>) -> Self::Output {
1087 Elastance{per_F: T::from(self.clone()) / rhs.F.clone()}
1088 }
1089}
1090
1091impl<T> core::ops::Div<Capacitance<T>> for f32 where T: NumLike+From<f32> {
1094 type Output = Elastance<T>;
1095 fn div(self, rhs: Capacitance<T>) -> Self::Output {
1096 Elastance{per_F: T::from(self) / rhs.F}
1097 }
1098}
1099impl<T> core::ops::Div<Capacitance<T>> for &f32 where T: NumLike+From<f32> {
1101 type Output = Elastance<T>;
1102 fn div(self, rhs: Capacitance<T>) -> Self::Output {
1103 Elastance{per_F: T::from(self.clone()) / rhs.F}
1104 }
1105}
1106impl<T> core::ops::Div<&Capacitance<T>> for f32 where T: NumLike+From<f32> {
1108 type Output = Elastance<T>;
1109 fn div(self, rhs: &Capacitance<T>) -> Self::Output {
1110 Elastance{per_F: T::from(self) / rhs.F.clone()}
1111 }
1112}
1113impl<T> core::ops::Div<&Capacitance<T>> for &f32 where T: NumLike+From<f32> {
1115 type Output = Elastance<T>;
1116 fn div(self, rhs: &Capacitance<T>) -> Self::Output {
1117 Elastance{per_F: T::from(self.clone()) / rhs.F.clone()}
1118 }
1119}
1120
1121impl<T> core::ops::Div<Capacitance<T>> for i64 where T: NumLike+From<i64> {
1124 type Output = Elastance<T>;
1125 fn div(self, rhs: Capacitance<T>) -> Self::Output {
1126 Elastance{per_F: T::from(self) / rhs.F}
1127 }
1128}
1129impl<T> core::ops::Div<Capacitance<T>> for &i64 where T: NumLike+From<i64> {
1131 type Output = Elastance<T>;
1132 fn div(self, rhs: Capacitance<T>) -> Self::Output {
1133 Elastance{per_F: T::from(self.clone()) / rhs.F}
1134 }
1135}
1136impl<T> core::ops::Div<&Capacitance<T>> for i64 where T: NumLike+From<i64> {
1138 type Output = Elastance<T>;
1139 fn div(self, rhs: &Capacitance<T>) -> Self::Output {
1140 Elastance{per_F: T::from(self) / rhs.F.clone()}
1141 }
1142}
1143impl<T> core::ops::Div<&Capacitance<T>> for &i64 where T: NumLike+From<i64> {
1145 type Output = Elastance<T>;
1146 fn div(self, rhs: &Capacitance<T>) -> Self::Output {
1147 Elastance{per_F: T::from(self.clone()) / rhs.F.clone()}
1148 }
1149}
1150
1151impl<T> core::ops::Div<Capacitance<T>> for i32 where T: NumLike+From<i32> {
1154 type Output = Elastance<T>;
1155 fn div(self, rhs: Capacitance<T>) -> Self::Output {
1156 Elastance{per_F: T::from(self) / rhs.F}
1157 }
1158}
1159impl<T> core::ops::Div<Capacitance<T>> for &i32 where T: NumLike+From<i32> {
1161 type Output = Elastance<T>;
1162 fn div(self, rhs: Capacitance<T>) -> Self::Output {
1163 Elastance{per_F: T::from(self.clone()) / rhs.F}
1164 }
1165}
1166impl<T> core::ops::Div<&Capacitance<T>> for i32 where T: NumLike+From<i32> {
1168 type Output = Elastance<T>;
1169 fn div(self, rhs: &Capacitance<T>) -> Self::Output {
1170 Elastance{per_F: T::from(self) / rhs.F.clone()}
1171 }
1172}
1173impl<T> core::ops::Div<&Capacitance<T>> for &i32 where T: NumLike+From<i32> {
1175 type Output = Elastance<T>;
1176 fn div(self, rhs: &Capacitance<T>) -> Self::Output {
1177 Elastance{per_F: T::from(self.clone()) / rhs.F.clone()}
1178 }
1179}
1180
1181#[cfg(feature="num-bigfloat")]
1184impl<T> core::ops::Div<Capacitance<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
1185 type Output = Elastance<T>;
1186 fn div(self, rhs: Capacitance<T>) -> Self::Output {
1187 Elastance{per_F: T::from(self) / rhs.F}
1188 }
1189}
1190#[cfg(feature="num-bigfloat")]
1192impl<T> core::ops::Div<Capacitance<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
1193 type Output = Elastance<T>;
1194 fn div(self, rhs: Capacitance<T>) -> Self::Output {
1195 Elastance{per_F: T::from(self.clone()) / rhs.F}
1196 }
1197}
1198#[cfg(feature="num-bigfloat")]
1200impl<T> core::ops::Div<&Capacitance<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
1201 type Output = Elastance<T>;
1202 fn div(self, rhs: &Capacitance<T>) -> Self::Output {
1203 Elastance{per_F: T::from(self) / rhs.F.clone()}
1204 }
1205}
1206#[cfg(feature="num-bigfloat")]
1208impl<T> core::ops::Div<&Capacitance<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
1209 type Output = Elastance<T>;
1210 fn div(self, rhs: &Capacitance<T>) -> Self::Output {
1211 Elastance{per_F: T::from(self.clone()) / rhs.F.clone()}
1212 }
1213}
1214
1215#[cfg(feature="num-complex")]
1218impl<T> core::ops::Div<Capacitance<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
1219 type Output = Elastance<T>;
1220 fn div(self, rhs: Capacitance<T>) -> Self::Output {
1221 Elastance{per_F: T::from(self) / rhs.F}
1222 }
1223}
1224#[cfg(feature="num-complex")]
1226impl<T> core::ops::Div<Capacitance<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
1227 type Output = Elastance<T>;
1228 fn div(self, rhs: Capacitance<T>) -> Self::Output {
1229 Elastance{per_F: T::from(self.clone()) / rhs.F}
1230 }
1231}
1232#[cfg(feature="num-complex")]
1234impl<T> core::ops::Div<&Capacitance<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
1235 type Output = Elastance<T>;
1236 fn div(self, rhs: &Capacitance<T>) -> Self::Output {
1237 Elastance{per_F: T::from(self) / rhs.F.clone()}
1238 }
1239}
1240#[cfg(feature="num-complex")]
1242impl<T> core::ops::Div<&Capacitance<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
1243 type Output = Elastance<T>;
1244 fn div(self, rhs: &Capacitance<T>) -> Self::Output {
1245 Elastance{per_F: T::from(self.clone()) / rhs.F.clone()}
1246 }
1247}
1248
1249#[cfg(feature="num-complex")]
1252impl<T> core::ops::Div<Capacitance<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
1253 type Output = Elastance<T>;
1254 fn div(self, rhs: Capacitance<T>) -> Self::Output {
1255 Elastance{per_F: T::from(self) / rhs.F}
1256 }
1257}
1258#[cfg(feature="num-complex")]
1260impl<T> core::ops::Div<Capacitance<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
1261 type Output = Elastance<T>;
1262 fn div(self, rhs: Capacitance<T>) -> Self::Output {
1263 Elastance{per_F: T::from(self.clone()) / rhs.F}
1264 }
1265}
1266#[cfg(feature="num-complex")]
1268impl<T> core::ops::Div<&Capacitance<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
1269 type Output = Elastance<T>;
1270 fn div(self, rhs: &Capacitance<T>) -> Self::Output {
1271 Elastance{per_F: T::from(self) / rhs.F.clone()}
1272 }
1273}
1274#[cfg(feature="num-complex")]
1276impl<T> core::ops::Div<&Capacitance<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
1277 type Output = Elastance<T>;
1278 fn div(self, rhs: &Capacitance<T>) -> Self::Output {
1279 Elastance{per_F: T::from(self.clone()) / rhs.F.clone()}
1280 }
1281}
1282
1283#[derive(UnitStruct, Debug, Clone)]
1285#[cfg_attr(feature="serde", derive(Serialize, Deserialize))]
1286pub struct Charge<T: NumLike>{
1287 pub C: T
1289}
1290
1291impl<T> Charge<T> where T: NumLike {
1292
1293 pub fn unit_name() -> &'static str { "coulombs" }
1295
1296 pub fn unit_symbol() -> &'static str { "C" }
1298
1299 pub fn from_C(C: T) -> Self { Charge{C: C} }
1304
1305 pub fn to_C(&self) -> T { self.C.clone() }
1307
1308 pub fn from_coulombs(coulombs: T) -> Self { Charge{C: coulombs} }
1313
1314 pub fn to_coulombs(&self) -> T { self.C.clone() }
1316
1317}
1318
1319impl<T> fmt::Display for Charge<T> where T: NumLike {
1320 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
1321 write!(f, "{} {}", &self.C, Self::unit_symbol())
1322 }
1323}
1324
1325impl<T> Charge<T> where T: NumLike+From<f64> {
1326
1327 pub fn to_mC(&self) -> T {
1331 return self.C.clone() * T::from(1000.0_f64);
1332 }
1333
1334 pub fn from_mC(mC: T) -> Self {
1341 Charge{C: mC * T::from(0.001_f64)}
1342 }
1343
1344 pub fn to_uC(&self) -> T {
1348 return self.C.clone() * T::from(1000000.0_f64);
1349 }
1350
1351 pub fn from_uC(uC: T) -> Self {
1358 Charge{C: uC * T::from(1e-06_f64)}
1359 }
1360
1361 pub fn to_nC(&self) -> T {
1365 return self.C.clone() * T::from(1000000000.0_f64);
1366 }
1367
1368 pub fn from_nC(nC: T) -> Self {
1375 Charge{C: nC * T::from(1e-09_f64)}
1376 }
1377
1378 pub fn to_kC(&self) -> T {
1382 return self.C.clone() * T::from(0.001_f64);
1383 }
1384
1385 pub fn from_kC(kC: T) -> Self {
1392 Charge{C: kC * T::from(1000.0_f64)}
1393 }
1394
1395 pub fn to_MC(&self) -> T {
1399 return self.C.clone() * T::from(1e-06_f64);
1400 }
1401
1402 pub fn from_MC(MC: T) -> Self {
1409 Charge{C: MC * T::from(1000000.0_f64)}
1410 }
1411
1412 pub fn to_GC(&self) -> T {
1416 return self.C.clone() * T::from(1e-09_f64);
1417 }
1418
1419 pub fn from_GC(GC: T) -> Self {
1426 Charge{C: GC * T::from(1000000000.0_f64)}
1427 }
1428
1429 pub fn to_p(&self) -> T {
1433 return self.C.clone() * T::from(6.24150907446076e+18_f64);
1434 }
1435
1436 pub fn from_p(p: T) -> Self {
1443 Charge{C: p * T::from(1.6021766340000001e-19_f64)}
1444 }
1445
1446 pub fn to_e(&self) -> T {
1450 return self.C.clone() * T::from(-6.24150907446076e+18_f64);
1451 }
1452
1453 pub fn from_e(e: T) -> Self {
1460 Charge{C: e * T::from(-1.6021766340000001e-19_f64)}
1461 }
1462
1463}
1464
1465
1466#[cfg(feature="num-bigfloat")]
1468impl core::ops::Mul<Charge<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
1469 type Output = Charge<num_bigfloat::BigFloat>;
1470 fn mul(self, rhs: Charge<num_bigfloat::BigFloat>) -> Self::Output {
1471 Charge{C: self * rhs.C}
1472 }
1473}
1474#[cfg(feature="num-bigfloat")]
1476impl core::ops::Mul<Charge<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
1477 type Output = Charge<num_bigfloat::BigFloat>;
1478 fn mul(self, rhs: Charge<num_bigfloat::BigFloat>) -> Self::Output {
1479 Charge{C: self.clone() * rhs.C}
1480 }
1481}
1482#[cfg(feature="num-bigfloat")]
1484impl core::ops::Mul<&Charge<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
1485 type Output = Charge<num_bigfloat::BigFloat>;
1486 fn mul(self, rhs: &Charge<num_bigfloat::BigFloat>) -> Self::Output {
1487 Charge{C: self * rhs.C.clone()}
1488 }
1489}
1490#[cfg(feature="num-bigfloat")]
1492impl core::ops::Mul<&Charge<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
1493 type Output = Charge<num_bigfloat::BigFloat>;
1494 fn mul(self, rhs: &Charge<num_bigfloat::BigFloat>) -> Self::Output {
1495 Charge{C: self.clone() * rhs.C.clone()}
1496 }
1497}
1498
1499#[cfg(feature="num-complex")]
1501impl core::ops::Mul<Charge<num_complex::Complex32>> for num_complex::Complex32 {
1502 type Output = Charge<num_complex::Complex32>;
1503 fn mul(self, rhs: Charge<num_complex::Complex32>) -> Self::Output {
1504 Charge{C: self * rhs.C}
1505 }
1506}
1507#[cfg(feature="num-complex")]
1509impl core::ops::Mul<Charge<num_complex::Complex32>> for &num_complex::Complex32 {
1510 type Output = Charge<num_complex::Complex32>;
1511 fn mul(self, rhs: Charge<num_complex::Complex32>) -> Self::Output {
1512 Charge{C: self.clone() * rhs.C}
1513 }
1514}
1515#[cfg(feature="num-complex")]
1517impl core::ops::Mul<&Charge<num_complex::Complex32>> for num_complex::Complex32 {
1518 type Output = Charge<num_complex::Complex32>;
1519 fn mul(self, rhs: &Charge<num_complex::Complex32>) -> Self::Output {
1520 Charge{C: self * rhs.C.clone()}
1521 }
1522}
1523#[cfg(feature="num-complex")]
1525impl core::ops::Mul<&Charge<num_complex::Complex32>> for &num_complex::Complex32 {
1526 type Output = Charge<num_complex::Complex32>;
1527 fn mul(self, rhs: &Charge<num_complex::Complex32>) -> Self::Output {
1528 Charge{C: self.clone() * rhs.C.clone()}
1529 }
1530}
1531
1532#[cfg(feature="num-complex")]
1534impl core::ops::Mul<Charge<num_complex::Complex64>> for num_complex::Complex64 {
1535 type Output = Charge<num_complex::Complex64>;
1536 fn mul(self, rhs: Charge<num_complex::Complex64>) -> Self::Output {
1537 Charge{C: self * rhs.C}
1538 }
1539}
1540#[cfg(feature="num-complex")]
1542impl core::ops::Mul<Charge<num_complex::Complex64>> for &num_complex::Complex64 {
1543 type Output = Charge<num_complex::Complex64>;
1544 fn mul(self, rhs: Charge<num_complex::Complex64>) -> Self::Output {
1545 Charge{C: self.clone() * rhs.C}
1546 }
1547}
1548#[cfg(feature="num-complex")]
1550impl core::ops::Mul<&Charge<num_complex::Complex64>> for num_complex::Complex64 {
1551 type Output = Charge<num_complex::Complex64>;
1552 fn mul(self, rhs: &Charge<num_complex::Complex64>) -> Self::Output {
1553 Charge{C: self * rhs.C.clone()}
1554 }
1555}
1556#[cfg(feature="num-complex")]
1558impl core::ops::Mul<&Charge<num_complex::Complex64>> for &num_complex::Complex64 {
1559 type Output = Charge<num_complex::Complex64>;
1560 fn mul(self, rhs: &Charge<num_complex::Complex64>) -> Self::Output {
1561 Charge{C: self.clone() * rhs.C.clone()}
1562 }
1563}
1564
1565
1566
1567#[cfg(feature = "uom")]
1569impl<T> Into<uom::si::f32::ElectricCharge> for Charge<T> where T: NumLike+Into<f32> {
1570 fn into(self) -> uom::si::f32::ElectricCharge {
1571 uom::si::f32::ElectricCharge::new::<uom::si::electric_charge::coulomb>(self.C.into())
1572 }
1573}
1574
1575#[cfg(feature = "uom")]
1577impl<T> From<uom::si::f32::ElectricCharge> for Charge<T> where T: NumLike+From<f32> {
1578 fn from(src: uom::si::f32::ElectricCharge) -> Self {
1579 Charge{C: T::from(src.value)}
1580 }
1581}
1582
1583#[cfg(feature = "uom")]
1585impl<T> Into<uom::si::f64::ElectricCharge> for Charge<T> where T: NumLike+Into<f64> {
1586 fn into(self) -> uom::si::f64::ElectricCharge {
1587 uom::si::f64::ElectricCharge::new::<uom::si::electric_charge::coulomb>(self.C.into())
1588 }
1589}
1590
1591#[cfg(feature = "uom")]
1593impl<T> From<uom::si::f64::ElectricCharge> for Charge<T> where T: NumLike+From<f64> {
1594 fn from(src: uom::si::f64::ElectricCharge) -> Self {
1595 Charge{C: T::from(src.value)}
1596 }
1597}
1598
1599
1600impl<T> core::ops::Div<Current<T>> for Charge<T> where T: NumLike {
1603 type Output = Time<T>;
1604 fn div(self, rhs: Current<T>) -> Self::Output {
1605 Time{s: self.C / rhs.A}
1606 }
1607}
1608impl<T> core::ops::Div<Current<T>> for &Charge<T> where T: NumLike {
1610 type Output = Time<T>;
1611 fn div(self, rhs: Current<T>) -> Self::Output {
1612 Time{s: self.C.clone() / rhs.A}
1613 }
1614}
1615impl<T> core::ops::Div<&Current<T>> for Charge<T> where T: NumLike {
1617 type Output = Time<T>;
1618 fn div(self, rhs: &Current<T>) -> Self::Output {
1619 Time{s: self.C / rhs.A.clone()}
1620 }
1621}
1622impl<T> core::ops::Div<&Current<T>> for &Charge<T> where T: NumLike {
1624 type Output = Time<T>;
1625 fn div(self, rhs: &Current<T>) -> Self::Output {
1626 Time{s: self.C.clone() / rhs.A.clone()}
1627 }
1628}
1629
1630impl<T> core::ops::Mul<InverseCurrent<T>> for Charge<T> where T: NumLike {
1633 type Output = Time<T>;
1634 fn mul(self, rhs: InverseCurrent<T>) -> Self::Output {
1635 Time{s: self.C * rhs.per_A}
1636 }
1637}
1638impl<T> core::ops::Mul<InverseCurrent<T>> for &Charge<T> where T: NumLike {
1640 type Output = Time<T>;
1641 fn mul(self, rhs: InverseCurrent<T>) -> Self::Output {
1642 Time{s: self.C.clone() * rhs.per_A}
1643 }
1644}
1645impl<T> core::ops::Mul<&InverseCurrent<T>> for Charge<T> where T: NumLike {
1647 type Output = Time<T>;
1648 fn mul(self, rhs: &InverseCurrent<T>) -> Self::Output {
1649 Time{s: self.C * rhs.per_A.clone()}
1650 }
1651}
1652impl<T> core::ops::Mul<&InverseCurrent<T>> for &Charge<T> where T: NumLike {
1654 type Output = Time<T>;
1655 fn mul(self, rhs: &InverseCurrent<T>) -> Self::Output {
1656 Time{s: self.C.clone() * rhs.per_A.clone()}
1657 }
1658}
1659
1660impl<T> core::ops::Div<Time<T>> for Charge<T> where T: NumLike {
1663 type Output = Current<T>;
1664 fn div(self, rhs: Time<T>) -> Self::Output {
1665 Current{A: self.C / rhs.s}
1666 }
1667}
1668impl<T> core::ops::Div<Time<T>> for &Charge<T> where T: NumLike {
1670 type Output = Current<T>;
1671 fn div(self, rhs: Time<T>) -> Self::Output {
1672 Current{A: self.C.clone() / rhs.s}
1673 }
1674}
1675impl<T> core::ops::Div<&Time<T>> for Charge<T> where T: NumLike {
1677 type Output = Current<T>;
1678 fn div(self, rhs: &Time<T>) -> Self::Output {
1679 Current{A: self.C / rhs.s.clone()}
1680 }
1681}
1682impl<T> core::ops::Div<&Time<T>> for &Charge<T> where T: NumLike {
1684 type Output = Current<T>;
1685 fn div(self, rhs: &Time<T>) -> Self::Output {
1686 Current{A: self.C.clone() / rhs.s.clone()}
1687 }
1688}
1689
1690impl<T> core::ops::Div<Capacitance<T>> for Charge<T> where T: NumLike {
1693 type Output = Voltage<T>;
1694 fn div(self, rhs: Capacitance<T>) -> Self::Output {
1695 Voltage{V: self.C / rhs.F}
1696 }
1697}
1698impl<T> core::ops::Div<Capacitance<T>> for &Charge<T> where T: NumLike {
1700 type Output = Voltage<T>;
1701 fn div(self, rhs: Capacitance<T>) -> Self::Output {
1702 Voltage{V: self.C.clone() / rhs.F}
1703 }
1704}
1705impl<T> core::ops::Div<&Capacitance<T>> for Charge<T> where T: NumLike {
1707 type Output = Voltage<T>;
1708 fn div(self, rhs: &Capacitance<T>) -> Self::Output {
1709 Voltage{V: self.C / rhs.F.clone()}
1710 }
1711}
1712impl<T> core::ops::Div<&Capacitance<T>> for &Charge<T> where T: NumLike {
1714 type Output = Voltage<T>;
1715 fn div(self, rhs: &Capacitance<T>) -> Self::Output {
1716 Voltage{V: self.C.clone() / rhs.F.clone()}
1717 }
1718}
1719
1720impl<T> core::ops::Div<Conductance<T>> for Charge<T> where T: NumLike {
1723 type Output = MagneticFlux<T>;
1724 fn div(self, rhs: Conductance<T>) -> Self::Output {
1725 MagneticFlux{Wb: self.C / rhs.S}
1726 }
1727}
1728impl<T> core::ops::Div<Conductance<T>> for &Charge<T> where T: NumLike {
1730 type Output = MagneticFlux<T>;
1731 fn div(self, rhs: Conductance<T>) -> Self::Output {
1732 MagneticFlux{Wb: self.C.clone() / rhs.S}
1733 }
1734}
1735impl<T> core::ops::Div<&Conductance<T>> for Charge<T> where T: NumLike {
1737 type Output = MagneticFlux<T>;
1738 fn div(self, rhs: &Conductance<T>) -> Self::Output {
1739 MagneticFlux{Wb: self.C / rhs.S.clone()}
1740 }
1741}
1742impl<T> core::ops::Div<&Conductance<T>> for &Charge<T> where T: NumLike {
1744 type Output = MagneticFlux<T>;
1745 fn div(self, rhs: &Conductance<T>) -> Self::Output {
1746 MagneticFlux{Wb: self.C.clone() / rhs.S.clone()}
1747 }
1748}
1749
1750impl<T> core::ops::Mul<Elastance<T>> for Charge<T> where T: NumLike {
1753 type Output = Voltage<T>;
1754 fn mul(self, rhs: Elastance<T>) -> Self::Output {
1755 Voltage{V: self.C * rhs.per_F}
1756 }
1757}
1758impl<T> core::ops::Mul<Elastance<T>> for &Charge<T> where T: NumLike {
1760 type Output = Voltage<T>;
1761 fn mul(self, rhs: Elastance<T>) -> Self::Output {
1762 Voltage{V: self.C.clone() * rhs.per_F}
1763 }
1764}
1765impl<T> core::ops::Mul<&Elastance<T>> for Charge<T> where T: NumLike {
1767 type Output = Voltage<T>;
1768 fn mul(self, rhs: &Elastance<T>) -> Self::Output {
1769 Voltage{V: self.C * rhs.per_F.clone()}
1770 }
1771}
1772impl<T> core::ops::Mul<&Elastance<T>> for &Charge<T> where T: NumLike {
1774 type Output = Voltage<T>;
1775 fn mul(self, rhs: &Elastance<T>) -> Self::Output {
1776 Voltage{V: self.C.clone() * rhs.per_F.clone()}
1777 }
1778}
1779
1780impl<T> core::ops::Mul<InverseMagneticFlux<T>> for Charge<T> where T: NumLike {
1783 type Output = Conductance<T>;
1784 fn mul(self, rhs: InverseMagneticFlux<T>) -> Self::Output {
1785 Conductance{S: self.C * rhs.per_Wb}
1786 }
1787}
1788impl<T> core::ops::Mul<InverseMagneticFlux<T>> for &Charge<T> where T: NumLike {
1790 type Output = Conductance<T>;
1791 fn mul(self, rhs: InverseMagneticFlux<T>) -> Self::Output {
1792 Conductance{S: self.C.clone() * rhs.per_Wb}
1793 }
1794}
1795impl<T> core::ops::Mul<&InverseMagneticFlux<T>> for Charge<T> where T: NumLike {
1797 type Output = Conductance<T>;
1798 fn mul(self, rhs: &InverseMagneticFlux<T>) -> Self::Output {
1799 Conductance{S: self.C * rhs.per_Wb.clone()}
1800 }
1801}
1802impl<T> core::ops::Mul<&InverseMagneticFlux<T>> for &Charge<T> where T: NumLike {
1804 type Output = Conductance<T>;
1805 fn mul(self, rhs: &InverseMagneticFlux<T>) -> Self::Output {
1806 Conductance{S: self.C.clone() * rhs.per_Wb.clone()}
1807 }
1808}
1809
1810impl<T> core::ops::Mul<InverseVoltage<T>> for Charge<T> where T: NumLike {
1813 type Output = Capacitance<T>;
1814 fn mul(self, rhs: InverseVoltage<T>) -> Self::Output {
1815 Capacitance{F: self.C * rhs.per_V}
1816 }
1817}
1818impl<T> core::ops::Mul<InverseVoltage<T>> for &Charge<T> where T: NumLike {
1820 type Output = Capacitance<T>;
1821 fn mul(self, rhs: InverseVoltage<T>) -> Self::Output {
1822 Capacitance{F: self.C.clone() * rhs.per_V}
1823 }
1824}
1825impl<T> core::ops::Mul<&InverseVoltage<T>> for Charge<T> where T: NumLike {
1827 type Output = Capacitance<T>;
1828 fn mul(self, rhs: &InverseVoltage<T>) -> Self::Output {
1829 Capacitance{F: self.C * rhs.per_V.clone()}
1830 }
1831}
1832impl<T> core::ops::Mul<&InverseVoltage<T>> for &Charge<T> where T: NumLike {
1834 type Output = Capacitance<T>;
1835 fn mul(self, rhs: &InverseVoltage<T>) -> Self::Output {
1836 Capacitance{F: self.C.clone() * rhs.per_V.clone()}
1837 }
1838}
1839
1840impl<T> core::ops::Div<InverseVoltage<T>> for Charge<T> where T: NumLike {
1843 type Output = Energy<T>;
1844 fn div(self, rhs: InverseVoltage<T>) -> Self::Output {
1845 Energy{J: self.C / rhs.per_V}
1846 }
1847}
1848impl<T> core::ops::Div<InverseVoltage<T>> for &Charge<T> where T: NumLike {
1850 type Output = Energy<T>;
1851 fn div(self, rhs: InverseVoltage<T>) -> Self::Output {
1852 Energy{J: self.C.clone() / rhs.per_V}
1853 }
1854}
1855impl<T> core::ops::Div<&InverseVoltage<T>> for Charge<T> where T: NumLike {
1857 type Output = Energy<T>;
1858 fn div(self, rhs: &InverseVoltage<T>) -> Self::Output {
1859 Energy{J: self.C / rhs.per_V.clone()}
1860 }
1861}
1862impl<T> core::ops::Div<&InverseVoltage<T>> for &Charge<T> where T: NumLike {
1864 type Output = Energy<T>;
1865 fn div(self, rhs: &InverseVoltage<T>) -> Self::Output {
1866 Energy{J: self.C.clone() / rhs.per_V.clone()}
1867 }
1868}
1869
1870impl<T> core::ops::Div<MagneticFlux<T>> for Charge<T> where T: NumLike {
1873 type Output = Conductance<T>;
1874 fn div(self, rhs: MagneticFlux<T>) -> Self::Output {
1875 Conductance{S: self.C / rhs.Wb}
1876 }
1877}
1878impl<T> core::ops::Div<MagneticFlux<T>> for &Charge<T> where T: NumLike {
1880 type Output = Conductance<T>;
1881 fn div(self, rhs: MagneticFlux<T>) -> Self::Output {
1882 Conductance{S: self.C.clone() / rhs.Wb}
1883 }
1884}
1885impl<T> core::ops::Div<&MagneticFlux<T>> for Charge<T> where T: NumLike {
1887 type Output = Conductance<T>;
1888 fn div(self, rhs: &MagneticFlux<T>) -> Self::Output {
1889 Conductance{S: self.C / rhs.Wb.clone()}
1890 }
1891}
1892impl<T> core::ops::Div<&MagneticFlux<T>> for &Charge<T> where T: NumLike {
1894 type Output = Conductance<T>;
1895 fn div(self, rhs: &MagneticFlux<T>) -> Self::Output {
1896 Conductance{S: self.C.clone() / rhs.Wb.clone()}
1897 }
1898}
1899
1900impl<T> core::ops::Mul<Resistance<T>> for Charge<T> where T: NumLike {
1903 type Output = MagneticFlux<T>;
1904 fn mul(self, rhs: Resistance<T>) -> Self::Output {
1905 MagneticFlux{Wb: self.C * rhs.Ohm}
1906 }
1907}
1908impl<T> core::ops::Mul<Resistance<T>> for &Charge<T> where T: NumLike {
1910 type Output = MagneticFlux<T>;
1911 fn mul(self, rhs: Resistance<T>) -> Self::Output {
1912 MagneticFlux{Wb: self.C.clone() * rhs.Ohm}
1913 }
1914}
1915impl<T> core::ops::Mul<&Resistance<T>> for Charge<T> where T: NumLike {
1917 type Output = MagneticFlux<T>;
1918 fn mul(self, rhs: &Resistance<T>) -> Self::Output {
1919 MagneticFlux{Wb: self.C * rhs.Ohm.clone()}
1920 }
1921}
1922impl<T> core::ops::Mul<&Resistance<T>> for &Charge<T> where T: NumLike {
1924 type Output = MagneticFlux<T>;
1925 fn mul(self, rhs: &Resistance<T>) -> Self::Output {
1926 MagneticFlux{Wb: self.C.clone() * rhs.Ohm.clone()}
1927 }
1928}
1929
1930impl<T> core::ops::Mul<Voltage<T>> for Charge<T> where T: NumLike {
1933 type Output = Energy<T>;
1934 fn mul(self, rhs: Voltage<T>) -> Self::Output {
1935 Energy{J: self.C * rhs.V}
1936 }
1937}
1938impl<T> core::ops::Mul<Voltage<T>> for &Charge<T> where T: NumLike {
1940 type Output = Energy<T>;
1941 fn mul(self, rhs: Voltage<T>) -> Self::Output {
1942 Energy{J: self.C.clone() * rhs.V}
1943 }
1944}
1945impl<T> core::ops::Mul<&Voltage<T>> for Charge<T> where T: NumLike {
1947 type Output = Energy<T>;
1948 fn mul(self, rhs: &Voltage<T>) -> Self::Output {
1949 Energy{J: self.C * rhs.V.clone()}
1950 }
1951}
1952impl<T> core::ops::Mul<&Voltage<T>> for &Charge<T> where T: NumLike {
1954 type Output = Energy<T>;
1955 fn mul(self, rhs: &Voltage<T>) -> Self::Output {
1956 Energy{J: self.C.clone() * rhs.V.clone()}
1957 }
1958}
1959
1960impl<T> core::ops::Div<Voltage<T>> for Charge<T> where T: NumLike {
1963 type Output = Capacitance<T>;
1964 fn div(self, rhs: Voltage<T>) -> Self::Output {
1965 Capacitance{F: self.C / rhs.V}
1966 }
1967}
1968impl<T> core::ops::Div<Voltage<T>> for &Charge<T> where T: NumLike {
1970 type Output = Capacitance<T>;
1971 fn div(self, rhs: Voltage<T>) -> Self::Output {
1972 Capacitance{F: self.C.clone() / rhs.V}
1973 }
1974}
1975impl<T> core::ops::Div<&Voltage<T>> for Charge<T> where T: NumLike {
1977 type Output = Capacitance<T>;
1978 fn div(self, rhs: &Voltage<T>) -> Self::Output {
1979 Capacitance{F: self.C / rhs.V.clone()}
1980 }
1981}
1982impl<T> core::ops::Div<&Voltage<T>> for &Charge<T> where T: NumLike {
1984 type Output = Capacitance<T>;
1985 fn div(self, rhs: &Voltage<T>) -> Self::Output {
1986 Capacitance{F: self.C.clone() / rhs.V.clone()}
1987 }
1988}
1989
1990impl<T> core::ops::Div<Energy<T>> for Charge<T> where T: NumLike {
1993 type Output = InverseVoltage<T>;
1994 fn div(self, rhs: Energy<T>) -> Self::Output {
1995 InverseVoltage{per_V: self.C / rhs.J}
1996 }
1997}
1998impl<T> core::ops::Div<Energy<T>> for &Charge<T> where T: NumLike {
2000 type Output = InverseVoltage<T>;
2001 fn div(self, rhs: Energy<T>) -> Self::Output {
2002 InverseVoltage{per_V: self.C.clone() / rhs.J}
2003 }
2004}
2005impl<T> core::ops::Div<&Energy<T>> for Charge<T> where T: NumLike {
2007 type Output = InverseVoltage<T>;
2008 fn div(self, rhs: &Energy<T>) -> Self::Output {
2009 InverseVoltage{per_V: self.C / rhs.J.clone()}
2010 }
2011}
2012impl<T> core::ops::Div<&Energy<T>> for &Charge<T> where T: NumLike {
2014 type Output = InverseVoltage<T>;
2015 fn div(self, rhs: &Energy<T>) -> Self::Output {
2016 InverseVoltage{per_V: self.C.clone() / rhs.J.clone()}
2017 }
2018}
2019
2020impl<T> core::ops::Div<Torque<T>> for Charge<T> where T: NumLike {
2023 type Output = InverseVoltage<T>;
2024 fn div(self, rhs: Torque<T>) -> Self::Output {
2025 InverseVoltage{per_V: self.C / rhs.Nm}
2026 }
2027}
2028impl<T> core::ops::Div<Torque<T>> for &Charge<T> where T: NumLike {
2030 type Output = InverseVoltage<T>;
2031 fn div(self, rhs: Torque<T>) -> Self::Output {
2032 InverseVoltage{per_V: self.C.clone() / rhs.Nm}
2033 }
2034}
2035impl<T> core::ops::Div<&Torque<T>> for Charge<T> where T: NumLike {
2037 type Output = InverseVoltage<T>;
2038 fn div(self, rhs: &Torque<T>) -> Self::Output {
2039 InverseVoltage{per_V: self.C / rhs.Nm.clone()}
2040 }
2041}
2042impl<T> core::ops::Div<&Torque<T>> for &Charge<T> where T: NumLike {
2044 type Output = InverseVoltage<T>;
2045 fn div(self, rhs: &Torque<T>) -> Self::Output {
2046 InverseVoltage{per_V: self.C.clone() / rhs.Nm.clone()}
2047 }
2048}
2049
2050impl<T> core::ops::Mul<Frequency<T>> for Charge<T> where T: NumLike {
2053 type Output = Current<T>;
2054 fn mul(self, rhs: Frequency<T>) -> Self::Output {
2055 Current{A: self.C * rhs.Hz}
2056 }
2057}
2058impl<T> core::ops::Mul<Frequency<T>> for &Charge<T> where T: NumLike {
2060 type Output = Current<T>;
2061 fn mul(self, rhs: Frequency<T>) -> Self::Output {
2062 Current{A: self.C.clone() * rhs.Hz}
2063 }
2064}
2065impl<T> core::ops::Mul<&Frequency<T>> for Charge<T> where T: NumLike {
2067 type Output = Current<T>;
2068 fn mul(self, rhs: &Frequency<T>) -> Self::Output {
2069 Current{A: self.C * rhs.Hz.clone()}
2070 }
2071}
2072impl<T> core::ops::Mul<&Frequency<T>> for &Charge<T> where T: NumLike {
2074 type Output = Current<T>;
2075 fn mul(self, rhs: &Frequency<T>) -> Self::Output {
2076 Current{A: self.C.clone() * rhs.Hz.clone()}
2077 }
2078}
2079
2080impl<T> core::ops::Mul<InverseEnergy<T>> for Charge<T> where T: NumLike {
2083 type Output = InverseVoltage<T>;
2084 fn mul(self, rhs: InverseEnergy<T>) -> Self::Output {
2085 InverseVoltage{per_V: self.C * rhs.per_J}
2086 }
2087}
2088impl<T> core::ops::Mul<InverseEnergy<T>> for &Charge<T> where T: NumLike {
2090 type Output = InverseVoltage<T>;
2091 fn mul(self, rhs: InverseEnergy<T>) -> Self::Output {
2092 InverseVoltage{per_V: self.C.clone() * rhs.per_J}
2093 }
2094}
2095impl<T> core::ops::Mul<&InverseEnergy<T>> for Charge<T> where T: NumLike {
2097 type Output = InverseVoltage<T>;
2098 fn mul(self, rhs: &InverseEnergy<T>) -> Self::Output {
2099 InverseVoltage{per_V: self.C * rhs.per_J.clone()}
2100 }
2101}
2102impl<T> core::ops::Mul<&InverseEnergy<T>> for &Charge<T> where T: NumLike {
2104 type Output = InverseVoltage<T>;
2105 fn mul(self, rhs: &InverseEnergy<T>) -> Self::Output {
2106 InverseVoltage{per_V: self.C.clone() * rhs.per_J.clone()}
2107 }
2108}
2109
2110impl<T> core::ops::Mul<InverseTorque<T>> for Charge<T> where T: NumLike {
2113 type Output = InverseVoltage<T>;
2114 fn mul(self, rhs: InverseTorque<T>) -> Self::Output {
2115 InverseVoltage{per_V: self.C * rhs.per_Nm}
2116 }
2117}
2118impl<T> core::ops::Mul<InverseTorque<T>> for &Charge<T> where T: NumLike {
2120 type Output = InverseVoltage<T>;
2121 fn mul(self, rhs: InverseTorque<T>) -> Self::Output {
2122 InverseVoltage{per_V: self.C.clone() * rhs.per_Nm}
2123 }
2124}
2125impl<T> core::ops::Mul<&InverseTorque<T>> for Charge<T> where T: NumLike {
2127 type Output = InverseVoltage<T>;
2128 fn mul(self, rhs: &InverseTorque<T>) -> Self::Output {
2129 InverseVoltage{per_V: self.C * rhs.per_Nm.clone()}
2130 }
2131}
2132impl<T> core::ops::Mul<&InverseTorque<T>> for &Charge<T> where T: NumLike {
2134 type Output = InverseVoltage<T>;
2135 fn mul(self, rhs: &InverseTorque<T>) -> Self::Output {
2136 InverseVoltage{per_V: self.C.clone() * rhs.per_Nm.clone()}
2137 }
2138}
2139
2140impl<T> core::ops::Div<Charge<T>> for f64 where T: NumLike+From<f64> {
2143 type Output = InverseCharge<T>;
2144 fn div(self, rhs: Charge<T>) -> Self::Output {
2145 InverseCharge{per_C: T::from(self) / rhs.C}
2146 }
2147}
2148impl<T> core::ops::Div<Charge<T>> for &f64 where T: NumLike+From<f64> {
2150 type Output = InverseCharge<T>;
2151 fn div(self, rhs: Charge<T>) -> Self::Output {
2152 InverseCharge{per_C: T::from(self.clone()) / rhs.C}
2153 }
2154}
2155impl<T> core::ops::Div<&Charge<T>> for f64 where T: NumLike+From<f64> {
2157 type Output = InverseCharge<T>;
2158 fn div(self, rhs: &Charge<T>) -> Self::Output {
2159 InverseCharge{per_C: T::from(self) / rhs.C.clone()}
2160 }
2161}
2162impl<T> core::ops::Div<&Charge<T>> for &f64 where T: NumLike+From<f64> {
2164 type Output = InverseCharge<T>;
2165 fn div(self, rhs: &Charge<T>) -> Self::Output {
2166 InverseCharge{per_C: T::from(self.clone()) / rhs.C.clone()}
2167 }
2168}
2169
2170impl<T> core::ops::Div<Charge<T>> for f32 where T: NumLike+From<f32> {
2173 type Output = InverseCharge<T>;
2174 fn div(self, rhs: Charge<T>) -> Self::Output {
2175 InverseCharge{per_C: T::from(self) / rhs.C}
2176 }
2177}
2178impl<T> core::ops::Div<Charge<T>> for &f32 where T: NumLike+From<f32> {
2180 type Output = InverseCharge<T>;
2181 fn div(self, rhs: Charge<T>) -> Self::Output {
2182 InverseCharge{per_C: T::from(self.clone()) / rhs.C}
2183 }
2184}
2185impl<T> core::ops::Div<&Charge<T>> for f32 where T: NumLike+From<f32> {
2187 type Output = InverseCharge<T>;
2188 fn div(self, rhs: &Charge<T>) -> Self::Output {
2189 InverseCharge{per_C: T::from(self) / rhs.C.clone()}
2190 }
2191}
2192impl<T> core::ops::Div<&Charge<T>> for &f32 where T: NumLike+From<f32> {
2194 type Output = InverseCharge<T>;
2195 fn div(self, rhs: &Charge<T>) -> Self::Output {
2196 InverseCharge{per_C: T::from(self.clone()) / rhs.C.clone()}
2197 }
2198}
2199
2200impl<T> core::ops::Div<Charge<T>> for i64 where T: NumLike+From<i64> {
2203 type Output = InverseCharge<T>;
2204 fn div(self, rhs: Charge<T>) -> Self::Output {
2205 InverseCharge{per_C: T::from(self) / rhs.C}
2206 }
2207}
2208impl<T> core::ops::Div<Charge<T>> for &i64 where T: NumLike+From<i64> {
2210 type Output = InverseCharge<T>;
2211 fn div(self, rhs: Charge<T>) -> Self::Output {
2212 InverseCharge{per_C: T::from(self.clone()) / rhs.C}
2213 }
2214}
2215impl<T> core::ops::Div<&Charge<T>> for i64 where T: NumLike+From<i64> {
2217 type Output = InverseCharge<T>;
2218 fn div(self, rhs: &Charge<T>) -> Self::Output {
2219 InverseCharge{per_C: T::from(self) / rhs.C.clone()}
2220 }
2221}
2222impl<T> core::ops::Div<&Charge<T>> for &i64 where T: NumLike+From<i64> {
2224 type Output = InverseCharge<T>;
2225 fn div(self, rhs: &Charge<T>) -> Self::Output {
2226 InverseCharge{per_C: T::from(self.clone()) / rhs.C.clone()}
2227 }
2228}
2229
2230impl<T> core::ops::Div<Charge<T>> for i32 where T: NumLike+From<i32> {
2233 type Output = InverseCharge<T>;
2234 fn div(self, rhs: Charge<T>) -> Self::Output {
2235 InverseCharge{per_C: T::from(self) / rhs.C}
2236 }
2237}
2238impl<T> core::ops::Div<Charge<T>> for &i32 where T: NumLike+From<i32> {
2240 type Output = InverseCharge<T>;
2241 fn div(self, rhs: Charge<T>) -> Self::Output {
2242 InverseCharge{per_C: T::from(self.clone()) / rhs.C}
2243 }
2244}
2245impl<T> core::ops::Div<&Charge<T>> for i32 where T: NumLike+From<i32> {
2247 type Output = InverseCharge<T>;
2248 fn div(self, rhs: &Charge<T>) -> Self::Output {
2249 InverseCharge{per_C: T::from(self) / rhs.C.clone()}
2250 }
2251}
2252impl<T> core::ops::Div<&Charge<T>> for &i32 where T: NumLike+From<i32> {
2254 type Output = InverseCharge<T>;
2255 fn div(self, rhs: &Charge<T>) -> Self::Output {
2256 InverseCharge{per_C: T::from(self.clone()) / rhs.C.clone()}
2257 }
2258}
2259
2260#[cfg(feature="num-bigfloat")]
2263impl<T> core::ops::Div<Charge<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
2264 type Output = InverseCharge<T>;
2265 fn div(self, rhs: Charge<T>) -> Self::Output {
2266 InverseCharge{per_C: T::from(self) / rhs.C}
2267 }
2268}
2269#[cfg(feature="num-bigfloat")]
2271impl<T> core::ops::Div<Charge<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
2272 type Output = InverseCharge<T>;
2273 fn div(self, rhs: Charge<T>) -> Self::Output {
2274 InverseCharge{per_C: T::from(self.clone()) / rhs.C}
2275 }
2276}
2277#[cfg(feature="num-bigfloat")]
2279impl<T> core::ops::Div<&Charge<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
2280 type Output = InverseCharge<T>;
2281 fn div(self, rhs: &Charge<T>) -> Self::Output {
2282 InverseCharge{per_C: T::from(self) / rhs.C.clone()}
2283 }
2284}
2285#[cfg(feature="num-bigfloat")]
2287impl<T> core::ops::Div<&Charge<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
2288 type Output = InverseCharge<T>;
2289 fn div(self, rhs: &Charge<T>) -> Self::Output {
2290 InverseCharge{per_C: T::from(self.clone()) / rhs.C.clone()}
2291 }
2292}
2293
2294#[cfg(feature="num-complex")]
2297impl<T> core::ops::Div<Charge<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
2298 type Output = InverseCharge<T>;
2299 fn div(self, rhs: Charge<T>) -> Self::Output {
2300 InverseCharge{per_C: T::from(self) / rhs.C}
2301 }
2302}
2303#[cfg(feature="num-complex")]
2305impl<T> core::ops::Div<Charge<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
2306 type Output = InverseCharge<T>;
2307 fn div(self, rhs: Charge<T>) -> Self::Output {
2308 InverseCharge{per_C: T::from(self.clone()) / rhs.C}
2309 }
2310}
2311#[cfg(feature="num-complex")]
2313impl<T> core::ops::Div<&Charge<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
2314 type Output = InverseCharge<T>;
2315 fn div(self, rhs: &Charge<T>) -> Self::Output {
2316 InverseCharge{per_C: T::from(self) / rhs.C.clone()}
2317 }
2318}
2319#[cfg(feature="num-complex")]
2321impl<T> core::ops::Div<&Charge<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
2322 type Output = InverseCharge<T>;
2323 fn div(self, rhs: &Charge<T>) -> Self::Output {
2324 InverseCharge{per_C: T::from(self.clone()) / rhs.C.clone()}
2325 }
2326}
2327
2328#[cfg(feature="num-complex")]
2331impl<T> core::ops::Div<Charge<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
2332 type Output = InverseCharge<T>;
2333 fn div(self, rhs: Charge<T>) -> Self::Output {
2334 InverseCharge{per_C: T::from(self) / rhs.C}
2335 }
2336}
2337#[cfg(feature="num-complex")]
2339impl<T> core::ops::Div<Charge<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
2340 type Output = InverseCharge<T>;
2341 fn div(self, rhs: Charge<T>) -> Self::Output {
2342 InverseCharge{per_C: T::from(self.clone()) / rhs.C}
2343 }
2344}
2345#[cfg(feature="num-complex")]
2347impl<T> core::ops::Div<&Charge<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
2348 type Output = InverseCharge<T>;
2349 fn div(self, rhs: &Charge<T>) -> Self::Output {
2350 InverseCharge{per_C: T::from(self) / rhs.C.clone()}
2351 }
2352}
2353#[cfg(feature="num-complex")]
2355impl<T> core::ops::Div<&Charge<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
2356 type Output = InverseCharge<T>;
2357 fn div(self, rhs: &Charge<T>) -> Self::Output {
2358 InverseCharge{per_C: T::from(self.clone()) / rhs.C.clone()}
2359 }
2360}
2361
2362#[derive(UnitStruct, Debug, Clone)]
2364#[cfg_attr(feature="serde", derive(Serialize, Deserialize))]
2365pub struct Conductance<T: NumLike>{
2366 pub S: T
2368}
2369
2370impl<T> Conductance<T> where T: NumLike {
2371
2372 pub fn unit_name() -> &'static str { "siemens" }
2374
2375 pub fn unit_symbol() -> &'static str { "S" }
2377
2378 pub fn from_S(S: T) -> Self { Conductance{S: S} }
2383
2384 pub fn to_S(&self) -> T { self.S.clone() }
2386
2387 pub fn from_siemens(siemens: T) -> Self { Conductance{S: siemens} }
2392
2393 pub fn to_siemens(&self) -> T { self.S.clone() }
2395
2396}
2397
2398impl<T> fmt::Display for Conductance<T> where T: NumLike {
2399 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2400 write!(f, "{} {}", &self.S, Self::unit_symbol())
2401 }
2402}
2403
2404impl<T> Conductance<T> where T: NumLike+From<f64> {
2405
2406 pub fn to_mS(&self) -> T {
2410 return self.S.clone() * T::from(1000.0_f64);
2411 }
2412
2413 pub fn from_mS(mS: T) -> Self {
2420 Conductance{S: mS * T::from(0.001_f64)}
2421 }
2422
2423 pub fn to_uS(&self) -> T {
2427 return self.S.clone() * T::from(1000000.0_f64);
2428 }
2429
2430 pub fn from_uS(uS: T) -> Self {
2437 Conductance{S: uS * T::from(1e-06_f64)}
2438 }
2439
2440 pub fn to_nS(&self) -> T {
2444 return self.S.clone() * T::from(1000000000.0_f64);
2445 }
2446
2447 pub fn from_nS(nS: T) -> Self {
2454 Conductance{S: nS * T::from(1e-09_f64)}
2455 }
2456
2457 pub fn to_kS(&self) -> T {
2461 return self.S.clone() * T::from(0.001_f64);
2462 }
2463
2464 pub fn from_kS(kS: T) -> Self {
2471 Conductance{S: kS * T::from(1000.0_f64)}
2472 }
2473
2474 pub fn to_MS(&self) -> T {
2478 return self.S.clone() * T::from(1e-06_f64);
2479 }
2480
2481 pub fn from_MS(MS: T) -> Self {
2488 Conductance{S: MS * T::from(1000000.0_f64)}
2489 }
2490
2491 pub fn to_GS(&self) -> T {
2495 return self.S.clone() * T::from(1e-09_f64);
2496 }
2497
2498 pub fn from_GS(GS: T) -> Self {
2505 Conductance{S: GS * T::from(1000000000.0_f64)}
2506 }
2507
2508}
2509
2510
2511#[cfg(feature="num-bigfloat")]
2513impl core::ops::Mul<Conductance<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
2514 type Output = Conductance<num_bigfloat::BigFloat>;
2515 fn mul(self, rhs: Conductance<num_bigfloat::BigFloat>) -> Self::Output {
2516 Conductance{S: self * rhs.S}
2517 }
2518}
2519#[cfg(feature="num-bigfloat")]
2521impl core::ops::Mul<Conductance<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
2522 type Output = Conductance<num_bigfloat::BigFloat>;
2523 fn mul(self, rhs: Conductance<num_bigfloat::BigFloat>) -> Self::Output {
2524 Conductance{S: self.clone() * rhs.S}
2525 }
2526}
2527#[cfg(feature="num-bigfloat")]
2529impl core::ops::Mul<&Conductance<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
2530 type Output = Conductance<num_bigfloat::BigFloat>;
2531 fn mul(self, rhs: &Conductance<num_bigfloat::BigFloat>) -> Self::Output {
2532 Conductance{S: self * rhs.S.clone()}
2533 }
2534}
2535#[cfg(feature="num-bigfloat")]
2537impl core::ops::Mul<&Conductance<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
2538 type Output = Conductance<num_bigfloat::BigFloat>;
2539 fn mul(self, rhs: &Conductance<num_bigfloat::BigFloat>) -> Self::Output {
2540 Conductance{S: self.clone() * rhs.S.clone()}
2541 }
2542}
2543
2544#[cfg(feature="num-complex")]
2546impl core::ops::Mul<Conductance<num_complex::Complex32>> for num_complex::Complex32 {
2547 type Output = Conductance<num_complex::Complex32>;
2548 fn mul(self, rhs: Conductance<num_complex::Complex32>) -> Self::Output {
2549 Conductance{S: self * rhs.S}
2550 }
2551}
2552#[cfg(feature="num-complex")]
2554impl core::ops::Mul<Conductance<num_complex::Complex32>> for &num_complex::Complex32 {
2555 type Output = Conductance<num_complex::Complex32>;
2556 fn mul(self, rhs: Conductance<num_complex::Complex32>) -> Self::Output {
2557 Conductance{S: self.clone() * rhs.S}
2558 }
2559}
2560#[cfg(feature="num-complex")]
2562impl core::ops::Mul<&Conductance<num_complex::Complex32>> for num_complex::Complex32 {
2563 type Output = Conductance<num_complex::Complex32>;
2564 fn mul(self, rhs: &Conductance<num_complex::Complex32>) -> Self::Output {
2565 Conductance{S: self * rhs.S.clone()}
2566 }
2567}
2568#[cfg(feature="num-complex")]
2570impl core::ops::Mul<&Conductance<num_complex::Complex32>> for &num_complex::Complex32 {
2571 type Output = Conductance<num_complex::Complex32>;
2572 fn mul(self, rhs: &Conductance<num_complex::Complex32>) -> Self::Output {
2573 Conductance{S: self.clone() * rhs.S.clone()}
2574 }
2575}
2576
2577#[cfg(feature="num-complex")]
2579impl core::ops::Mul<Conductance<num_complex::Complex64>> for num_complex::Complex64 {
2580 type Output = Conductance<num_complex::Complex64>;
2581 fn mul(self, rhs: Conductance<num_complex::Complex64>) -> Self::Output {
2582 Conductance{S: self * rhs.S}
2583 }
2584}
2585#[cfg(feature="num-complex")]
2587impl core::ops::Mul<Conductance<num_complex::Complex64>> for &num_complex::Complex64 {
2588 type Output = Conductance<num_complex::Complex64>;
2589 fn mul(self, rhs: Conductance<num_complex::Complex64>) -> Self::Output {
2590 Conductance{S: self.clone() * rhs.S}
2591 }
2592}
2593#[cfg(feature="num-complex")]
2595impl core::ops::Mul<&Conductance<num_complex::Complex64>> for num_complex::Complex64 {
2596 type Output = Conductance<num_complex::Complex64>;
2597 fn mul(self, rhs: &Conductance<num_complex::Complex64>) -> Self::Output {
2598 Conductance{S: self * rhs.S.clone()}
2599 }
2600}
2601#[cfg(feature="num-complex")]
2603impl core::ops::Mul<&Conductance<num_complex::Complex64>> for &num_complex::Complex64 {
2604 type Output = Conductance<num_complex::Complex64>;
2605 fn mul(self, rhs: &Conductance<num_complex::Complex64>) -> Self::Output {
2606 Conductance{S: self.clone() * rhs.S.clone()}
2607 }
2608}
2609
2610
2611
2612#[cfg(feature = "uom")]
2614impl<T> Into<uom::si::f32::ElectricalConductance> for Conductance<T> where T: NumLike+Into<f32> {
2615 fn into(self) -> uom::si::f32::ElectricalConductance {
2616 uom::si::f32::ElectricalConductance::new::<uom::si::electrical_conductance::siemens>(self.S.into())
2617 }
2618}
2619
2620#[cfg(feature = "uom")]
2622impl<T> From<uom::si::f32::ElectricalConductance> for Conductance<T> where T: NumLike+From<f32> {
2623 fn from(src: uom::si::f32::ElectricalConductance) -> Self {
2624 Conductance{S: T::from(src.value)}
2625 }
2626}
2627
2628#[cfg(feature = "uom")]
2630impl<T> Into<uom::si::f64::ElectricalConductance> for Conductance<T> where T: NumLike+Into<f64> {
2631 fn into(self) -> uom::si::f64::ElectricalConductance {
2632 uom::si::f64::ElectricalConductance::new::<uom::si::electrical_conductance::siemens>(self.S.into())
2633 }
2634}
2635
2636#[cfg(feature = "uom")]
2638impl<T> From<uom::si::f64::ElectricalConductance> for Conductance<T> where T: NumLike+From<f64> {
2639 fn from(src: uom::si::f64::ElectricalConductance) -> Self {
2640 Conductance{S: T::from(src.value)}
2641 }
2642}
2643
2644
2645impl<T> core::ops::Div<Current<T>> for Conductance<T> where T: NumLike {
2648 type Output = InverseVoltage<T>;
2649 fn div(self, rhs: Current<T>) -> Self::Output {
2650 InverseVoltage{per_V: self.S / rhs.A}
2651 }
2652}
2653impl<T> core::ops::Div<Current<T>> for &Conductance<T> where T: NumLike {
2655 type Output = InverseVoltage<T>;
2656 fn div(self, rhs: Current<T>) -> Self::Output {
2657 InverseVoltage{per_V: self.S.clone() / rhs.A}
2658 }
2659}
2660impl<T> core::ops::Div<&Current<T>> for Conductance<T> where T: NumLike {
2662 type Output = InverseVoltage<T>;
2663 fn div(self, rhs: &Current<T>) -> Self::Output {
2664 InverseVoltage{per_V: self.S / rhs.A.clone()}
2665 }
2666}
2667impl<T> core::ops::Div<&Current<T>> for &Conductance<T> where T: NumLike {
2669 type Output = InverseVoltage<T>;
2670 fn div(self, rhs: &Current<T>) -> Self::Output {
2671 InverseVoltage{per_V: self.S.clone() / rhs.A.clone()}
2672 }
2673}
2674
2675impl<T> core::ops::Mul<InverseCurrent<T>> for Conductance<T> where T: NumLike {
2678 type Output = InverseVoltage<T>;
2679 fn mul(self, rhs: InverseCurrent<T>) -> Self::Output {
2680 InverseVoltage{per_V: self.S * rhs.per_A}
2681 }
2682}
2683impl<T> core::ops::Mul<InverseCurrent<T>> for &Conductance<T> where T: NumLike {
2685 type Output = InverseVoltage<T>;
2686 fn mul(self, rhs: InverseCurrent<T>) -> Self::Output {
2687 InverseVoltage{per_V: self.S.clone() * rhs.per_A}
2688 }
2689}
2690impl<T> core::ops::Mul<&InverseCurrent<T>> for Conductance<T> where T: NumLike {
2692 type Output = InverseVoltage<T>;
2693 fn mul(self, rhs: &InverseCurrent<T>) -> Self::Output {
2694 InverseVoltage{per_V: self.S * rhs.per_A.clone()}
2695 }
2696}
2697impl<T> core::ops::Mul<&InverseCurrent<T>> for &Conductance<T> where T: NumLike {
2699 type Output = InverseVoltage<T>;
2700 fn mul(self, rhs: &InverseCurrent<T>) -> Self::Output {
2701 InverseVoltage{per_V: self.S.clone() * rhs.per_A.clone()}
2702 }
2703}
2704
2705impl<T> core::ops::Mul<Time<T>> for Conductance<T> where T: NumLike {
2708 type Output = Capacitance<T>;
2709 fn mul(self, rhs: Time<T>) -> Self::Output {
2710 Capacitance{F: self.S * rhs.s}
2711 }
2712}
2713impl<T> core::ops::Mul<Time<T>> for &Conductance<T> where T: NumLike {
2715 type Output = Capacitance<T>;
2716 fn mul(self, rhs: Time<T>) -> Self::Output {
2717 Capacitance{F: self.S.clone() * rhs.s}
2718 }
2719}
2720impl<T> core::ops::Mul<&Time<T>> for Conductance<T> where T: NumLike {
2722 type Output = Capacitance<T>;
2723 fn mul(self, rhs: &Time<T>) -> Self::Output {
2724 Capacitance{F: self.S * rhs.s.clone()}
2725 }
2726}
2727impl<T> core::ops::Mul<&Time<T>> for &Conductance<T> where T: NumLike {
2729 type Output = Capacitance<T>;
2730 fn mul(self, rhs: &Time<T>) -> Self::Output {
2731 Capacitance{F: self.S.clone() * rhs.s.clone()}
2732 }
2733}
2734
2735impl<T> core::ops::Div<Time<T>> for Conductance<T> where T: NumLike {
2738 type Output = InverseInductance<T>;
2739 fn div(self, rhs: Time<T>) -> Self::Output {
2740 InverseInductance{per_H: self.S / rhs.s}
2741 }
2742}
2743impl<T> core::ops::Div<Time<T>> for &Conductance<T> where T: NumLike {
2745 type Output = InverseInductance<T>;
2746 fn div(self, rhs: Time<T>) -> Self::Output {
2747 InverseInductance{per_H: self.S.clone() / rhs.s}
2748 }
2749}
2750impl<T> core::ops::Div<&Time<T>> for Conductance<T> where T: NumLike {
2752 type Output = InverseInductance<T>;
2753 fn div(self, rhs: &Time<T>) -> Self::Output {
2754 InverseInductance{per_H: self.S / rhs.s.clone()}
2755 }
2756}
2757impl<T> core::ops::Div<&Time<T>> for &Conductance<T> where T: NumLike {
2759 type Output = InverseInductance<T>;
2760 fn div(self, rhs: &Time<T>) -> Self::Output {
2761 InverseInductance{per_H: self.S.clone() / rhs.s.clone()}
2762 }
2763}
2764
2765impl<T> core::ops::Div<Capacitance<T>> for Conductance<T> where T: NumLike {
2768 type Output = Frequency<T>;
2769 fn div(self, rhs: Capacitance<T>) -> Self::Output {
2770 Frequency{Hz: self.S / rhs.F}
2771 }
2772}
2773impl<T> core::ops::Div<Capacitance<T>> for &Conductance<T> where T: NumLike {
2775 type Output = Frequency<T>;
2776 fn div(self, rhs: Capacitance<T>) -> Self::Output {
2777 Frequency{Hz: self.S.clone() / rhs.F}
2778 }
2779}
2780impl<T> core::ops::Div<&Capacitance<T>> for Conductance<T> where T: NumLike {
2782 type Output = Frequency<T>;
2783 fn div(self, rhs: &Capacitance<T>) -> Self::Output {
2784 Frequency{Hz: self.S / rhs.F.clone()}
2785 }
2786}
2787impl<T> core::ops::Div<&Capacitance<T>> for &Conductance<T> where T: NumLike {
2789 type Output = Frequency<T>;
2790 fn div(self, rhs: &Capacitance<T>) -> Self::Output {
2791 Frequency{Hz: self.S.clone() / rhs.F.clone()}
2792 }
2793}
2794
2795impl<T> core::ops::Div<Charge<T>> for Conductance<T> where T: NumLike {
2798 type Output = InverseMagneticFlux<T>;
2799 fn div(self, rhs: Charge<T>) -> Self::Output {
2800 InverseMagneticFlux{per_Wb: self.S / rhs.C}
2801 }
2802}
2803impl<T> core::ops::Div<Charge<T>> for &Conductance<T> where T: NumLike {
2805 type Output = InverseMagneticFlux<T>;
2806 fn div(self, rhs: Charge<T>) -> Self::Output {
2807 InverseMagneticFlux{per_Wb: self.S.clone() / rhs.C}
2808 }
2809}
2810impl<T> core::ops::Div<&Charge<T>> for Conductance<T> where T: NumLike {
2812 type Output = InverseMagneticFlux<T>;
2813 fn div(self, rhs: &Charge<T>) -> Self::Output {
2814 InverseMagneticFlux{per_Wb: self.S / rhs.C.clone()}
2815 }
2816}
2817impl<T> core::ops::Div<&Charge<T>> for &Conductance<T> where T: NumLike {
2819 type Output = InverseMagneticFlux<T>;
2820 fn div(self, rhs: &Charge<T>) -> Self::Output {
2821 InverseMagneticFlux{per_Wb: self.S.clone() / rhs.C.clone()}
2822 }
2823}
2824
2825impl<T> core::ops::Mul<Elastance<T>> for Conductance<T> where T: NumLike {
2828 type Output = Frequency<T>;
2829 fn mul(self, rhs: Elastance<T>) -> Self::Output {
2830 Frequency{Hz: self.S * rhs.per_F}
2831 }
2832}
2833impl<T> core::ops::Mul<Elastance<T>> for &Conductance<T> where T: NumLike {
2835 type Output = Frequency<T>;
2836 fn mul(self, rhs: Elastance<T>) -> Self::Output {
2837 Frequency{Hz: self.S.clone() * rhs.per_F}
2838 }
2839}
2840impl<T> core::ops::Mul<&Elastance<T>> for Conductance<T> where T: NumLike {
2842 type Output = Frequency<T>;
2843 fn mul(self, rhs: &Elastance<T>) -> Self::Output {
2844 Frequency{Hz: self.S * rhs.per_F.clone()}
2845 }
2846}
2847impl<T> core::ops::Mul<&Elastance<T>> for &Conductance<T> where T: NumLike {
2849 type Output = Frequency<T>;
2850 fn mul(self, rhs: &Elastance<T>) -> Self::Output {
2851 Frequency{Hz: self.S.clone() * rhs.per_F.clone()}
2852 }
2853}
2854
2855impl<T> core::ops::Mul<Inductance<T>> for Conductance<T> where T: NumLike {
2858 type Output = Time<T>;
2859 fn mul(self, rhs: Inductance<T>) -> Self::Output {
2860 Time{s: self.S * rhs.H}
2861 }
2862}
2863impl<T> core::ops::Mul<Inductance<T>> for &Conductance<T> where T: NumLike {
2865 type Output = Time<T>;
2866 fn mul(self, rhs: Inductance<T>) -> Self::Output {
2867 Time{s: self.S.clone() * rhs.H}
2868 }
2869}
2870impl<T> core::ops::Mul<&Inductance<T>> for Conductance<T> where T: NumLike {
2872 type Output = Time<T>;
2873 fn mul(self, rhs: &Inductance<T>) -> Self::Output {
2874 Time{s: self.S * rhs.H.clone()}
2875 }
2876}
2877impl<T> core::ops::Mul<&Inductance<T>> for &Conductance<T> where T: NumLike {
2879 type Output = Time<T>;
2880 fn mul(self, rhs: &Inductance<T>) -> Self::Output {
2881 Time{s: self.S.clone() * rhs.H.clone()}
2882 }
2883}
2884
2885impl<T> core::ops::Mul<InverseCharge<T>> for Conductance<T> where T: NumLike {
2888 type Output = InverseMagneticFlux<T>;
2889 fn mul(self, rhs: InverseCharge<T>) -> Self::Output {
2890 InverseMagneticFlux{per_Wb: self.S * rhs.per_C}
2891 }
2892}
2893impl<T> core::ops::Mul<InverseCharge<T>> for &Conductance<T> where T: NumLike {
2895 type Output = InverseMagneticFlux<T>;
2896 fn mul(self, rhs: InverseCharge<T>) -> Self::Output {
2897 InverseMagneticFlux{per_Wb: self.S.clone() * rhs.per_C}
2898 }
2899}
2900impl<T> core::ops::Mul<&InverseCharge<T>> for Conductance<T> where T: NumLike {
2902 type Output = InverseMagneticFlux<T>;
2903 fn mul(self, rhs: &InverseCharge<T>) -> Self::Output {
2904 InverseMagneticFlux{per_Wb: self.S * rhs.per_C.clone()}
2905 }
2906}
2907impl<T> core::ops::Mul<&InverseCharge<T>> for &Conductance<T> where T: NumLike {
2909 type Output = InverseMagneticFlux<T>;
2910 fn mul(self, rhs: &InverseCharge<T>) -> Self::Output {
2911 InverseMagneticFlux{per_Wb: self.S.clone() * rhs.per_C.clone()}
2912 }
2913}
2914
2915impl<T> core::ops::Div<InverseInductance<T>> for Conductance<T> where T: NumLike {
2918 type Output = Time<T>;
2919 fn div(self, rhs: InverseInductance<T>) -> Self::Output {
2920 Time{s: self.S / rhs.per_H}
2921 }
2922}
2923impl<T> core::ops::Div<InverseInductance<T>> for &Conductance<T> where T: NumLike {
2925 type Output = Time<T>;
2926 fn div(self, rhs: InverseInductance<T>) -> Self::Output {
2927 Time{s: self.S.clone() / rhs.per_H}
2928 }
2929}
2930impl<T> core::ops::Div<&InverseInductance<T>> for Conductance<T> where T: NumLike {
2932 type Output = Time<T>;
2933 fn div(self, rhs: &InverseInductance<T>) -> Self::Output {
2934 Time{s: self.S / rhs.per_H.clone()}
2935 }
2936}
2937impl<T> core::ops::Div<&InverseInductance<T>> for &Conductance<T> where T: NumLike {
2939 type Output = Time<T>;
2940 fn div(self, rhs: &InverseInductance<T>) -> Self::Output {
2941 Time{s: self.S.clone() / rhs.per_H.clone()}
2942 }
2943}
2944
2945impl<T> core::ops::Div<InverseMagneticFlux<T>> for Conductance<T> where T: NumLike {
2948 type Output = Charge<T>;
2949 fn div(self, rhs: InverseMagneticFlux<T>) -> Self::Output {
2950 Charge{C: self.S / rhs.per_Wb}
2951 }
2952}
2953impl<T> core::ops::Div<InverseMagneticFlux<T>> for &Conductance<T> where T: NumLike {
2955 type Output = Charge<T>;
2956 fn div(self, rhs: InverseMagneticFlux<T>) -> Self::Output {
2957 Charge{C: self.S.clone() / rhs.per_Wb}
2958 }
2959}
2960impl<T> core::ops::Div<&InverseMagneticFlux<T>> for Conductance<T> where T: NumLike {
2962 type Output = Charge<T>;
2963 fn div(self, rhs: &InverseMagneticFlux<T>) -> Self::Output {
2964 Charge{C: self.S / rhs.per_Wb.clone()}
2965 }
2966}
2967impl<T> core::ops::Div<&InverseMagneticFlux<T>> for &Conductance<T> where T: NumLike {
2969 type Output = Charge<T>;
2970 fn div(self, rhs: &InverseMagneticFlux<T>) -> Self::Output {
2971 Charge{C: self.S.clone() / rhs.per_Wb.clone()}
2972 }
2973}
2974
2975impl<T> core::ops::Div<InverseVoltage<T>> for Conductance<T> where T: NumLike {
2978 type Output = Current<T>;
2979 fn div(self, rhs: InverseVoltage<T>) -> Self::Output {
2980 Current{A: self.S / rhs.per_V}
2981 }
2982}
2983impl<T> core::ops::Div<InverseVoltage<T>> for &Conductance<T> where T: NumLike {
2985 type Output = Current<T>;
2986 fn div(self, rhs: InverseVoltage<T>) -> Self::Output {
2987 Current{A: self.S.clone() / rhs.per_V}
2988 }
2989}
2990impl<T> core::ops::Div<&InverseVoltage<T>> for Conductance<T> where T: NumLike {
2992 type Output = Current<T>;
2993 fn div(self, rhs: &InverseVoltage<T>) -> Self::Output {
2994 Current{A: self.S / rhs.per_V.clone()}
2995 }
2996}
2997impl<T> core::ops::Div<&InverseVoltage<T>> for &Conductance<T> where T: NumLike {
2999 type Output = Current<T>;
3000 fn div(self, rhs: &InverseVoltage<T>) -> Self::Output {
3001 Current{A: self.S.clone() / rhs.per_V.clone()}
3002 }
3003}
3004
3005impl<T> core::ops::Mul<MagneticFlux<T>> for Conductance<T> where T: NumLike {
3008 type Output = Charge<T>;
3009 fn mul(self, rhs: MagneticFlux<T>) -> Self::Output {
3010 Charge{C: self.S * rhs.Wb}
3011 }
3012}
3013impl<T> core::ops::Mul<MagneticFlux<T>> for &Conductance<T> where T: NumLike {
3015 type Output = Charge<T>;
3016 fn mul(self, rhs: MagneticFlux<T>) -> Self::Output {
3017 Charge{C: self.S.clone() * rhs.Wb}
3018 }
3019}
3020impl<T> core::ops::Mul<&MagneticFlux<T>> for Conductance<T> where T: NumLike {
3022 type Output = Charge<T>;
3023 fn mul(self, rhs: &MagneticFlux<T>) -> Self::Output {
3024 Charge{C: self.S * rhs.Wb.clone()}
3025 }
3026}
3027impl<T> core::ops::Mul<&MagneticFlux<T>> for &Conductance<T> where T: NumLike {
3029 type Output = Charge<T>;
3030 fn mul(self, rhs: &MagneticFlux<T>) -> Self::Output {
3031 Charge{C: self.S.clone() * rhs.Wb.clone()}
3032 }
3033}
3034
3035impl<T> core::ops::Mul<Voltage<T>> for Conductance<T> where T: NumLike {
3038 type Output = Current<T>;
3039 fn mul(self, rhs: Voltage<T>) -> Self::Output {
3040 Current{A: self.S * rhs.V}
3041 }
3042}
3043impl<T> core::ops::Mul<Voltage<T>> for &Conductance<T> where T: NumLike {
3045 type Output = Current<T>;
3046 fn mul(self, rhs: Voltage<T>) -> Self::Output {
3047 Current{A: self.S.clone() * rhs.V}
3048 }
3049}
3050impl<T> core::ops::Mul<&Voltage<T>> for Conductance<T> where T: NumLike {
3052 type Output = Current<T>;
3053 fn mul(self, rhs: &Voltage<T>) -> Self::Output {
3054 Current{A: self.S * rhs.V.clone()}
3055 }
3056}
3057impl<T> core::ops::Mul<&Voltage<T>> for &Conductance<T> where T: NumLike {
3059 type Output = Current<T>;
3060 fn mul(self, rhs: &Voltage<T>) -> Self::Output {
3061 Current{A: self.S.clone() * rhs.V.clone()}
3062 }
3063}
3064
3065impl<T> core::ops::Mul<Frequency<T>> for Conductance<T> where T: NumLike {
3068 type Output = InverseInductance<T>;
3069 fn mul(self, rhs: Frequency<T>) -> Self::Output {
3070 InverseInductance{per_H: self.S * rhs.Hz}
3071 }
3072}
3073impl<T> core::ops::Mul<Frequency<T>> for &Conductance<T> where T: NumLike {
3075 type Output = InverseInductance<T>;
3076 fn mul(self, rhs: Frequency<T>) -> Self::Output {
3077 InverseInductance{per_H: self.S.clone() * rhs.Hz}
3078 }
3079}
3080impl<T> core::ops::Mul<&Frequency<T>> for Conductance<T> where T: NumLike {
3082 type Output = InverseInductance<T>;
3083 fn mul(self, rhs: &Frequency<T>) -> Self::Output {
3084 InverseInductance{per_H: self.S * rhs.Hz.clone()}
3085 }
3086}
3087impl<T> core::ops::Mul<&Frequency<T>> for &Conductance<T> where T: NumLike {
3089 type Output = InverseInductance<T>;
3090 fn mul(self, rhs: &Frequency<T>) -> Self::Output {
3091 InverseInductance{per_H: self.S.clone() * rhs.Hz.clone()}
3092 }
3093}
3094
3095impl<T> core::ops::Div<Frequency<T>> for Conductance<T> where T: NumLike {
3098 type Output = Capacitance<T>;
3099 fn div(self, rhs: Frequency<T>) -> Self::Output {
3100 Capacitance{F: self.S / rhs.Hz}
3101 }
3102}
3103impl<T> core::ops::Div<Frequency<T>> for &Conductance<T> where T: NumLike {
3105 type Output = Capacitance<T>;
3106 fn div(self, rhs: Frequency<T>) -> Self::Output {
3107 Capacitance{F: self.S.clone() / rhs.Hz}
3108 }
3109}
3110impl<T> core::ops::Div<&Frequency<T>> for Conductance<T> where T: NumLike {
3112 type Output = Capacitance<T>;
3113 fn div(self, rhs: &Frequency<T>) -> Self::Output {
3114 Capacitance{F: self.S / rhs.Hz.clone()}
3115 }
3116}
3117impl<T> core::ops::Div<&Frequency<T>> for &Conductance<T> where T: NumLike {
3119 type Output = Capacitance<T>;
3120 fn div(self, rhs: &Frequency<T>) -> Self::Output {
3121 Capacitance{F: self.S.clone() / rhs.Hz.clone()}
3122 }
3123}
3124
3125impl<T> core::ops::Div<Conductance<T>> for f64 where T: NumLike+From<f64> {
3128 type Output = Resistance<T>;
3129 fn div(self, rhs: Conductance<T>) -> Self::Output {
3130 Resistance{Ohm: T::from(self) / rhs.S}
3131 }
3132}
3133impl<T> core::ops::Div<Conductance<T>> for &f64 where T: NumLike+From<f64> {
3135 type Output = Resistance<T>;
3136 fn div(self, rhs: Conductance<T>) -> Self::Output {
3137 Resistance{Ohm: T::from(self.clone()) / rhs.S}
3138 }
3139}
3140impl<T> core::ops::Div<&Conductance<T>> for f64 where T: NumLike+From<f64> {
3142 type Output = Resistance<T>;
3143 fn div(self, rhs: &Conductance<T>) -> Self::Output {
3144 Resistance{Ohm: T::from(self) / rhs.S.clone()}
3145 }
3146}
3147impl<T> core::ops::Div<&Conductance<T>> for &f64 where T: NumLike+From<f64> {
3149 type Output = Resistance<T>;
3150 fn div(self, rhs: &Conductance<T>) -> Self::Output {
3151 Resistance{Ohm: T::from(self.clone()) / rhs.S.clone()}
3152 }
3153}
3154
3155impl<T> core::ops::Div<Conductance<T>> for f32 where T: NumLike+From<f32> {
3158 type Output = Resistance<T>;
3159 fn div(self, rhs: Conductance<T>) -> Self::Output {
3160 Resistance{Ohm: T::from(self) / rhs.S}
3161 }
3162}
3163impl<T> core::ops::Div<Conductance<T>> for &f32 where T: NumLike+From<f32> {
3165 type Output = Resistance<T>;
3166 fn div(self, rhs: Conductance<T>) -> Self::Output {
3167 Resistance{Ohm: T::from(self.clone()) / rhs.S}
3168 }
3169}
3170impl<T> core::ops::Div<&Conductance<T>> for f32 where T: NumLike+From<f32> {
3172 type Output = Resistance<T>;
3173 fn div(self, rhs: &Conductance<T>) -> Self::Output {
3174 Resistance{Ohm: T::from(self) / rhs.S.clone()}
3175 }
3176}
3177impl<T> core::ops::Div<&Conductance<T>> for &f32 where T: NumLike+From<f32> {
3179 type Output = Resistance<T>;
3180 fn div(self, rhs: &Conductance<T>) -> Self::Output {
3181 Resistance{Ohm: T::from(self.clone()) / rhs.S.clone()}
3182 }
3183}
3184
3185impl<T> core::ops::Div<Conductance<T>> for i64 where T: NumLike+From<i64> {
3188 type Output = Resistance<T>;
3189 fn div(self, rhs: Conductance<T>) -> Self::Output {
3190 Resistance{Ohm: T::from(self) / rhs.S}
3191 }
3192}
3193impl<T> core::ops::Div<Conductance<T>> for &i64 where T: NumLike+From<i64> {
3195 type Output = Resistance<T>;
3196 fn div(self, rhs: Conductance<T>) -> Self::Output {
3197 Resistance{Ohm: T::from(self.clone()) / rhs.S}
3198 }
3199}
3200impl<T> core::ops::Div<&Conductance<T>> for i64 where T: NumLike+From<i64> {
3202 type Output = Resistance<T>;
3203 fn div(self, rhs: &Conductance<T>) -> Self::Output {
3204 Resistance{Ohm: T::from(self) / rhs.S.clone()}
3205 }
3206}
3207impl<T> core::ops::Div<&Conductance<T>> for &i64 where T: NumLike+From<i64> {
3209 type Output = Resistance<T>;
3210 fn div(self, rhs: &Conductance<T>) -> Self::Output {
3211 Resistance{Ohm: T::from(self.clone()) / rhs.S.clone()}
3212 }
3213}
3214
3215impl<T> core::ops::Div<Conductance<T>> for i32 where T: NumLike+From<i32> {
3218 type Output = Resistance<T>;
3219 fn div(self, rhs: Conductance<T>) -> Self::Output {
3220 Resistance{Ohm: T::from(self) / rhs.S}
3221 }
3222}
3223impl<T> core::ops::Div<Conductance<T>> for &i32 where T: NumLike+From<i32> {
3225 type Output = Resistance<T>;
3226 fn div(self, rhs: Conductance<T>) -> Self::Output {
3227 Resistance{Ohm: T::from(self.clone()) / rhs.S}
3228 }
3229}
3230impl<T> core::ops::Div<&Conductance<T>> for i32 where T: NumLike+From<i32> {
3232 type Output = Resistance<T>;
3233 fn div(self, rhs: &Conductance<T>) -> Self::Output {
3234 Resistance{Ohm: T::from(self) / rhs.S.clone()}
3235 }
3236}
3237impl<T> core::ops::Div<&Conductance<T>> for &i32 where T: NumLike+From<i32> {
3239 type Output = Resistance<T>;
3240 fn div(self, rhs: &Conductance<T>) -> Self::Output {
3241 Resistance{Ohm: T::from(self.clone()) / rhs.S.clone()}
3242 }
3243}
3244
3245#[cfg(feature="num-bigfloat")]
3248impl<T> core::ops::Div<Conductance<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
3249 type Output = Resistance<T>;
3250 fn div(self, rhs: Conductance<T>) -> Self::Output {
3251 Resistance{Ohm: T::from(self) / rhs.S}
3252 }
3253}
3254#[cfg(feature="num-bigfloat")]
3256impl<T> core::ops::Div<Conductance<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
3257 type Output = Resistance<T>;
3258 fn div(self, rhs: Conductance<T>) -> Self::Output {
3259 Resistance{Ohm: T::from(self.clone()) / rhs.S}
3260 }
3261}
3262#[cfg(feature="num-bigfloat")]
3264impl<T> core::ops::Div<&Conductance<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
3265 type Output = Resistance<T>;
3266 fn div(self, rhs: &Conductance<T>) -> Self::Output {
3267 Resistance{Ohm: T::from(self) / rhs.S.clone()}
3268 }
3269}
3270#[cfg(feature="num-bigfloat")]
3272impl<T> core::ops::Div<&Conductance<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
3273 type Output = Resistance<T>;
3274 fn div(self, rhs: &Conductance<T>) -> Self::Output {
3275 Resistance{Ohm: T::from(self.clone()) / rhs.S.clone()}
3276 }
3277}
3278
3279#[cfg(feature="num-complex")]
3282impl<T> core::ops::Div<Conductance<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
3283 type Output = Resistance<T>;
3284 fn div(self, rhs: Conductance<T>) -> Self::Output {
3285 Resistance{Ohm: T::from(self) / rhs.S}
3286 }
3287}
3288#[cfg(feature="num-complex")]
3290impl<T> core::ops::Div<Conductance<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
3291 type Output = Resistance<T>;
3292 fn div(self, rhs: Conductance<T>) -> Self::Output {
3293 Resistance{Ohm: T::from(self.clone()) / rhs.S}
3294 }
3295}
3296#[cfg(feature="num-complex")]
3298impl<T> core::ops::Div<&Conductance<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
3299 type Output = Resistance<T>;
3300 fn div(self, rhs: &Conductance<T>) -> Self::Output {
3301 Resistance{Ohm: T::from(self) / rhs.S.clone()}
3302 }
3303}
3304#[cfg(feature="num-complex")]
3306impl<T> core::ops::Div<&Conductance<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
3307 type Output = Resistance<T>;
3308 fn div(self, rhs: &Conductance<T>) -> Self::Output {
3309 Resistance{Ohm: T::from(self.clone()) / rhs.S.clone()}
3310 }
3311}
3312
3313#[cfg(feature="num-complex")]
3316impl<T> core::ops::Div<Conductance<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
3317 type Output = Resistance<T>;
3318 fn div(self, rhs: Conductance<T>) -> Self::Output {
3319 Resistance{Ohm: T::from(self) / rhs.S}
3320 }
3321}
3322#[cfg(feature="num-complex")]
3324impl<T> core::ops::Div<Conductance<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
3325 type Output = Resistance<T>;
3326 fn div(self, rhs: Conductance<T>) -> Self::Output {
3327 Resistance{Ohm: T::from(self.clone()) / rhs.S}
3328 }
3329}
3330#[cfg(feature="num-complex")]
3332impl<T> core::ops::Div<&Conductance<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
3333 type Output = Resistance<T>;
3334 fn div(self, rhs: &Conductance<T>) -> Self::Output {
3335 Resistance{Ohm: T::from(self) / rhs.S.clone()}
3336 }
3337}
3338#[cfg(feature="num-complex")]
3340impl<T> core::ops::Div<&Conductance<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
3341 type Output = Resistance<T>;
3342 fn div(self, rhs: &Conductance<T>) -> Self::Output {
3343 Resistance{Ohm: T::from(self.clone()) / rhs.S.clone()}
3344 }
3345}
3346
3347#[derive(UnitStruct, Debug, Clone)]
3349#[cfg_attr(feature="serde", derive(Serialize, Deserialize))]
3350pub struct Elastance<T: NumLike>{
3351 pub per_F: T
3353}
3354
3355impl<T> Elastance<T> where T: NumLike {
3356
3357 pub fn unit_name() -> &'static str { "inverse farads" }
3359
3360 pub fn unit_symbol() -> &'static str { "1/F" }
3362
3363 pub fn from_per_F(per_F: T) -> Self { Elastance{per_F: per_F} }
3368
3369 pub fn to_per_F(&self) -> T { self.per_F.clone() }
3371
3372 pub fn from_per_farads(per_farads: T) -> Self { Elastance{per_F: per_farads} }
3377
3378 pub fn to_per_farads(&self) -> T { self.per_F.clone() }
3380
3381}
3382
3383impl<T> fmt::Display for Elastance<T> where T: NumLike {
3384 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3385 write!(f, "{} {}", &self.per_F, Self::unit_symbol())
3386 }
3387}
3388
3389impl<T> Elastance<T> where T: NumLike+From<f64> {
3390
3391 pub fn to_per_mF(&self) -> T {
3395 return self.per_F.clone() * T::from(0.001_f64);
3396 }
3397
3398 pub fn from_per_mF(per_mF: T) -> Self {
3405 Elastance{per_F: per_mF * T::from(1000.0_f64)}
3406 }
3407
3408 pub fn to_per_uF(&self) -> T {
3412 return self.per_F.clone() * T::from(1e-06_f64);
3413 }
3414
3415 pub fn from_per_uF(per_uF: T) -> Self {
3422 Elastance{per_F: per_uF * T::from(1000000.0_f64)}
3423 }
3424
3425 pub fn to_per_nF(&self) -> T {
3429 return self.per_F.clone() * T::from(1e-09_f64);
3430 }
3431
3432 pub fn from_per_nF(per_nF: T) -> Self {
3439 Elastance{per_F: per_nF * T::from(1000000000.0_f64)}
3440 }
3441
3442 pub fn to_per_pF(&self) -> T {
3446 return self.per_F.clone() * T::from(1e-12_f64);
3447 }
3448
3449 pub fn from_per_pF(per_pF: T) -> Self {
3456 Elastance{per_F: per_pF * T::from(1000000000000.0_f64)}
3457 }
3458
3459 pub fn to_per_kF(&self) -> T {
3463 return self.per_F.clone() * T::from(1000.0_f64);
3464 }
3465
3466 pub fn from_per_kF(per_kF: T) -> Self {
3473 Elastance{per_F: per_kF * T::from(0.001_f64)}
3474 }
3475
3476 pub fn to_per_MF(&self) -> T {
3480 return self.per_F.clone() * T::from(1000000.0_f64);
3481 }
3482
3483 pub fn from_per_MF(per_MF: T) -> Self {
3490 Elastance{per_F: per_MF * T::from(1e-06_f64)}
3491 }
3492
3493 pub fn to_per_GF(&self) -> T {
3497 return self.per_F.clone() * T::from(1000000000.0_f64);
3498 }
3499
3500 pub fn from_per_GF(per_GF: T) -> Self {
3507 Elastance{per_F: per_GF * T::from(1e-09_f64)}
3508 }
3509
3510}
3511
3512
3513#[cfg(feature="num-bigfloat")]
3515impl core::ops::Mul<Elastance<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
3516 type Output = Elastance<num_bigfloat::BigFloat>;
3517 fn mul(self, rhs: Elastance<num_bigfloat::BigFloat>) -> Self::Output {
3518 Elastance{per_F: self * rhs.per_F}
3519 }
3520}
3521#[cfg(feature="num-bigfloat")]
3523impl core::ops::Mul<Elastance<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
3524 type Output = Elastance<num_bigfloat::BigFloat>;
3525 fn mul(self, rhs: Elastance<num_bigfloat::BigFloat>) -> Self::Output {
3526 Elastance{per_F: self.clone() * rhs.per_F}
3527 }
3528}
3529#[cfg(feature="num-bigfloat")]
3531impl core::ops::Mul<&Elastance<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
3532 type Output = Elastance<num_bigfloat::BigFloat>;
3533 fn mul(self, rhs: &Elastance<num_bigfloat::BigFloat>) -> Self::Output {
3534 Elastance{per_F: self * rhs.per_F.clone()}
3535 }
3536}
3537#[cfg(feature="num-bigfloat")]
3539impl core::ops::Mul<&Elastance<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
3540 type Output = Elastance<num_bigfloat::BigFloat>;
3541 fn mul(self, rhs: &Elastance<num_bigfloat::BigFloat>) -> Self::Output {
3542 Elastance{per_F: self.clone() * rhs.per_F.clone()}
3543 }
3544}
3545
3546#[cfg(feature="num-complex")]
3548impl core::ops::Mul<Elastance<num_complex::Complex32>> for num_complex::Complex32 {
3549 type Output = Elastance<num_complex::Complex32>;
3550 fn mul(self, rhs: Elastance<num_complex::Complex32>) -> Self::Output {
3551 Elastance{per_F: self * rhs.per_F}
3552 }
3553}
3554#[cfg(feature="num-complex")]
3556impl core::ops::Mul<Elastance<num_complex::Complex32>> for &num_complex::Complex32 {
3557 type Output = Elastance<num_complex::Complex32>;
3558 fn mul(self, rhs: Elastance<num_complex::Complex32>) -> Self::Output {
3559 Elastance{per_F: self.clone() * rhs.per_F}
3560 }
3561}
3562#[cfg(feature="num-complex")]
3564impl core::ops::Mul<&Elastance<num_complex::Complex32>> for num_complex::Complex32 {
3565 type Output = Elastance<num_complex::Complex32>;
3566 fn mul(self, rhs: &Elastance<num_complex::Complex32>) -> Self::Output {
3567 Elastance{per_F: self * rhs.per_F.clone()}
3568 }
3569}
3570#[cfg(feature="num-complex")]
3572impl core::ops::Mul<&Elastance<num_complex::Complex32>> for &num_complex::Complex32 {
3573 type Output = Elastance<num_complex::Complex32>;
3574 fn mul(self, rhs: &Elastance<num_complex::Complex32>) -> Self::Output {
3575 Elastance{per_F: self.clone() * rhs.per_F.clone()}
3576 }
3577}
3578
3579#[cfg(feature="num-complex")]
3581impl core::ops::Mul<Elastance<num_complex::Complex64>> for num_complex::Complex64 {
3582 type Output = Elastance<num_complex::Complex64>;
3583 fn mul(self, rhs: Elastance<num_complex::Complex64>) -> Self::Output {
3584 Elastance{per_F: self * rhs.per_F}
3585 }
3586}
3587#[cfg(feature="num-complex")]
3589impl core::ops::Mul<Elastance<num_complex::Complex64>> for &num_complex::Complex64 {
3590 type Output = Elastance<num_complex::Complex64>;
3591 fn mul(self, rhs: Elastance<num_complex::Complex64>) -> Self::Output {
3592 Elastance{per_F: self.clone() * rhs.per_F}
3593 }
3594}
3595#[cfg(feature="num-complex")]
3597impl core::ops::Mul<&Elastance<num_complex::Complex64>> for num_complex::Complex64 {
3598 type Output = Elastance<num_complex::Complex64>;
3599 fn mul(self, rhs: &Elastance<num_complex::Complex64>) -> Self::Output {
3600 Elastance{per_F: self * rhs.per_F.clone()}
3601 }
3602}
3603#[cfg(feature="num-complex")]
3605impl core::ops::Mul<&Elastance<num_complex::Complex64>> for &num_complex::Complex64 {
3606 type Output = Elastance<num_complex::Complex64>;
3607 fn mul(self, rhs: &Elastance<num_complex::Complex64>) -> Self::Output {
3608 Elastance{per_F: self.clone() * rhs.per_F.clone()}
3609 }
3610}
3611
3612
3613
3614
3615impl<T> core::ops::Mul<Time<T>> for Elastance<T> where T: NumLike {
3618 type Output = Resistance<T>;
3619 fn mul(self, rhs: Time<T>) -> Self::Output {
3620 Resistance{Ohm: self.per_F * rhs.s}
3621 }
3622}
3623impl<T> core::ops::Mul<Time<T>> for &Elastance<T> where T: NumLike {
3625 type Output = Resistance<T>;
3626 fn mul(self, rhs: Time<T>) -> Self::Output {
3627 Resistance{Ohm: self.per_F.clone() * rhs.s}
3628 }
3629}
3630impl<T> core::ops::Mul<&Time<T>> for Elastance<T> where T: NumLike {
3632 type Output = Resistance<T>;
3633 fn mul(self, rhs: &Time<T>) -> Self::Output {
3634 Resistance{Ohm: self.per_F * rhs.s.clone()}
3635 }
3636}
3637impl<T> core::ops::Mul<&Time<T>> for &Elastance<T> where T: NumLike {
3639 type Output = Resistance<T>;
3640 fn mul(self, rhs: &Time<T>) -> Self::Output {
3641 Resistance{Ohm: self.per_F.clone() * rhs.s.clone()}
3642 }
3643}
3644
3645impl<T> core::ops::Mul<Charge<T>> for Elastance<T> where T: NumLike {
3648 type Output = Voltage<T>;
3649 fn mul(self, rhs: Charge<T>) -> Self::Output {
3650 Voltage{V: self.per_F * rhs.C}
3651 }
3652}
3653impl<T> core::ops::Mul<Charge<T>> for &Elastance<T> where T: NumLike {
3655 type Output = Voltage<T>;
3656 fn mul(self, rhs: Charge<T>) -> Self::Output {
3657 Voltage{V: self.per_F.clone() * rhs.C}
3658 }
3659}
3660impl<T> core::ops::Mul<&Charge<T>> for Elastance<T> where T: NumLike {
3662 type Output = Voltage<T>;
3663 fn mul(self, rhs: &Charge<T>) -> Self::Output {
3664 Voltage{V: self.per_F * rhs.C.clone()}
3665 }
3666}
3667impl<T> core::ops::Mul<&Charge<T>> for &Elastance<T> where T: NumLike {
3669 type Output = Voltage<T>;
3670 fn mul(self, rhs: &Charge<T>) -> Self::Output {
3671 Voltage{V: self.per_F.clone() * rhs.C.clone()}
3672 }
3673}
3674
3675impl<T> core::ops::Mul<Conductance<T>> for Elastance<T> where T: NumLike {
3678 type Output = Frequency<T>;
3679 fn mul(self, rhs: Conductance<T>) -> Self::Output {
3680 Frequency{Hz: self.per_F * rhs.S}
3681 }
3682}
3683impl<T> core::ops::Mul<Conductance<T>> for &Elastance<T> where T: NumLike {
3685 type Output = Frequency<T>;
3686 fn mul(self, rhs: Conductance<T>) -> Self::Output {
3687 Frequency{Hz: self.per_F.clone() * rhs.S}
3688 }
3689}
3690impl<T> core::ops::Mul<&Conductance<T>> for Elastance<T> where T: NumLike {
3692 type Output = Frequency<T>;
3693 fn mul(self, rhs: &Conductance<T>) -> Self::Output {
3694 Frequency{Hz: self.per_F * rhs.S.clone()}
3695 }
3696}
3697impl<T> core::ops::Mul<&Conductance<T>> for &Elastance<T> where T: NumLike {
3699 type Output = Frequency<T>;
3700 fn mul(self, rhs: &Conductance<T>) -> Self::Output {
3701 Frequency{Hz: self.per_F.clone() * rhs.S.clone()}
3702 }
3703}
3704
3705impl<T> core::ops::Div<InverseCharge<T>> for Elastance<T> where T: NumLike {
3708 type Output = Voltage<T>;
3709 fn div(self, rhs: InverseCharge<T>) -> Self::Output {
3710 Voltage{V: self.per_F / rhs.per_C}
3711 }
3712}
3713impl<T> core::ops::Div<InverseCharge<T>> for &Elastance<T> where T: NumLike {
3715 type Output = Voltage<T>;
3716 fn div(self, rhs: InverseCharge<T>) -> Self::Output {
3717 Voltage{V: self.per_F.clone() / rhs.per_C}
3718 }
3719}
3720impl<T> core::ops::Div<&InverseCharge<T>> for Elastance<T> where T: NumLike {
3722 type Output = Voltage<T>;
3723 fn div(self, rhs: &InverseCharge<T>) -> Self::Output {
3724 Voltage{V: self.per_F / rhs.per_C.clone()}
3725 }
3726}
3727impl<T> core::ops::Div<&InverseCharge<T>> for &Elastance<T> where T: NumLike {
3729 type Output = Voltage<T>;
3730 fn div(self, rhs: &InverseCharge<T>) -> Self::Output {
3731 Voltage{V: self.per_F.clone() / rhs.per_C.clone()}
3732 }
3733}
3734
3735impl<T> core::ops::Mul<InverseVoltage<T>> for Elastance<T> where T: NumLike {
3738 type Output = InverseCharge<T>;
3739 fn mul(self, rhs: InverseVoltage<T>) -> Self::Output {
3740 InverseCharge{per_C: self.per_F * rhs.per_V}
3741 }
3742}
3743impl<T> core::ops::Mul<InverseVoltage<T>> for &Elastance<T> where T: NumLike {
3745 type Output = InverseCharge<T>;
3746 fn mul(self, rhs: InverseVoltage<T>) -> Self::Output {
3747 InverseCharge{per_C: self.per_F.clone() * rhs.per_V}
3748 }
3749}
3750impl<T> core::ops::Mul<&InverseVoltage<T>> for Elastance<T> where T: NumLike {
3752 type Output = InverseCharge<T>;
3753 fn mul(self, rhs: &InverseVoltage<T>) -> Self::Output {
3754 InverseCharge{per_C: self.per_F * rhs.per_V.clone()}
3755 }
3756}
3757impl<T> core::ops::Mul<&InverseVoltage<T>> for &Elastance<T> where T: NumLike {
3759 type Output = InverseCharge<T>;
3760 fn mul(self, rhs: &InverseVoltage<T>) -> Self::Output {
3761 InverseCharge{per_C: self.per_F.clone() * rhs.per_V.clone()}
3762 }
3763}
3764
3765impl<T> core::ops::Div<Resistance<T>> for Elastance<T> where T: NumLike {
3768 type Output = Frequency<T>;
3769 fn div(self, rhs: Resistance<T>) -> Self::Output {
3770 Frequency{Hz: self.per_F / rhs.Ohm}
3771 }
3772}
3773impl<T> core::ops::Div<Resistance<T>> for &Elastance<T> where T: NumLike {
3775 type Output = Frequency<T>;
3776 fn div(self, rhs: Resistance<T>) -> Self::Output {
3777 Frequency{Hz: self.per_F.clone() / rhs.Ohm}
3778 }
3779}
3780impl<T> core::ops::Div<&Resistance<T>> for Elastance<T> where T: NumLike {
3782 type Output = Frequency<T>;
3783 fn div(self, rhs: &Resistance<T>) -> Self::Output {
3784 Frequency{Hz: self.per_F / rhs.Ohm.clone()}
3785 }
3786}
3787impl<T> core::ops::Div<&Resistance<T>> for &Elastance<T> where T: NumLike {
3789 type Output = Frequency<T>;
3790 fn div(self, rhs: &Resistance<T>) -> Self::Output {
3791 Frequency{Hz: self.per_F.clone() / rhs.Ohm.clone()}
3792 }
3793}
3794
3795impl<T> core::ops::Div<Voltage<T>> for Elastance<T> where T: NumLike {
3798 type Output = InverseCharge<T>;
3799 fn div(self, rhs: Voltage<T>) -> Self::Output {
3800 InverseCharge{per_C: self.per_F / rhs.V}
3801 }
3802}
3803impl<T> core::ops::Div<Voltage<T>> for &Elastance<T> where T: NumLike {
3805 type Output = InverseCharge<T>;
3806 fn div(self, rhs: Voltage<T>) -> Self::Output {
3807 InverseCharge{per_C: self.per_F.clone() / rhs.V}
3808 }
3809}
3810impl<T> core::ops::Div<&Voltage<T>> for Elastance<T> where T: NumLike {
3812 type Output = InverseCharge<T>;
3813 fn div(self, rhs: &Voltage<T>) -> Self::Output {
3814 InverseCharge{per_C: self.per_F / rhs.V.clone()}
3815 }
3816}
3817impl<T> core::ops::Div<&Voltage<T>> for &Elastance<T> where T: NumLike {
3819 type Output = InverseCharge<T>;
3820 fn div(self, rhs: &Voltage<T>) -> Self::Output {
3821 InverseCharge{per_C: self.per_F.clone() / rhs.V.clone()}
3822 }
3823}
3824
3825impl<T> core::ops::Div<Frequency<T>> for Elastance<T> where T: NumLike {
3828 type Output = Resistance<T>;
3829 fn div(self, rhs: Frequency<T>) -> Self::Output {
3830 Resistance{Ohm: self.per_F / rhs.Hz}
3831 }
3832}
3833impl<T> core::ops::Div<Frequency<T>> for &Elastance<T> where T: NumLike {
3835 type Output = Resistance<T>;
3836 fn div(self, rhs: Frequency<T>) -> Self::Output {
3837 Resistance{Ohm: self.per_F.clone() / rhs.Hz}
3838 }
3839}
3840impl<T> core::ops::Div<&Frequency<T>> for Elastance<T> where T: NumLike {
3842 type Output = Resistance<T>;
3843 fn div(self, rhs: &Frequency<T>) -> Self::Output {
3844 Resistance{Ohm: self.per_F / rhs.Hz.clone()}
3845 }
3846}
3847impl<T> core::ops::Div<&Frequency<T>> for &Elastance<T> where T: NumLike {
3849 type Output = Resistance<T>;
3850 fn div(self, rhs: &Frequency<T>) -> Self::Output {
3851 Resistance{Ohm: self.per_F.clone() / rhs.Hz.clone()}
3852 }
3853}
3854
3855impl<T> core::ops::Div<Elastance<T>> for f64 where T: NumLike+From<f64> {
3858 type Output = Capacitance<T>;
3859 fn div(self, rhs: Elastance<T>) -> Self::Output {
3860 Capacitance{F: T::from(self) / rhs.per_F}
3861 }
3862}
3863impl<T> core::ops::Div<Elastance<T>> for &f64 where T: NumLike+From<f64> {
3865 type Output = Capacitance<T>;
3866 fn div(self, rhs: Elastance<T>) -> Self::Output {
3867 Capacitance{F: T::from(self.clone()) / rhs.per_F}
3868 }
3869}
3870impl<T> core::ops::Div<&Elastance<T>> for f64 where T: NumLike+From<f64> {
3872 type Output = Capacitance<T>;
3873 fn div(self, rhs: &Elastance<T>) -> Self::Output {
3874 Capacitance{F: T::from(self) / rhs.per_F.clone()}
3875 }
3876}
3877impl<T> core::ops::Div<&Elastance<T>> for &f64 where T: NumLike+From<f64> {
3879 type Output = Capacitance<T>;
3880 fn div(self, rhs: &Elastance<T>) -> Self::Output {
3881 Capacitance{F: T::from(self.clone()) / rhs.per_F.clone()}
3882 }
3883}
3884
3885impl<T> core::ops::Div<Elastance<T>> for f32 where T: NumLike+From<f32> {
3888 type Output = Capacitance<T>;
3889 fn div(self, rhs: Elastance<T>) -> Self::Output {
3890 Capacitance{F: T::from(self) / rhs.per_F}
3891 }
3892}
3893impl<T> core::ops::Div<Elastance<T>> for &f32 where T: NumLike+From<f32> {
3895 type Output = Capacitance<T>;
3896 fn div(self, rhs: Elastance<T>) -> Self::Output {
3897 Capacitance{F: T::from(self.clone()) / rhs.per_F}
3898 }
3899}
3900impl<T> core::ops::Div<&Elastance<T>> for f32 where T: NumLike+From<f32> {
3902 type Output = Capacitance<T>;
3903 fn div(self, rhs: &Elastance<T>) -> Self::Output {
3904 Capacitance{F: T::from(self) / rhs.per_F.clone()}
3905 }
3906}
3907impl<T> core::ops::Div<&Elastance<T>> for &f32 where T: NumLike+From<f32> {
3909 type Output = Capacitance<T>;
3910 fn div(self, rhs: &Elastance<T>) -> Self::Output {
3911 Capacitance{F: T::from(self.clone()) / rhs.per_F.clone()}
3912 }
3913}
3914
3915impl<T> core::ops::Div<Elastance<T>> for i64 where T: NumLike+From<i64> {
3918 type Output = Capacitance<T>;
3919 fn div(self, rhs: Elastance<T>) -> Self::Output {
3920 Capacitance{F: T::from(self) / rhs.per_F}
3921 }
3922}
3923impl<T> core::ops::Div<Elastance<T>> for &i64 where T: NumLike+From<i64> {
3925 type Output = Capacitance<T>;
3926 fn div(self, rhs: Elastance<T>) -> Self::Output {
3927 Capacitance{F: T::from(self.clone()) / rhs.per_F}
3928 }
3929}
3930impl<T> core::ops::Div<&Elastance<T>> for i64 where T: NumLike+From<i64> {
3932 type Output = Capacitance<T>;
3933 fn div(self, rhs: &Elastance<T>) -> Self::Output {
3934 Capacitance{F: T::from(self) / rhs.per_F.clone()}
3935 }
3936}
3937impl<T> core::ops::Div<&Elastance<T>> for &i64 where T: NumLike+From<i64> {
3939 type Output = Capacitance<T>;
3940 fn div(self, rhs: &Elastance<T>) -> Self::Output {
3941 Capacitance{F: T::from(self.clone()) / rhs.per_F.clone()}
3942 }
3943}
3944
3945impl<T> core::ops::Div<Elastance<T>> for i32 where T: NumLike+From<i32> {
3948 type Output = Capacitance<T>;
3949 fn div(self, rhs: Elastance<T>) -> Self::Output {
3950 Capacitance{F: T::from(self) / rhs.per_F}
3951 }
3952}
3953impl<T> core::ops::Div<Elastance<T>> for &i32 where T: NumLike+From<i32> {
3955 type Output = Capacitance<T>;
3956 fn div(self, rhs: Elastance<T>) -> Self::Output {
3957 Capacitance{F: T::from(self.clone()) / rhs.per_F}
3958 }
3959}
3960impl<T> core::ops::Div<&Elastance<T>> for i32 where T: NumLike+From<i32> {
3962 type Output = Capacitance<T>;
3963 fn div(self, rhs: &Elastance<T>) -> Self::Output {
3964 Capacitance{F: T::from(self) / rhs.per_F.clone()}
3965 }
3966}
3967impl<T> core::ops::Div<&Elastance<T>> for &i32 where T: NumLike+From<i32> {
3969 type Output = Capacitance<T>;
3970 fn div(self, rhs: &Elastance<T>) -> Self::Output {
3971 Capacitance{F: T::from(self.clone()) / rhs.per_F.clone()}
3972 }
3973}
3974
3975#[cfg(feature="num-bigfloat")]
3978impl<T> core::ops::Div<Elastance<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
3979 type Output = Capacitance<T>;
3980 fn div(self, rhs: Elastance<T>) -> Self::Output {
3981 Capacitance{F: T::from(self) / rhs.per_F}
3982 }
3983}
3984#[cfg(feature="num-bigfloat")]
3986impl<T> core::ops::Div<Elastance<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
3987 type Output = Capacitance<T>;
3988 fn div(self, rhs: Elastance<T>) -> Self::Output {
3989 Capacitance{F: T::from(self.clone()) / rhs.per_F}
3990 }
3991}
3992#[cfg(feature="num-bigfloat")]
3994impl<T> core::ops::Div<&Elastance<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
3995 type Output = Capacitance<T>;
3996 fn div(self, rhs: &Elastance<T>) -> Self::Output {
3997 Capacitance{F: T::from(self) / rhs.per_F.clone()}
3998 }
3999}
4000#[cfg(feature="num-bigfloat")]
4002impl<T> core::ops::Div<&Elastance<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
4003 type Output = Capacitance<T>;
4004 fn div(self, rhs: &Elastance<T>) -> Self::Output {
4005 Capacitance{F: T::from(self.clone()) / rhs.per_F.clone()}
4006 }
4007}
4008
4009#[cfg(feature="num-complex")]
4012impl<T> core::ops::Div<Elastance<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
4013 type Output = Capacitance<T>;
4014 fn div(self, rhs: Elastance<T>) -> Self::Output {
4015 Capacitance{F: T::from(self) / rhs.per_F}
4016 }
4017}
4018#[cfg(feature="num-complex")]
4020impl<T> core::ops::Div<Elastance<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
4021 type Output = Capacitance<T>;
4022 fn div(self, rhs: Elastance<T>) -> Self::Output {
4023 Capacitance{F: T::from(self.clone()) / rhs.per_F}
4024 }
4025}
4026#[cfg(feature="num-complex")]
4028impl<T> core::ops::Div<&Elastance<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
4029 type Output = Capacitance<T>;
4030 fn div(self, rhs: &Elastance<T>) -> Self::Output {
4031 Capacitance{F: T::from(self) / rhs.per_F.clone()}
4032 }
4033}
4034#[cfg(feature="num-complex")]
4036impl<T> core::ops::Div<&Elastance<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
4037 type Output = Capacitance<T>;
4038 fn div(self, rhs: &Elastance<T>) -> Self::Output {
4039 Capacitance{F: T::from(self.clone()) / rhs.per_F.clone()}
4040 }
4041}
4042
4043#[cfg(feature="num-complex")]
4046impl<T> core::ops::Div<Elastance<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
4047 type Output = Capacitance<T>;
4048 fn div(self, rhs: Elastance<T>) -> Self::Output {
4049 Capacitance{F: T::from(self) / rhs.per_F}
4050 }
4051}
4052#[cfg(feature="num-complex")]
4054impl<T> core::ops::Div<Elastance<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
4055 type Output = Capacitance<T>;
4056 fn div(self, rhs: Elastance<T>) -> Self::Output {
4057 Capacitance{F: T::from(self.clone()) / rhs.per_F}
4058 }
4059}
4060#[cfg(feature="num-complex")]
4062impl<T> core::ops::Div<&Elastance<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
4063 type Output = Capacitance<T>;
4064 fn div(self, rhs: &Elastance<T>) -> Self::Output {
4065 Capacitance{F: T::from(self) / rhs.per_F.clone()}
4066 }
4067}
4068#[cfg(feature="num-complex")]
4070impl<T> core::ops::Div<&Elastance<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
4071 type Output = Capacitance<T>;
4072 fn div(self, rhs: &Elastance<T>) -> Self::Output {
4073 Capacitance{F: T::from(self.clone()) / rhs.per_F.clone()}
4074 }
4075}
4076
4077#[derive(UnitStruct, Debug, Clone)]
4079#[cfg_attr(feature="serde", derive(Serialize, Deserialize))]
4080pub struct Illuminance<T: NumLike>{
4081 pub lux: T
4083}
4084
4085impl<T> Illuminance<T> where T: NumLike {
4086
4087 pub fn unit_name() -> &'static str { "lux" }
4089
4090 pub fn unit_symbol() -> &'static str { "lux" }
4092
4093 pub fn from_lux(lux: T) -> Self { Illuminance{lux: lux} }
4098
4099 pub fn to_lux(&self) -> T { self.lux.clone() }
4101
4102}
4103
4104impl<T> fmt::Display for Illuminance<T> where T: NumLike {
4105 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4106 write!(f, "{} {}", &self.lux, Self::unit_symbol())
4107 }
4108}
4109
4110impl<T> Illuminance<T> where T: NumLike+From<f64> {
4111
4112 pub fn to_mlux(&self) -> T {
4116 return self.lux.clone() * T::from(1000.0_f64);
4117 }
4118
4119 pub fn from_mlux(mlux: T) -> Self {
4126 Illuminance{lux: mlux * T::from(0.001_f64)}
4127 }
4128
4129 pub fn to_ulux(&self) -> T {
4133 return self.lux.clone() * T::from(1000000.0_f64);
4134 }
4135
4136 pub fn from_ulux(ulux: T) -> Self {
4143 Illuminance{lux: ulux * T::from(1e-06_f64)}
4144 }
4145
4146 pub fn to_nlux(&self) -> T {
4150 return self.lux.clone() * T::from(1000000000.0_f64);
4151 }
4152
4153 pub fn from_nlux(nlux: T) -> Self {
4160 Illuminance{lux: nlux * T::from(1e-09_f64)}
4161 }
4162
4163 pub fn to_klux(&self) -> T {
4167 return self.lux.clone() * T::from(0.001_f64);
4168 }
4169
4170 pub fn from_klux(klux: T) -> Self {
4177 Illuminance{lux: klux * T::from(1000.0_f64)}
4178 }
4179
4180 pub fn to_Mlux(&self) -> T {
4184 return self.lux.clone() * T::from(1e-06_f64);
4185 }
4186
4187 pub fn from_Mlux(Mlux: T) -> Self {
4194 Illuminance{lux: Mlux * T::from(1000000.0_f64)}
4195 }
4196
4197 pub fn to_Glux(&self) -> T {
4201 return self.lux.clone() * T::from(1e-09_f64);
4202 }
4203
4204 pub fn from_Glux(Glux: T) -> Self {
4211 Illuminance{lux: Glux * T::from(1000000000.0_f64)}
4212 }
4213
4214}
4215
4216
4217#[cfg(feature="num-bigfloat")]
4219impl core::ops::Mul<Illuminance<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
4220 type Output = Illuminance<num_bigfloat::BigFloat>;
4221 fn mul(self, rhs: Illuminance<num_bigfloat::BigFloat>) -> Self::Output {
4222 Illuminance{lux: self * rhs.lux}
4223 }
4224}
4225#[cfg(feature="num-bigfloat")]
4227impl core::ops::Mul<Illuminance<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
4228 type Output = Illuminance<num_bigfloat::BigFloat>;
4229 fn mul(self, rhs: Illuminance<num_bigfloat::BigFloat>) -> Self::Output {
4230 Illuminance{lux: self.clone() * rhs.lux}
4231 }
4232}
4233#[cfg(feature="num-bigfloat")]
4235impl core::ops::Mul<&Illuminance<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
4236 type Output = Illuminance<num_bigfloat::BigFloat>;
4237 fn mul(self, rhs: &Illuminance<num_bigfloat::BigFloat>) -> Self::Output {
4238 Illuminance{lux: self * rhs.lux.clone()}
4239 }
4240}
4241#[cfg(feature="num-bigfloat")]
4243impl core::ops::Mul<&Illuminance<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
4244 type Output = Illuminance<num_bigfloat::BigFloat>;
4245 fn mul(self, rhs: &Illuminance<num_bigfloat::BigFloat>) -> Self::Output {
4246 Illuminance{lux: self.clone() * rhs.lux.clone()}
4247 }
4248}
4249
4250#[cfg(feature="num-complex")]
4252impl core::ops::Mul<Illuminance<num_complex::Complex32>> for num_complex::Complex32 {
4253 type Output = Illuminance<num_complex::Complex32>;
4254 fn mul(self, rhs: Illuminance<num_complex::Complex32>) -> Self::Output {
4255 Illuminance{lux: self * rhs.lux}
4256 }
4257}
4258#[cfg(feature="num-complex")]
4260impl core::ops::Mul<Illuminance<num_complex::Complex32>> for &num_complex::Complex32 {
4261 type Output = Illuminance<num_complex::Complex32>;
4262 fn mul(self, rhs: Illuminance<num_complex::Complex32>) -> Self::Output {
4263 Illuminance{lux: self.clone() * rhs.lux}
4264 }
4265}
4266#[cfg(feature="num-complex")]
4268impl core::ops::Mul<&Illuminance<num_complex::Complex32>> for num_complex::Complex32 {
4269 type Output = Illuminance<num_complex::Complex32>;
4270 fn mul(self, rhs: &Illuminance<num_complex::Complex32>) -> Self::Output {
4271 Illuminance{lux: self * rhs.lux.clone()}
4272 }
4273}
4274#[cfg(feature="num-complex")]
4276impl core::ops::Mul<&Illuminance<num_complex::Complex32>> for &num_complex::Complex32 {
4277 type Output = Illuminance<num_complex::Complex32>;
4278 fn mul(self, rhs: &Illuminance<num_complex::Complex32>) -> Self::Output {
4279 Illuminance{lux: self.clone() * rhs.lux.clone()}
4280 }
4281}
4282
4283#[cfg(feature="num-complex")]
4285impl core::ops::Mul<Illuminance<num_complex::Complex64>> for num_complex::Complex64 {
4286 type Output = Illuminance<num_complex::Complex64>;
4287 fn mul(self, rhs: Illuminance<num_complex::Complex64>) -> Self::Output {
4288 Illuminance{lux: self * rhs.lux}
4289 }
4290}
4291#[cfg(feature="num-complex")]
4293impl core::ops::Mul<Illuminance<num_complex::Complex64>> for &num_complex::Complex64 {
4294 type Output = Illuminance<num_complex::Complex64>;
4295 fn mul(self, rhs: Illuminance<num_complex::Complex64>) -> Self::Output {
4296 Illuminance{lux: self.clone() * rhs.lux}
4297 }
4298}
4299#[cfg(feature="num-complex")]
4301impl core::ops::Mul<&Illuminance<num_complex::Complex64>> for num_complex::Complex64 {
4302 type Output = Illuminance<num_complex::Complex64>;
4303 fn mul(self, rhs: &Illuminance<num_complex::Complex64>) -> Self::Output {
4304 Illuminance{lux: self * rhs.lux.clone()}
4305 }
4306}
4307#[cfg(feature="num-complex")]
4309impl core::ops::Mul<&Illuminance<num_complex::Complex64>> for &num_complex::Complex64 {
4310 type Output = Illuminance<num_complex::Complex64>;
4311 fn mul(self, rhs: &Illuminance<num_complex::Complex64>) -> Self::Output {
4312 Illuminance{lux: self.clone() * rhs.lux.clone()}
4313 }
4314}
4315
4316
4317
4318#[cfg(feature = "uom")]
4320impl<T> Into<uom::si::f32::Luminance> for Illuminance<T> where T: NumLike+Into<f32> {
4321 fn into(self) -> uom::si::f32::Luminance {
4322 uom::si::f32::Luminance::new::<uom::si::luminance::candela_per_square_meter>(self.lux.into())
4323 }
4324}
4325
4326#[cfg(feature = "uom")]
4328impl<T> From<uom::si::f32::Luminance> for Illuminance<T> where T: NumLike+From<f32> {
4329 fn from(src: uom::si::f32::Luminance) -> Self {
4330 Illuminance{lux: T::from(src.value)}
4331 }
4332}
4333
4334#[cfg(feature = "uom")]
4336impl<T> Into<uom::si::f64::Luminance> for Illuminance<T> where T: NumLike+Into<f64> {
4337 fn into(self) -> uom::si::f64::Luminance {
4338 uom::si::f64::Luminance::new::<uom::si::luminance::candela_per_square_meter>(self.lux.into())
4339 }
4340}
4341
4342#[cfg(feature = "uom")]
4344impl<T> From<uom::si::f64::Luminance> for Illuminance<T> where T: NumLike+From<f64> {
4345 fn from(src: uom::si::f64::Luminance) -> Self {
4346 Illuminance{lux: T::from(src.value)}
4347 }
4348}
4349
4350
4351impl<T> core::ops::Mul<InverseLuminousFlux<T>> for Illuminance<T> where T: NumLike {
4354 type Output = InverseArea<T>;
4355 fn mul(self, rhs: InverseLuminousFlux<T>) -> Self::Output {
4356 InverseArea{per_m2: self.lux * rhs.per_lm}
4357 }
4358}
4359impl<T> core::ops::Mul<InverseLuminousFlux<T>> for &Illuminance<T> where T: NumLike {
4361 type Output = InverseArea<T>;
4362 fn mul(self, rhs: InverseLuminousFlux<T>) -> Self::Output {
4363 InverseArea{per_m2: self.lux.clone() * rhs.per_lm}
4364 }
4365}
4366impl<T> core::ops::Mul<&InverseLuminousFlux<T>> for Illuminance<T> where T: NumLike {
4368 type Output = InverseArea<T>;
4369 fn mul(self, rhs: &InverseLuminousFlux<T>) -> Self::Output {
4370 InverseArea{per_m2: self.lux * rhs.per_lm.clone()}
4371 }
4372}
4373impl<T> core::ops::Mul<&InverseLuminousFlux<T>> for &Illuminance<T> where T: NumLike {
4375 type Output = InverseArea<T>;
4376 fn mul(self, rhs: &InverseLuminousFlux<T>) -> Self::Output {
4377 InverseArea{per_m2: self.lux.clone() * rhs.per_lm.clone()}
4378 }
4379}
4380
4381impl<T> core::ops::Div<LuminousFlux<T>> for Illuminance<T> where T: NumLike {
4384 type Output = InverseArea<T>;
4385 fn div(self, rhs: LuminousFlux<T>) -> Self::Output {
4386 InverseArea{per_m2: self.lux / rhs.lm}
4387 }
4388}
4389impl<T> core::ops::Div<LuminousFlux<T>> for &Illuminance<T> where T: NumLike {
4391 type Output = InverseArea<T>;
4392 fn div(self, rhs: LuminousFlux<T>) -> Self::Output {
4393 InverseArea{per_m2: self.lux.clone() / rhs.lm}
4394 }
4395}
4396impl<T> core::ops::Div<&LuminousFlux<T>> for Illuminance<T> where T: NumLike {
4398 type Output = InverseArea<T>;
4399 fn div(self, rhs: &LuminousFlux<T>) -> Self::Output {
4400 InverseArea{per_m2: self.lux / rhs.lm.clone()}
4401 }
4402}
4403impl<T> core::ops::Div<&LuminousFlux<T>> for &Illuminance<T> where T: NumLike {
4405 type Output = InverseArea<T>;
4406 fn div(self, rhs: &LuminousFlux<T>) -> Self::Output {
4407 InverseArea{per_m2: self.lux.clone() / rhs.lm.clone()}
4408 }
4409}
4410
4411impl<T> core::ops::Mul<Area<T>> for Illuminance<T> where T: NumLike {
4414 type Output = LuminousFlux<T>;
4415 fn mul(self, rhs: Area<T>) -> Self::Output {
4416 LuminousFlux{lm: self.lux * rhs.m2}
4417 }
4418}
4419impl<T> core::ops::Mul<Area<T>> for &Illuminance<T> where T: NumLike {
4421 type Output = LuminousFlux<T>;
4422 fn mul(self, rhs: Area<T>) -> Self::Output {
4423 LuminousFlux{lm: self.lux.clone() * rhs.m2}
4424 }
4425}
4426impl<T> core::ops::Mul<&Area<T>> for Illuminance<T> where T: NumLike {
4428 type Output = LuminousFlux<T>;
4429 fn mul(self, rhs: &Area<T>) -> Self::Output {
4430 LuminousFlux{lm: self.lux * rhs.m2.clone()}
4431 }
4432}
4433impl<T> core::ops::Mul<&Area<T>> for &Illuminance<T> where T: NumLike {
4435 type Output = LuminousFlux<T>;
4436 fn mul(self, rhs: &Area<T>) -> Self::Output {
4437 LuminousFlux{lm: self.lux.clone() * rhs.m2.clone()}
4438 }
4439}
4440
4441impl<T> core::ops::Div<InverseArea<T>> for Illuminance<T> where T: NumLike {
4444 type Output = LuminousFlux<T>;
4445 fn div(self, rhs: InverseArea<T>) -> Self::Output {
4446 LuminousFlux{lm: self.lux / rhs.per_m2}
4447 }
4448}
4449impl<T> core::ops::Div<InverseArea<T>> for &Illuminance<T> where T: NumLike {
4451 type Output = LuminousFlux<T>;
4452 fn div(self, rhs: InverseArea<T>) -> Self::Output {
4453 LuminousFlux{lm: self.lux.clone() / rhs.per_m2}
4454 }
4455}
4456impl<T> core::ops::Div<&InverseArea<T>> for Illuminance<T> where T: NumLike {
4458 type Output = LuminousFlux<T>;
4459 fn div(self, rhs: &InverseArea<T>) -> Self::Output {
4460 LuminousFlux{lm: self.lux / rhs.per_m2.clone()}
4461 }
4462}
4463impl<T> core::ops::Div<&InverseArea<T>> for &Illuminance<T> where T: NumLike {
4465 type Output = LuminousFlux<T>;
4466 fn div(self, rhs: &InverseArea<T>) -> Self::Output {
4467 LuminousFlux{lm: self.lux.clone() / rhs.per_m2.clone()}
4468 }
4469}
4470
4471impl<T> core::ops::Div<Illuminance<T>> for f64 where T: NumLike+From<f64> {
4474 type Output = AreaPerLumen<T>;
4475 fn div(self, rhs: Illuminance<T>) -> Self::Output {
4476 AreaPerLumen{m2_per_lm: T::from(self) / rhs.lux}
4477 }
4478}
4479impl<T> core::ops::Div<Illuminance<T>> for &f64 where T: NumLike+From<f64> {
4481 type Output = AreaPerLumen<T>;
4482 fn div(self, rhs: Illuminance<T>) -> Self::Output {
4483 AreaPerLumen{m2_per_lm: T::from(self.clone()) / rhs.lux}
4484 }
4485}
4486impl<T> core::ops::Div<&Illuminance<T>> for f64 where T: NumLike+From<f64> {
4488 type Output = AreaPerLumen<T>;
4489 fn div(self, rhs: &Illuminance<T>) -> Self::Output {
4490 AreaPerLumen{m2_per_lm: T::from(self) / rhs.lux.clone()}
4491 }
4492}
4493impl<T> core::ops::Div<&Illuminance<T>> for &f64 where T: NumLike+From<f64> {
4495 type Output = AreaPerLumen<T>;
4496 fn div(self, rhs: &Illuminance<T>) -> Self::Output {
4497 AreaPerLumen{m2_per_lm: T::from(self.clone()) / rhs.lux.clone()}
4498 }
4499}
4500
4501impl<T> core::ops::Div<Illuminance<T>> for f32 where T: NumLike+From<f32> {
4504 type Output = AreaPerLumen<T>;
4505 fn div(self, rhs: Illuminance<T>) -> Self::Output {
4506 AreaPerLumen{m2_per_lm: T::from(self) / rhs.lux}
4507 }
4508}
4509impl<T> core::ops::Div<Illuminance<T>> for &f32 where T: NumLike+From<f32> {
4511 type Output = AreaPerLumen<T>;
4512 fn div(self, rhs: Illuminance<T>) -> Self::Output {
4513 AreaPerLumen{m2_per_lm: T::from(self.clone()) / rhs.lux}
4514 }
4515}
4516impl<T> core::ops::Div<&Illuminance<T>> for f32 where T: NumLike+From<f32> {
4518 type Output = AreaPerLumen<T>;
4519 fn div(self, rhs: &Illuminance<T>) -> Self::Output {
4520 AreaPerLumen{m2_per_lm: T::from(self) / rhs.lux.clone()}
4521 }
4522}
4523impl<T> core::ops::Div<&Illuminance<T>> for &f32 where T: NumLike+From<f32> {
4525 type Output = AreaPerLumen<T>;
4526 fn div(self, rhs: &Illuminance<T>) -> Self::Output {
4527 AreaPerLumen{m2_per_lm: T::from(self.clone()) / rhs.lux.clone()}
4528 }
4529}
4530
4531impl<T> core::ops::Div<Illuminance<T>> for i64 where T: NumLike+From<i64> {
4534 type Output = AreaPerLumen<T>;
4535 fn div(self, rhs: Illuminance<T>) -> Self::Output {
4536 AreaPerLumen{m2_per_lm: T::from(self) / rhs.lux}
4537 }
4538}
4539impl<T> core::ops::Div<Illuminance<T>> for &i64 where T: NumLike+From<i64> {
4541 type Output = AreaPerLumen<T>;
4542 fn div(self, rhs: Illuminance<T>) -> Self::Output {
4543 AreaPerLumen{m2_per_lm: T::from(self.clone()) / rhs.lux}
4544 }
4545}
4546impl<T> core::ops::Div<&Illuminance<T>> for i64 where T: NumLike+From<i64> {
4548 type Output = AreaPerLumen<T>;
4549 fn div(self, rhs: &Illuminance<T>) -> Self::Output {
4550 AreaPerLumen{m2_per_lm: T::from(self) / rhs.lux.clone()}
4551 }
4552}
4553impl<T> core::ops::Div<&Illuminance<T>> for &i64 where T: NumLike+From<i64> {
4555 type Output = AreaPerLumen<T>;
4556 fn div(self, rhs: &Illuminance<T>) -> Self::Output {
4557 AreaPerLumen{m2_per_lm: T::from(self.clone()) / rhs.lux.clone()}
4558 }
4559}
4560
4561impl<T> core::ops::Div<Illuminance<T>> for i32 where T: NumLike+From<i32> {
4564 type Output = AreaPerLumen<T>;
4565 fn div(self, rhs: Illuminance<T>) -> Self::Output {
4566 AreaPerLumen{m2_per_lm: T::from(self) / rhs.lux}
4567 }
4568}
4569impl<T> core::ops::Div<Illuminance<T>> for &i32 where T: NumLike+From<i32> {
4571 type Output = AreaPerLumen<T>;
4572 fn div(self, rhs: Illuminance<T>) -> Self::Output {
4573 AreaPerLumen{m2_per_lm: T::from(self.clone()) / rhs.lux}
4574 }
4575}
4576impl<T> core::ops::Div<&Illuminance<T>> for i32 where T: NumLike+From<i32> {
4578 type Output = AreaPerLumen<T>;
4579 fn div(self, rhs: &Illuminance<T>) -> Self::Output {
4580 AreaPerLumen{m2_per_lm: T::from(self) / rhs.lux.clone()}
4581 }
4582}
4583impl<T> core::ops::Div<&Illuminance<T>> for &i32 where T: NumLike+From<i32> {
4585 type Output = AreaPerLumen<T>;
4586 fn div(self, rhs: &Illuminance<T>) -> Self::Output {
4587 AreaPerLumen{m2_per_lm: T::from(self.clone()) / rhs.lux.clone()}
4588 }
4589}
4590
4591#[cfg(feature="num-bigfloat")]
4594impl<T> core::ops::Div<Illuminance<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
4595 type Output = AreaPerLumen<T>;
4596 fn div(self, rhs: Illuminance<T>) -> Self::Output {
4597 AreaPerLumen{m2_per_lm: T::from(self) / rhs.lux}
4598 }
4599}
4600#[cfg(feature="num-bigfloat")]
4602impl<T> core::ops::Div<Illuminance<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
4603 type Output = AreaPerLumen<T>;
4604 fn div(self, rhs: Illuminance<T>) -> Self::Output {
4605 AreaPerLumen{m2_per_lm: T::from(self.clone()) / rhs.lux}
4606 }
4607}
4608#[cfg(feature="num-bigfloat")]
4610impl<T> core::ops::Div<&Illuminance<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
4611 type Output = AreaPerLumen<T>;
4612 fn div(self, rhs: &Illuminance<T>) -> Self::Output {
4613 AreaPerLumen{m2_per_lm: T::from(self) / rhs.lux.clone()}
4614 }
4615}
4616#[cfg(feature="num-bigfloat")]
4618impl<T> core::ops::Div<&Illuminance<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
4619 type Output = AreaPerLumen<T>;
4620 fn div(self, rhs: &Illuminance<T>) -> Self::Output {
4621 AreaPerLumen{m2_per_lm: T::from(self.clone()) / rhs.lux.clone()}
4622 }
4623}
4624
4625#[cfg(feature="num-complex")]
4628impl<T> core::ops::Div<Illuminance<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
4629 type Output = AreaPerLumen<T>;
4630 fn div(self, rhs: Illuminance<T>) -> Self::Output {
4631 AreaPerLumen{m2_per_lm: T::from(self) / rhs.lux}
4632 }
4633}
4634#[cfg(feature="num-complex")]
4636impl<T> core::ops::Div<Illuminance<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
4637 type Output = AreaPerLumen<T>;
4638 fn div(self, rhs: Illuminance<T>) -> Self::Output {
4639 AreaPerLumen{m2_per_lm: T::from(self.clone()) / rhs.lux}
4640 }
4641}
4642#[cfg(feature="num-complex")]
4644impl<T> core::ops::Div<&Illuminance<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
4645 type Output = AreaPerLumen<T>;
4646 fn div(self, rhs: &Illuminance<T>) -> Self::Output {
4647 AreaPerLumen{m2_per_lm: T::from(self) / rhs.lux.clone()}
4648 }
4649}
4650#[cfg(feature="num-complex")]
4652impl<T> core::ops::Div<&Illuminance<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
4653 type Output = AreaPerLumen<T>;
4654 fn div(self, rhs: &Illuminance<T>) -> Self::Output {
4655 AreaPerLumen{m2_per_lm: T::from(self.clone()) / rhs.lux.clone()}
4656 }
4657}
4658
4659#[cfg(feature="num-complex")]
4662impl<T> core::ops::Div<Illuminance<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
4663 type Output = AreaPerLumen<T>;
4664 fn div(self, rhs: Illuminance<T>) -> Self::Output {
4665 AreaPerLumen{m2_per_lm: T::from(self) / rhs.lux}
4666 }
4667}
4668#[cfg(feature="num-complex")]
4670impl<T> core::ops::Div<Illuminance<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
4671 type Output = AreaPerLumen<T>;
4672 fn div(self, rhs: Illuminance<T>) -> Self::Output {
4673 AreaPerLumen{m2_per_lm: T::from(self.clone()) / rhs.lux}
4674 }
4675}
4676#[cfg(feature="num-complex")]
4678impl<T> core::ops::Div<&Illuminance<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
4679 type Output = AreaPerLumen<T>;
4680 fn div(self, rhs: &Illuminance<T>) -> Self::Output {
4681 AreaPerLumen{m2_per_lm: T::from(self) / rhs.lux.clone()}
4682 }
4683}
4684#[cfg(feature="num-complex")]
4686impl<T> core::ops::Div<&Illuminance<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
4687 type Output = AreaPerLumen<T>;
4688 fn div(self, rhs: &Illuminance<T>) -> Self::Output {
4689 AreaPerLumen{m2_per_lm: T::from(self.clone()) / rhs.lux.clone()}
4690 }
4691}
4692
4693#[derive(UnitStruct, Debug, Clone)]
4695#[cfg_attr(feature="serde", derive(Serialize, Deserialize))]
4696pub struct Inductance<T: NumLike>{
4697 pub H: T
4699}
4700
4701impl<T> Inductance<T> where T: NumLike {
4702
4703 pub fn unit_name() -> &'static str { "henries" }
4705
4706 pub fn unit_symbol() -> &'static str { "H" }
4708
4709 pub fn from_H(H: T) -> Self { Inductance{H: H} }
4714
4715 pub fn to_H(&self) -> T { self.H.clone() }
4717
4718 pub fn from_henries(henries: T) -> Self { Inductance{H: henries} }
4723
4724 pub fn to_henries(&self) -> T { self.H.clone() }
4726
4727}
4728
4729impl<T> fmt::Display for Inductance<T> where T: NumLike {
4730 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4731 write!(f, "{} {}", &self.H, Self::unit_symbol())
4732 }
4733}
4734
4735impl<T> Inductance<T> where T: NumLike+From<f64> {
4736
4737 pub fn to_mH(&self) -> T {
4741 return self.H.clone() * T::from(1000.0_f64);
4742 }
4743
4744 pub fn from_mH(mH: T) -> Self {
4751 Inductance{H: mH * T::from(0.001_f64)}
4752 }
4753
4754 pub fn to_uH(&self) -> T {
4758 return self.H.clone() * T::from(1000000.0_f64);
4759 }
4760
4761 pub fn from_uH(uH: T) -> Self {
4768 Inductance{H: uH * T::from(1e-06_f64)}
4769 }
4770
4771 pub fn to_nH(&self) -> T {
4775 return self.H.clone() * T::from(1000000000.0_f64);
4776 }
4777
4778 pub fn from_nH(nH: T) -> Self {
4785 Inductance{H: nH * T::from(1e-09_f64)}
4786 }
4787
4788 pub fn to_kH(&self) -> T {
4792 return self.H.clone() * T::from(0.001_f64);
4793 }
4794
4795 pub fn from_kH(kH: T) -> Self {
4802 Inductance{H: kH * T::from(1000.0_f64)}
4803 }
4804
4805 pub fn to_MH(&self) -> T {
4809 return self.H.clone() * T::from(1e-06_f64);
4810 }
4811
4812 pub fn from_MH(MH: T) -> Self {
4819 Inductance{H: MH * T::from(1000000.0_f64)}
4820 }
4821
4822 pub fn to_GH(&self) -> T {
4826 return self.H.clone() * T::from(1e-09_f64);
4827 }
4828
4829 pub fn from_GH(GH: T) -> Self {
4836 Inductance{H: GH * T::from(1000000000.0_f64)}
4837 }
4838
4839}
4840
4841
4842#[cfg(feature="num-bigfloat")]
4844impl core::ops::Mul<Inductance<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
4845 type Output = Inductance<num_bigfloat::BigFloat>;
4846 fn mul(self, rhs: Inductance<num_bigfloat::BigFloat>) -> Self::Output {
4847 Inductance{H: self * rhs.H}
4848 }
4849}
4850#[cfg(feature="num-bigfloat")]
4852impl core::ops::Mul<Inductance<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
4853 type Output = Inductance<num_bigfloat::BigFloat>;
4854 fn mul(self, rhs: Inductance<num_bigfloat::BigFloat>) -> Self::Output {
4855 Inductance{H: self.clone() * rhs.H}
4856 }
4857}
4858#[cfg(feature="num-bigfloat")]
4860impl core::ops::Mul<&Inductance<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
4861 type Output = Inductance<num_bigfloat::BigFloat>;
4862 fn mul(self, rhs: &Inductance<num_bigfloat::BigFloat>) -> Self::Output {
4863 Inductance{H: self * rhs.H.clone()}
4864 }
4865}
4866#[cfg(feature="num-bigfloat")]
4868impl core::ops::Mul<&Inductance<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
4869 type Output = Inductance<num_bigfloat::BigFloat>;
4870 fn mul(self, rhs: &Inductance<num_bigfloat::BigFloat>) -> Self::Output {
4871 Inductance{H: self.clone() * rhs.H.clone()}
4872 }
4873}
4874
4875#[cfg(feature="num-complex")]
4877impl core::ops::Mul<Inductance<num_complex::Complex32>> for num_complex::Complex32 {
4878 type Output = Inductance<num_complex::Complex32>;
4879 fn mul(self, rhs: Inductance<num_complex::Complex32>) -> Self::Output {
4880 Inductance{H: self * rhs.H}
4881 }
4882}
4883#[cfg(feature="num-complex")]
4885impl core::ops::Mul<Inductance<num_complex::Complex32>> for &num_complex::Complex32 {
4886 type Output = Inductance<num_complex::Complex32>;
4887 fn mul(self, rhs: Inductance<num_complex::Complex32>) -> Self::Output {
4888 Inductance{H: self.clone() * rhs.H}
4889 }
4890}
4891#[cfg(feature="num-complex")]
4893impl core::ops::Mul<&Inductance<num_complex::Complex32>> for num_complex::Complex32 {
4894 type Output = Inductance<num_complex::Complex32>;
4895 fn mul(self, rhs: &Inductance<num_complex::Complex32>) -> Self::Output {
4896 Inductance{H: self * rhs.H.clone()}
4897 }
4898}
4899#[cfg(feature="num-complex")]
4901impl core::ops::Mul<&Inductance<num_complex::Complex32>> for &num_complex::Complex32 {
4902 type Output = Inductance<num_complex::Complex32>;
4903 fn mul(self, rhs: &Inductance<num_complex::Complex32>) -> Self::Output {
4904 Inductance{H: self.clone() * rhs.H.clone()}
4905 }
4906}
4907
4908#[cfg(feature="num-complex")]
4910impl core::ops::Mul<Inductance<num_complex::Complex64>> for num_complex::Complex64 {
4911 type Output = Inductance<num_complex::Complex64>;
4912 fn mul(self, rhs: Inductance<num_complex::Complex64>) -> Self::Output {
4913 Inductance{H: self * rhs.H}
4914 }
4915}
4916#[cfg(feature="num-complex")]
4918impl core::ops::Mul<Inductance<num_complex::Complex64>> for &num_complex::Complex64 {
4919 type Output = Inductance<num_complex::Complex64>;
4920 fn mul(self, rhs: Inductance<num_complex::Complex64>) -> Self::Output {
4921 Inductance{H: self.clone() * rhs.H}
4922 }
4923}
4924#[cfg(feature="num-complex")]
4926impl core::ops::Mul<&Inductance<num_complex::Complex64>> for num_complex::Complex64 {
4927 type Output = Inductance<num_complex::Complex64>;
4928 fn mul(self, rhs: &Inductance<num_complex::Complex64>) -> Self::Output {
4929 Inductance{H: self * rhs.H.clone()}
4930 }
4931}
4932#[cfg(feature="num-complex")]
4934impl core::ops::Mul<&Inductance<num_complex::Complex64>> for &num_complex::Complex64 {
4935 type Output = Inductance<num_complex::Complex64>;
4936 fn mul(self, rhs: &Inductance<num_complex::Complex64>) -> Self::Output {
4937 Inductance{H: self.clone() * rhs.H.clone()}
4938 }
4939}
4940
4941
4942
4943#[cfg(feature = "uom")]
4945impl<T> Into<uom::si::f32::Inductance> for Inductance<T> where T: NumLike+Into<f32> {
4946 fn into(self) -> uom::si::f32::Inductance {
4947 uom::si::f32::Inductance::new::<uom::si::inductance::henry>(self.H.into())
4948 }
4949}
4950
4951#[cfg(feature = "uom")]
4953impl<T> From<uom::si::f32::Inductance> for Inductance<T> where T: NumLike+From<f32> {
4954 fn from(src: uom::si::f32::Inductance) -> Self {
4955 Inductance{H: T::from(src.value)}
4956 }
4957}
4958
4959#[cfg(feature = "uom")]
4961impl<T> Into<uom::si::f64::Inductance> for Inductance<T> where T: NumLike+Into<f64> {
4962 fn into(self) -> uom::si::f64::Inductance {
4963 uom::si::f64::Inductance::new::<uom::si::inductance::henry>(self.H.into())
4964 }
4965}
4966
4967#[cfg(feature = "uom")]
4969impl<T> From<uom::si::f64::Inductance> for Inductance<T> where T: NumLike+From<f64> {
4970 fn from(src: uom::si::f64::Inductance) -> Self {
4971 Inductance{H: T::from(src.value)}
4972 }
4973}
4974
4975
4976impl<T> core::ops::Mul<Current<T>> for Inductance<T> where T: NumLike {
4979 type Output = MagneticFlux<T>;
4980 fn mul(self, rhs: Current<T>) -> Self::Output {
4981 MagneticFlux{Wb: self.H * rhs.A}
4982 }
4983}
4984impl<T> core::ops::Mul<Current<T>> for &Inductance<T> where T: NumLike {
4986 type Output = MagneticFlux<T>;
4987 fn mul(self, rhs: Current<T>) -> Self::Output {
4988 MagneticFlux{Wb: self.H.clone() * rhs.A}
4989 }
4990}
4991impl<T> core::ops::Mul<&Current<T>> for Inductance<T> where T: NumLike {
4993 type Output = MagneticFlux<T>;
4994 fn mul(self, rhs: &Current<T>) -> Self::Output {
4995 MagneticFlux{Wb: self.H * rhs.A.clone()}
4996 }
4997}
4998impl<T> core::ops::Mul<&Current<T>> for &Inductance<T> where T: NumLike {
5000 type Output = MagneticFlux<T>;
5001 fn mul(self, rhs: &Current<T>) -> Self::Output {
5002 MagneticFlux{Wb: self.H.clone() * rhs.A.clone()}
5003 }
5004}
5005
5006impl<T> core::ops::Div<InverseCurrent<T>> for Inductance<T> where T: NumLike {
5009 type Output = MagneticFlux<T>;
5010 fn div(self, rhs: InverseCurrent<T>) -> Self::Output {
5011 MagneticFlux{Wb: self.H / rhs.per_A}
5012 }
5013}
5014impl<T> core::ops::Div<InverseCurrent<T>> for &Inductance<T> where T: NumLike {
5016 type Output = MagneticFlux<T>;
5017 fn div(self, rhs: InverseCurrent<T>) -> Self::Output {
5018 MagneticFlux{Wb: self.H.clone() / rhs.per_A}
5019 }
5020}
5021impl<T> core::ops::Div<&InverseCurrent<T>> for Inductance<T> where T: NumLike {
5023 type Output = MagneticFlux<T>;
5024 fn div(self, rhs: &InverseCurrent<T>) -> Self::Output {
5025 MagneticFlux{Wb: self.H / rhs.per_A.clone()}
5026 }
5027}
5028impl<T> core::ops::Div<&InverseCurrent<T>> for &Inductance<T> where T: NumLike {
5030 type Output = MagneticFlux<T>;
5031 fn div(self, rhs: &InverseCurrent<T>) -> Self::Output {
5032 MagneticFlux{Wb: self.H.clone() / rhs.per_A.clone()}
5033 }
5034}
5035
5036impl<T> core::ops::Div<Time<T>> for Inductance<T> where T: NumLike {
5039 type Output = Resistance<T>;
5040 fn div(self, rhs: Time<T>) -> Self::Output {
5041 Resistance{Ohm: self.H / rhs.s}
5042 }
5043}
5044impl<T> core::ops::Div<Time<T>> for &Inductance<T> where T: NumLike {
5046 type Output = Resistance<T>;
5047 fn div(self, rhs: Time<T>) -> Self::Output {
5048 Resistance{Ohm: self.H.clone() / rhs.s}
5049 }
5050}
5051impl<T> core::ops::Div<&Time<T>> for Inductance<T> where T: NumLike {
5053 type Output = Resistance<T>;
5054 fn div(self, rhs: &Time<T>) -> Self::Output {
5055 Resistance{Ohm: self.H / rhs.s.clone()}
5056 }
5057}
5058impl<T> core::ops::Div<&Time<T>> for &Inductance<T> where T: NumLike {
5060 type Output = Resistance<T>;
5061 fn div(self, rhs: &Time<T>) -> Self::Output {
5062 Resistance{Ohm: self.H.clone() / rhs.s.clone()}
5063 }
5064}
5065
5066impl<T> core::ops::Mul<Conductance<T>> for Inductance<T> where T: NumLike {
5069 type Output = Time<T>;
5070 fn mul(self, rhs: Conductance<T>) -> Self::Output {
5071 Time{s: self.H * rhs.S}
5072 }
5073}
5074impl<T> core::ops::Mul<Conductance<T>> for &Inductance<T> where T: NumLike {
5076 type Output = Time<T>;
5077 fn mul(self, rhs: Conductance<T>) -> Self::Output {
5078 Time{s: self.H.clone() * rhs.S}
5079 }
5080}
5081impl<T> core::ops::Mul<&Conductance<T>> for Inductance<T> where T: NumLike {
5083 type Output = Time<T>;
5084 fn mul(self, rhs: &Conductance<T>) -> Self::Output {
5085 Time{s: self.H * rhs.S.clone()}
5086 }
5087}
5088impl<T> core::ops::Mul<&Conductance<T>> for &Inductance<T> where T: NumLike {
5090 type Output = Time<T>;
5091 fn mul(self, rhs: &Conductance<T>) -> Self::Output {
5092 Time{s: self.H.clone() * rhs.S.clone()}
5093 }
5094}
5095
5096impl<T> core::ops::Mul<InverseMagneticFlux<T>> for Inductance<T> where T: NumLike {
5099 type Output = InverseCurrent<T>;
5100 fn mul(self, rhs: InverseMagneticFlux<T>) -> Self::Output {
5101 InverseCurrent{per_A: self.H * rhs.per_Wb}
5102 }
5103}
5104impl<T> core::ops::Mul<InverseMagneticFlux<T>> for &Inductance<T> where T: NumLike {
5106 type Output = InverseCurrent<T>;
5107 fn mul(self, rhs: InverseMagneticFlux<T>) -> Self::Output {
5108 InverseCurrent{per_A: self.H.clone() * rhs.per_Wb}
5109 }
5110}
5111impl<T> core::ops::Mul<&InverseMagneticFlux<T>> for Inductance<T> where T: NumLike {
5113 type Output = InverseCurrent<T>;
5114 fn mul(self, rhs: &InverseMagneticFlux<T>) -> Self::Output {
5115 InverseCurrent{per_A: self.H * rhs.per_Wb.clone()}
5116 }
5117}
5118impl<T> core::ops::Mul<&InverseMagneticFlux<T>> for &Inductance<T> where T: NumLike {
5120 type Output = InverseCurrent<T>;
5121 fn mul(self, rhs: &InverseMagneticFlux<T>) -> Self::Output {
5122 InverseCurrent{per_A: self.H.clone() * rhs.per_Wb.clone()}
5123 }
5124}
5125
5126impl<T> core::ops::Div<MagneticFlux<T>> for Inductance<T> where T: NumLike {
5129 type Output = InverseCurrent<T>;
5130 fn div(self, rhs: MagneticFlux<T>) -> Self::Output {
5131 InverseCurrent{per_A: self.H / rhs.Wb}
5132 }
5133}
5134impl<T> core::ops::Div<MagneticFlux<T>> for &Inductance<T> where T: NumLike {
5136 type Output = InverseCurrent<T>;
5137 fn div(self, rhs: MagneticFlux<T>) -> Self::Output {
5138 InverseCurrent{per_A: self.H.clone() / rhs.Wb}
5139 }
5140}
5141impl<T> core::ops::Div<&MagneticFlux<T>> for Inductance<T> where T: NumLike {
5143 type Output = InverseCurrent<T>;
5144 fn div(self, rhs: &MagneticFlux<T>) -> Self::Output {
5145 InverseCurrent{per_A: self.H / rhs.Wb.clone()}
5146 }
5147}
5148impl<T> core::ops::Div<&MagneticFlux<T>> for &Inductance<T> where T: NumLike {
5150 type Output = InverseCurrent<T>;
5151 fn div(self, rhs: &MagneticFlux<T>) -> Self::Output {
5152 InverseCurrent{per_A: self.H.clone() / rhs.Wb.clone()}
5153 }
5154}
5155
5156impl<T> core::ops::Div<Resistance<T>> for Inductance<T> where T: NumLike {
5159 type Output = Time<T>;
5160 fn div(self, rhs: Resistance<T>) -> Self::Output {
5161 Time{s: self.H / rhs.Ohm}
5162 }
5163}
5164impl<T> core::ops::Div<Resistance<T>> for &Inductance<T> where T: NumLike {
5166 type Output = Time<T>;
5167 fn div(self, rhs: Resistance<T>) -> Self::Output {
5168 Time{s: self.H.clone() / rhs.Ohm}
5169 }
5170}
5171impl<T> core::ops::Div<&Resistance<T>> for Inductance<T> where T: NumLike {
5173 type Output = Time<T>;
5174 fn div(self, rhs: &Resistance<T>) -> Self::Output {
5175 Time{s: self.H / rhs.Ohm.clone()}
5176 }
5177}
5178impl<T> core::ops::Div<&Resistance<T>> for &Inductance<T> where T: NumLike {
5180 type Output = Time<T>;
5181 fn div(self, rhs: &Resistance<T>) -> Self::Output {
5182 Time{s: self.H.clone() / rhs.Ohm.clone()}
5183 }
5184}
5185
5186impl<T> core::ops::Mul<Frequency<T>> for Inductance<T> where T: NumLike {
5189 type Output = Resistance<T>;
5190 fn mul(self, rhs: Frequency<T>) -> Self::Output {
5191 Resistance{Ohm: self.H * rhs.Hz}
5192 }
5193}
5194impl<T> core::ops::Mul<Frequency<T>> for &Inductance<T> where T: NumLike {
5196 type Output = Resistance<T>;
5197 fn mul(self, rhs: Frequency<T>) -> Self::Output {
5198 Resistance{Ohm: self.H.clone() * rhs.Hz}
5199 }
5200}
5201impl<T> core::ops::Mul<&Frequency<T>> for Inductance<T> where T: NumLike {
5203 type Output = Resistance<T>;
5204 fn mul(self, rhs: &Frequency<T>) -> Self::Output {
5205 Resistance{Ohm: self.H * rhs.Hz.clone()}
5206 }
5207}
5208impl<T> core::ops::Mul<&Frequency<T>> for &Inductance<T> where T: NumLike {
5210 type Output = Resistance<T>;
5211 fn mul(self, rhs: &Frequency<T>) -> Self::Output {
5212 Resistance{Ohm: self.H.clone() * rhs.Hz.clone()}
5213 }
5214}
5215
5216impl<T> core::ops::Div<Inductance<T>> for f64 where T: NumLike+From<f64> {
5219 type Output = InverseInductance<T>;
5220 fn div(self, rhs: Inductance<T>) -> Self::Output {
5221 InverseInductance{per_H: T::from(self) / rhs.H}
5222 }
5223}
5224impl<T> core::ops::Div<Inductance<T>> for &f64 where T: NumLike+From<f64> {
5226 type Output = InverseInductance<T>;
5227 fn div(self, rhs: Inductance<T>) -> Self::Output {
5228 InverseInductance{per_H: T::from(self.clone()) / rhs.H}
5229 }
5230}
5231impl<T> core::ops::Div<&Inductance<T>> for f64 where T: NumLike+From<f64> {
5233 type Output = InverseInductance<T>;
5234 fn div(self, rhs: &Inductance<T>) -> Self::Output {
5235 InverseInductance{per_H: T::from(self) / rhs.H.clone()}
5236 }
5237}
5238impl<T> core::ops::Div<&Inductance<T>> for &f64 where T: NumLike+From<f64> {
5240 type Output = InverseInductance<T>;
5241 fn div(self, rhs: &Inductance<T>) -> Self::Output {
5242 InverseInductance{per_H: T::from(self.clone()) / rhs.H.clone()}
5243 }
5244}
5245
5246impl<T> core::ops::Div<Inductance<T>> for f32 where T: NumLike+From<f32> {
5249 type Output = InverseInductance<T>;
5250 fn div(self, rhs: Inductance<T>) -> Self::Output {
5251 InverseInductance{per_H: T::from(self) / rhs.H}
5252 }
5253}
5254impl<T> core::ops::Div<Inductance<T>> for &f32 where T: NumLike+From<f32> {
5256 type Output = InverseInductance<T>;
5257 fn div(self, rhs: Inductance<T>) -> Self::Output {
5258 InverseInductance{per_H: T::from(self.clone()) / rhs.H}
5259 }
5260}
5261impl<T> core::ops::Div<&Inductance<T>> for f32 where T: NumLike+From<f32> {
5263 type Output = InverseInductance<T>;
5264 fn div(self, rhs: &Inductance<T>) -> Self::Output {
5265 InverseInductance{per_H: T::from(self) / rhs.H.clone()}
5266 }
5267}
5268impl<T> core::ops::Div<&Inductance<T>> for &f32 where T: NumLike+From<f32> {
5270 type Output = InverseInductance<T>;
5271 fn div(self, rhs: &Inductance<T>) -> Self::Output {
5272 InverseInductance{per_H: T::from(self.clone()) / rhs.H.clone()}
5273 }
5274}
5275
5276impl<T> core::ops::Div<Inductance<T>> for i64 where T: NumLike+From<i64> {
5279 type Output = InverseInductance<T>;
5280 fn div(self, rhs: Inductance<T>) -> Self::Output {
5281 InverseInductance{per_H: T::from(self) / rhs.H}
5282 }
5283}
5284impl<T> core::ops::Div<Inductance<T>> for &i64 where T: NumLike+From<i64> {
5286 type Output = InverseInductance<T>;
5287 fn div(self, rhs: Inductance<T>) -> Self::Output {
5288 InverseInductance{per_H: T::from(self.clone()) / rhs.H}
5289 }
5290}
5291impl<T> core::ops::Div<&Inductance<T>> for i64 where T: NumLike+From<i64> {
5293 type Output = InverseInductance<T>;
5294 fn div(self, rhs: &Inductance<T>) -> Self::Output {
5295 InverseInductance{per_H: T::from(self) / rhs.H.clone()}
5296 }
5297}
5298impl<T> core::ops::Div<&Inductance<T>> for &i64 where T: NumLike+From<i64> {
5300 type Output = InverseInductance<T>;
5301 fn div(self, rhs: &Inductance<T>) -> Self::Output {
5302 InverseInductance{per_H: T::from(self.clone()) / rhs.H.clone()}
5303 }
5304}
5305
5306impl<T> core::ops::Div<Inductance<T>> for i32 where T: NumLike+From<i32> {
5309 type Output = InverseInductance<T>;
5310 fn div(self, rhs: Inductance<T>) -> Self::Output {
5311 InverseInductance{per_H: T::from(self) / rhs.H}
5312 }
5313}
5314impl<T> core::ops::Div<Inductance<T>> for &i32 where T: NumLike+From<i32> {
5316 type Output = InverseInductance<T>;
5317 fn div(self, rhs: Inductance<T>) -> Self::Output {
5318 InverseInductance{per_H: T::from(self.clone()) / rhs.H}
5319 }
5320}
5321impl<T> core::ops::Div<&Inductance<T>> for i32 where T: NumLike+From<i32> {
5323 type Output = InverseInductance<T>;
5324 fn div(self, rhs: &Inductance<T>) -> Self::Output {
5325 InverseInductance{per_H: T::from(self) / rhs.H.clone()}
5326 }
5327}
5328impl<T> core::ops::Div<&Inductance<T>> for &i32 where T: NumLike+From<i32> {
5330 type Output = InverseInductance<T>;
5331 fn div(self, rhs: &Inductance<T>) -> Self::Output {
5332 InverseInductance{per_H: T::from(self.clone()) / rhs.H.clone()}
5333 }
5334}
5335
5336#[cfg(feature="num-bigfloat")]
5339impl<T> core::ops::Div<Inductance<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
5340 type Output = InverseInductance<T>;
5341 fn div(self, rhs: Inductance<T>) -> Self::Output {
5342 InverseInductance{per_H: T::from(self) / rhs.H}
5343 }
5344}
5345#[cfg(feature="num-bigfloat")]
5347impl<T> core::ops::Div<Inductance<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
5348 type Output = InverseInductance<T>;
5349 fn div(self, rhs: Inductance<T>) -> Self::Output {
5350 InverseInductance{per_H: T::from(self.clone()) / rhs.H}
5351 }
5352}
5353#[cfg(feature="num-bigfloat")]
5355impl<T> core::ops::Div<&Inductance<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
5356 type Output = InverseInductance<T>;
5357 fn div(self, rhs: &Inductance<T>) -> Self::Output {
5358 InverseInductance{per_H: T::from(self) / rhs.H.clone()}
5359 }
5360}
5361#[cfg(feature="num-bigfloat")]
5363impl<T> core::ops::Div<&Inductance<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
5364 type Output = InverseInductance<T>;
5365 fn div(self, rhs: &Inductance<T>) -> Self::Output {
5366 InverseInductance{per_H: T::from(self.clone()) / rhs.H.clone()}
5367 }
5368}
5369
5370#[cfg(feature="num-complex")]
5373impl<T> core::ops::Div<Inductance<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
5374 type Output = InverseInductance<T>;
5375 fn div(self, rhs: Inductance<T>) -> Self::Output {
5376 InverseInductance{per_H: T::from(self) / rhs.H}
5377 }
5378}
5379#[cfg(feature="num-complex")]
5381impl<T> core::ops::Div<Inductance<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
5382 type Output = InverseInductance<T>;
5383 fn div(self, rhs: Inductance<T>) -> Self::Output {
5384 InverseInductance{per_H: T::from(self.clone()) / rhs.H}
5385 }
5386}
5387#[cfg(feature="num-complex")]
5389impl<T> core::ops::Div<&Inductance<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
5390 type Output = InverseInductance<T>;
5391 fn div(self, rhs: &Inductance<T>) -> Self::Output {
5392 InverseInductance{per_H: T::from(self) / rhs.H.clone()}
5393 }
5394}
5395#[cfg(feature="num-complex")]
5397impl<T> core::ops::Div<&Inductance<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
5398 type Output = InverseInductance<T>;
5399 fn div(self, rhs: &Inductance<T>) -> Self::Output {
5400 InverseInductance{per_H: T::from(self.clone()) / rhs.H.clone()}
5401 }
5402}
5403
5404#[cfg(feature="num-complex")]
5407impl<T> core::ops::Div<Inductance<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
5408 type Output = InverseInductance<T>;
5409 fn div(self, rhs: Inductance<T>) -> Self::Output {
5410 InverseInductance{per_H: T::from(self) / rhs.H}
5411 }
5412}
5413#[cfg(feature="num-complex")]
5415impl<T> core::ops::Div<Inductance<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
5416 type Output = InverseInductance<T>;
5417 fn div(self, rhs: Inductance<T>) -> Self::Output {
5418 InverseInductance{per_H: T::from(self.clone()) / rhs.H}
5419 }
5420}
5421#[cfg(feature="num-complex")]
5423impl<T> core::ops::Div<&Inductance<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
5424 type Output = InverseInductance<T>;
5425 fn div(self, rhs: &Inductance<T>) -> Self::Output {
5426 InverseInductance{per_H: T::from(self) / rhs.H.clone()}
5427 }
5428}
5429#[cfg(feature="num-complex")]
5431impl<T> core::ops::Div<&Inductance<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
5432 type Output = InverseInductance<T>;
5433 fn div(self, rhs: &Inductance<T>) -> Self::Output {
5434 InverseInductance{per_H: T::from(self.clone()) / rhs.H.clone()}
5435 }
5436}
5437
5438#[derive(UnitStruct, Debug, Clone)]
5440#[cfg_attr(feature="serde", derive(Serialize, Deserialize))]
5441pub struct InverseCharge<T: NumLike>{
5442 pub per_C: T
5444}
5445
5446impl<T> InverseCharge<T> where T: NumLike {
5447
5448 pub fn unit_name() -> &'static str { "inverse coulombs" }
5450
5451 pub fn unit_symbol() -> &'static str { "1/C" }
5453
5454 pub fn from_per_C(per_C: T) -> Self { InverseCharge{per_C: per_C} }
5459
5460 pub fn to_per_C(&self) -> T { self.per_C.clone() }
5462
5463 pub fn from_per_coulombs(per_coulombs: T) -> Self { InverseCharge{per_C: per_coulombs} }
5468
5469 pub fn to_per_coulombs(&self) -> T { self.per_C.clone() }
5471
5472}
5473
5474impl<T> fmt::Display for InverseCharge<T> where T: NumLike {
5475 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5476 write!(f, "{} {}", &self.per_C, Self::unit_symbol())
5477 }
5478}
5479
5480impl<T> InverseCharge<T> where T: NumLike+From<f64> {
5481
5482 pub fn to_per_mC(&self) -> T {
5486 return self.per_C.clone() * T::from(0.001_f64);
5487 }
5488
5489 pub fn from_per_mC(per_mC: T) -> Self {
5496 InverseCharge{per_C: per_mC * T::from(1000.0_f64)}
5497 }
5498
5499 pub fn to_per_uC(&self) -> T {
5503 return self.per_C.clone() * T::from(1e-06_f64);
5504 }
5505
5506 pub fn from_per_uC(per_uC: T) -> Self {
5513 InverseCharge{per_C: per_uC * T::from(1000000.0_f64)}
5514 }
5515
5516 pub fn to_per_nC(&self) -> T {
5520 return self.per_C.clone() * T::from(1e-09_f64);
5521 }
5522
5523 pub fn from_per_nC(per_nC: T) -> Self {
5530 InverseCharge{per_C: per_nC * T::from(1000000000.0_f64)}
5531 }
5532
5533 pub fn to_per_kC(&self) -> T {
5537 return self.per_C.clone() * T::from(1000.0_f64);
5538 }
5539
5540 pub fn from_per_kC(per_kC: T) -> Self {
5547 InverseCharge{per_C: per_kC * T::from(0.001_f64)}
5548 }
5549
5550 pub fn to_per_MC(&self) -> T {
5554 return self.per_C.clone() * T::from(1000000.0_f64);
5555 }
5556
5557 pub fn from_per_MC(per_MC: T) -> Self {
5564 InverseCharge{per_C: per_MC * T::from(1e-06_f64)}
5565 }
5566
5567 pub fn to_per_GC(&self) -> T {
5571 return self.per_C.clone() * T::from(1000000000.0_f64);
5572 }
5573
5574 pub fn from_per_GC(per_GC: T) -> Self {
5581 InverseCharge{per_C: per_GC * T::from(1e-09_f64)}
5582 }
5583
5584}
5585
5586
5587#[cfg(feature="num-bigfloat")]
5589impl core::ops::Mul<InverseCharge<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
5590 type Output = InverseCharge<num_bigfloat::BigFloat>;
5591 fn mul(self, rhs: InverseCharge<num_bigfloat::BigFloat>) -> Self::Output {
5592 InverseCharge{per_C: self * rhs.per_C}
5593 }
5594}
5595#[cfg(feature="num-bigfloat")]
5597impl core::ops::Mul<InverseCharge<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
5598 type Output = InverseCharge<num_bigfloat::BigFloat>;
5599 fn mul(self, rhs: InverseCharge<num_bigfloat::BigFloat>) -> Self::Output {
5600 InverseCharge{per_C: self.clone() * rhs.per_C}
5601 }
5602}
5603#[cfg(feature="num-bigfloat")]
5605impl core::ops::Mul<&InverseCharge<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
5606 type Output = InverseCharge<num_bigfloat::BigFloat>;
5607 fn mul(self, rhs: &InverseCharge<num_bigfloat::BigFloat>) -> Self::Output {
5608 InverseCharge{per_C: self * rhs.per_C.clone()}
5609 }
5610}
5611#[cfg(feature="num-bigfloat")]
5613impl core::ops::Mul<&InverseCharge<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
5614 type Output = InverseCharge<num_bigfloat::BigFloat>;
5615 fn mul(self, rhs: &InverseCharge<num_bigfloat::BigFloat>) -> Self::Output {
5616 InverseCharge{per_C: self.clone() * rhs.per_C.clone()}
5617 }
5618}
5619
5620#[cfg(feature="num-complex")]
5622impl core::ops::Mul<InverseCharge<num_complex::Complex32>> for num_complex::Complex32 {
5623 type Output = InverseCharge<num_complex::Complex32>;
5624 fn mul(self, rhs: InverseCharge<num_complex::Complex32>) -> Self::Output {
5625 InverseCharge{per_C: self * rhs.per_C}
5626 }
5627}
5628#[cfg(feature="num-complex")]
5630impl core::ops::Mul<InverseCharge<num_complex::Complex32>> for &num_complex::Complex32 {
5631 type Output = InverseCharge<num_complex::Complex32>;
5632 fn mul(self, rhs: InverseCharge<num_complex::Complex32>) -> Self::Output {
5633 InverseCharge{per_C: self.clone() * rhs.per_C}
5634 }
5635}
5636#[cfg(feature="num-complex")]
5638impl core::ops::Mul<&InverseCharge<num_complex::Complex32>> for num_complex::Complex32 {
5639 type Output = InverseCharge<num_complex::Complex32>;
5640 fn mul(self, rhs: &InverseCharge<num_complex::Complex32>) -> Self::Output {
5641 InverseCharge{per_C: self * rhs.per_C.clone()}
5642 }
5643}
5644#[cfg(feature="num-complex")]
5646impl core::ops::Mul<&InverseCharge<num_complex::Complex32>> for &num_complex::Complex32 {
5647 type Output = InverseCharge<num_complex::Complex32>;
5648 fn mul(self, rhs: &InverseCharge<num_complex::Complex32>) -> Self::Output {
5649 InverseCharge{per_C: self.clone() * rhs.per_C.clone()}
5650 }
5651}
5652
5653#[cfg(feature="num-complex")]
5655impl core::ops::Mul<InverseCharge<num_complex::Complex64>> for num_complex::Complex64 {
5656 type Output = InverseCharge<num_complex::Complex64>;
5657 fn mul(self, rhs: InverseCharge<num_complex::Complex64>) -> Self::Output {
5658 InverseCharge{per_C: self * rhs.per_C}
5659 }
5660}
5661#[cfg(feature="num-complex")]
5663impl core::ops::Mul<InverseCharge<num_complex::Complex64>> for &num_complex::Complex64 {
5664 type Output = InverseCharge<num_complex::Complex64>;
5665 fn mul(self, rhs: InverseCharge<num_complex::Complex64>) -> Self::Output {
5666 InverseCharge{per_C: self.clone() * rhs.per_C}
5667 }
5668}
5669#[cfg(feature="num-complex")]
5671impl core::ops::Mul<&InverseCharge<num_complex::Complex64>> for num_complex::Complex64 {
5672 type Output = InverseCharge<num_complex::Complex64>;
5673 fn mul(self, rhs: &InverseCharge<num_complex::Complex64>) -> Self::Output {
5674 InverseCharge{per_C: self * rhs.per_C.clone()}
5675 }
5676}
5677#[cfg(feature="num-complex")]
5679impl core::ops::Mul<&InverseCharge<num_complex::Complex64>> for &num_complex::Complex64 {
5680 type Output = InverseCharge<num_complex::Complex64>;
5681 fn mul(self, rhs: &InverseCharge<num_complex::Complex64>) -> Self::Output {
5682 InverseCharge{per_C: self.clone() * rhs.per_C.clone()}
5683 }
5684}
5685
5686
5687
5688
5689impl<T> core::ops::Mul<Current<T>> for InverseCharge<T> where T: NumLike {
5692 type Output = Frequency<T>;
5693 fn mul(self, rhs: Current<T>) -> Self::Output {
5694 Frequency{Hz: self.per_C * rhs.A}
5695 }
5696}
5697impl<T> core::ops::Mul<Current<T>> for &InverseCharge<T> where T: NumLike {
5699 type Output = Frequency<T>;
5700 fn mul(self, rhs: Current<T>) -> Self::Output {
5701 Frequency{Hz: self.per_C.clone() * rhs.A}
5702 }
5703}
5704impl<T> core::ops::Mul<&Current<T>> for InverseCharge<T> where T: NumLike {
5706 type Output = Frequency<T>;
5707 fn mul(self, rhs: &Current<T>) -> Self::Output {
5708 Frequency{Hz: self.per_C * rhs.A.clone()}
5709 }
5710}
5711impl<T> core::ops::Mul<&Current<T>> for &InverseCharge<T> where T: NumLike {
5713 type Output = Frequency<T>;
5714 fn mul(self, rhs: &Current<T>) -> Self::Output {
5715 Frequency{Hz: self.per_C.clone() * rhs.A.clone()}
5716 }
5717}
5718
5719impl<T> core::ops::Div<InverseCurrent<T>> for InverseCharge<T> where T: NumLike {
5722 type Output = Frequency<T>;
5723 fn div(self, rhs: InverseCurrent<T>) -> Self::Output {
5724 Frequency{Hz: self.per_C / rhs.per_A}
5725 }
5726}
5727impl<T> core::ops::Div<InverseCurrent<T>> for &InverseCharge<T> where T: NumLike {
5729 type Output = Frequency<T>;
5730 fn div(self, rhs: InverseCurrent<T>) -> Self::Output {
5731 Frequency{Hz: self.per_C.clone() / rhs.per_A}
5732 }
5733}
5734impl<T> core::ops::Div<&InverseCurrent<T>> for InverseCharge<T> where T: NumLike {
5736 type Output = Frequency<T>;
5737 fn div(self, rhs: &InverseCurrent<T>) -> Self::Output {
5738 Frequency{Hz: self.per_C / rhs.per_A.clone()}
5739 }
5740}
5741impl<T> core::ops::Div<&InverseCurrent<T>> for &InverseCharge<T> where T: NumLike {
5743 type Output = Frequency<T>;
5744 fn div(self, rhs: &InverseCurrent<T>) -> Self::Output {
5745 Frequency{Hz: self.per_C.clone() / rhs.per_A.clone()}
5746 }
5747}
5748
5749impl<T> core::ops::Mul<Time<T>> for InverseCharge<T> where T: NumLike {
5752 type Output = InverseCurrent<T>;
5753 fn mul(self, rhs: Time<T>) -> Self::Output {
5754 InverseCurrent{per_A: self.per_C * rhs.s}
5755 }
5756}
5757impl<T> core::ops::Mul<Time<T>> for &InverseCharge<T> where T: NumLike {
5759 type Output = InverseCurrent<T>;
5760 fn mul(self, rhs: Time<T>) -> Self::Output {
5761 InverseCurrent{per_A: self.per_C.clone() * rhs.s}
5762 }
5763}
5764impl<T> core::ops::Mul<&Time<T>> for InverseCharge<T> where T: NumLike {
5766 type Output = InverseCurrent<T>;
5767 fn mul(self, rhs: &Time<T>) -> Self::Output {
5768 InverseCurrent{per_A: self.per_C * rhs.s.clone()}
5769 }
5770}
5771impl<T> core::ops::Mul<&Time<T>> for &InverseCharge<T> where T: NumLike {
5773 type Output = InverseCurrent<T>;
5774 fn mul(self, rhs: &Time<T>) -> Self::Output {
5775 InverseCurrent{per_A: self.per_C.clone() * rhs.s.clone()}
5776 }
5777}
5778
5779impl<T> core::ops::Mul<Capacitance<T>> for InverseCharge<T> where T: NumLike {
5782 type Output = InverseVoltage<T>;
5783 fn mul(self, rhs: Capacitance<T>) -> Self::Output {
5784 InverseVoltage{per_V: self.per_C * rhs.F}
5785 }
5786}
5787impl<T> core::ops::Mul<Capacitance<T>> for &InverseCharge<T> where T: NumLike {
5789 type Output = InverseVoltage<T>;
5790 fn mul(self, rhs: Capacitance<T>) -> Self::Output {
5791 InverseVoltage{per_V: self.per_C.clone() * rhs.F}
5792 }
5793}
5794impl<T> core::ops::Mul<&Capacitance<T>> for InverseCharge<T> where T: NumLike {
5796 type Output = InverseVoltage<T>;
5797 fn mul(self, rhs: &Capacitance<T>) -> Self::Output {
5798 InverseVoltage{per_V: self.per_C * rhs.F.clone()}
5799 }
5800}
5801impl<T> core::ops::Mul<&Capacitance<T>> for &InverseCharge<T> where T: NumLike {
5803 type Output = InverseVoltage<T>;
5804 fn mul(self, rhs: &Capacitance<T>) -> Self::Output {
5805 InverseVoltage{per_V: self.per_C.clone() * rhs.F.clone()}
5806 }
5807}
5808
5809impl<T> core::ops::Mul<Conductance<T>> for InverseCharge<T> where T: NumLike {
5812 type Output = InverseMagneticFlux<T>;
5813 fn mul(self, rhs: Conductance<T>) -> Self::Output {
5814 InverseMagneticFlux{per_Wb: self.per_C * rhs.S}
5815 }
5816}
5817impl<T> core::ops::Mul<Conductance<T>> for &InverseCharge<T> where T: NumLike {
5819 type Output = InverseMagneticFlux<T>;
5820 fn mul(self, rhs: Conductance<T>) -> Self::Output {
5821 InverseMagneticFlux{per_Wb: self.per_C.clone() * rhs.S}
5822 }
5823}
5824impl<T> core::ops::Mul<&Conductance<T>> for InverseCharge<T> where T: NumLike {
5826 type Output = InverseMagneticFlux<T>;
5827 fn mul(self, rhs: &Conductance<T>) -> Self::Output {
5828 InverseMagneticFlux{per_Wb: self.per_C * rhs.S.clone()}
5829 }
5830}
5831impl<T> core::ops::Mul<&Conductance<T>> for &InverseCharge<T> where T: NumLike {
5833 type Output = InverseMagneticFlux<T>;
5834 fn mul(self, rhs: &Conductance<T>) -> Self::Output {
5835 InverseMagneticFlux{per_Wb: self.per_C.clone() * rhs.S.clone()}
5836 }
5837}
5838
5839impl<T> core::ops::Div<Elastance<T>> for InverseCharge<T> where T: NumLike {
5842 type Output = InverseVoltage<T>;
5843 fn div(self, rhs: Elastance<T>) -> Self::Output {
5844 InverseVoltage{per_V: self.per_C / rhs.per_F}
5845 }
5846}
5847impl<T> core::ops::Div<Elastance<T>> for &InverseCharge<T> where T: NumLike {
5849 type Output = InverseVoltage<T>;
5850 fn div(self, rhs: Elastance<T>) -> Self::Output {
5851 InverseVoltage{per_V: self.per_C.clone() / rhs.per_F}
5852 }
5853}
5854impl<T> core::ops::Div<&Elastance<T>> for InverseCharge<T> where T: NumLike {
5856 type Output = InverseVoltage<T>;
5857 fn div(self, rhs: &Elastance<T>) -> Self::Output {
5858 InverseVoltage{per_V: self.per_C / rhs.per_F.clone()}
5859 }
5860}
5861impl<T> core::ops::Div<&Elastance<T>> for &InverseCharge<T> where T: NumLike {
5863 type Output = InverseVoltage<T>;
5864 fn div(self, rhs: &Elastance<T>) -> Self::Output {
5865 InverseVoltage{per_V: self.per_C.clone() / rhs.per_F.clone()}
5866 }
5867}
5868
5869impl<T> core::ops::Div<InverseMagneticFlux<T>> for InverseCharge<T> where T: NumLike {
5872 type Output = Resistance<T>;
5873 fn div(self, rhs: InverseMagneticFlux<T>) -> Self::Output {
5874 Resistance{Ohm: self.per_C / rhs.per_Wb}
5875 }
5876}
5877impl<T> core::ops::Div<InverseMagneticFlux<T>> for &InverseCharge<T> where T: NumLike {
5879 type Output = Resistance<T>;
5880 fn div(self, rhs: InverseMagneticFlux<T>) -> Self::Output {
5881 Resistance{Ohm: self.per_C.clone() / rhs.per_Wb}
5882 }
5883}
5884impl<T> core::ops::Div<&InverseMagneticFlux<T>> for InverseCharge<T> where T: NumLike {
5886 type Output = Resistance<T>;
5887 fn div(self, rhs: &InverseMagneticFlux<T>) -> Self::Output {
5888 Resistance{Ohm: self.per_C / rhs.per_Wb.clone()}
5889 }
5890}
5891impl<T> core::ops::Div<&InverseMagneticFlux<T>> for &InverseCharge<T> where T: NumLike {
5893 type Output = Resistance<T>;
5894 fn div(self, rhs: &InverseMagneticFlux<T>) -> Self::Output {
5895 Resistance{Ohm: self.per_C.clone() / rhs.per_Wb.clone()}
5896 }
5897}
5898
5899impl<T> core::ops::Mul<InverseVoltage<T>> for InverseCharge<T> where T: NumLike {
5902 type Output = InverseEnergy<T>;
5903 fn mul(self, rhs: InverseVoltage<T>) -> Self::Output {
5904 InverseEnergy{per_J: self.per_C * rhs.per_V}
5905 }
5906}
5907impl<T> core::ops::Mul<InverseVoltage<T>> for &InverseCharge<T> where T: NumLike {
5909 type Output = InverseEnergy<T>;
5910 fn mul(self, rhs: InverseVoltage<T>) -> Self::Output {
5911 InverseEnergy{per_J: self.per_C.clone() * rhs.per_V}
5912 }
5913}
5914impl<T> core::ops::Mul<&InverseVoltage<T>> for InverseCharge<T> where T: NumLike {
5916 type Output = InverseEnergy<T>;
5917 fn mul(self, rhs: &InverseVoltage<T>) -> Self::Output {
5918 InverseEnergy{per_J: self.per_C * rhs.per_V.clone()}
5919 }
5920}
5921impl<T> core::ops::Mul<&InverseVoltage<T>> for &InverseCharge<T> where T: NumLike {
5923 type Output = InverseEnergy<T>;
5924 fn mul(self, rhs: &InverseVoltage<T>) -> Self::Output {
5925 InverseEnergy{per_J: self.per_C.clone() * rhs.per_V.clone()}
5926 }
5927}
5928
5929impl<T> core::ops::Div<InverseVoltage<T>> for InverseCharge<T> where T: NumLike {
5932 type Output = Elastance<T>;
5933 fn div(self, rhs: InverseVoltage<T>) -> Self::Output {
5934 Elastance{per_F: self.per_C / rhs.per_V}
5935 }
5936}
5937impl<T> core::ops::Div<InverseVoltage<T>> for &InverseCharge<T> where T: NumLike {
5939 type Output = Elastance<T>;
5940 fn div(self, rhs: InverseVoltage<T>) -> Self::Output {
5941 Elastance{per_F: self.per_C.clone() / rhs.per_V}
5942 }
5943}
5944impl<T> core::ops::Div<&InverseVoltage<T>> for InverseCharge<T> where T: NumLike {
5946 type Output = Elastance<T>;
5947 fn div(self, rhs: &InverseVoltage<T>) -> Self::Output {
5948 Elastance{per_F: self.per_C / rhs.per_V.clone()}
5949 }
5950}
5951impl<T> core::ops::Div<&InverseVoltage<T>> for &InverseCharge<T> where T: NumLike {
5953 type Output = Elastance<T>;
5954 fn div(self, rhs: &InverseVoltage<T>) -> Self::Output {
5955 Elastance{per_F: self.per_C.clone() / rhs.per_V.clone()}
5956 }
5957}
5958
5959impl<T> core::ops::Mul<MagneticFlux<T>> for InverseCharge<T> where T: NumLike {
5962 type Output = Resistance<T>;
5963 fn mul(self, rhs: MagneticFlux<T>) -> Self::Output {
5964 Resistance{Ohm: self.per_C * rhs.Wb}
5965 }
5966}
5967impl<T> core::ops::Mul<MagneticFlux<T>> for &InverseCharge<T> where T: NumLike {
5969 type Output = Resistance<T>;
5970 fn mul(self, rhs: MagneticFlux<T>) -> Self::Output {
5971 Resistance{Ohm: self.per_C.clone() * rhs.Wb}
5972 }
5973}
5974impl<T> core::ops::Mul<&MagneticFlux<T>> for InverseCharge<T> where T: NumLike {
5976 type Output = Resistance<T>;
5977 fn mul(self, rhs: &MagneticFlux<T>) -> Self::Output {
5978 Resistance{Ohm: self.per_C * rhs.Wb.clone()}
5979 }
5980}
5981impl<T> core::ops::Mul<&MagneticFlux<T>> for &InverseCharge<T> where T: NumLike {
5983 type Output = Resistance<T>;
5984 fn mul(self, rhs: &MagneticFlux<T>) -> Self::Output {
5985 Resistance{Ohm: self.per_C.clone() * rhs.Wb.clone()}
5986 }
5987}
5988
5989impl<T> core::ops::Div<Resistance<T>> for InverseCharge<T> where T: NumLike {
5992 type Output = InverseMagneticFlux<T>;
5993 fn div(self, rhs: Resistance<T>) -> Self::Output {
5994 InverseMagneticFlux{per_Wb: self.per_C / rhs.Ohm}
5995 }
5996}
5997impl<T> core::ops::Div<Resistance<T>> for &InverseCharge<T> where T: NumLike {
5999 type Output = InverseMagneticFlux<T>;
6000 fn div(self, rhs: Resistance<T>) -> Self::Output {
6001 InverseMagneticFlux{per_Wb: self.per_C.clone() / rhs.Ohm}
6002 }
6003}
6004impl<T> core::ops::Div<&Resistance<T>> for InverseCharge<T> where T: NumLike {
6006 type Output = InverseMagneticFlux<T>;
6007 fn div(self, rhs: &Resistance<T>) -> Self::Output {
6008 InverseMagneticFlux{per_Wb: self.per_C / rhs.Ohm.clone()}
6009 }
6010}
6011impl<T> core::ops::Div<&Resistance<T>> for &InverseCharge<T> where T: NumLike {
6013 type Output = InverseMagneticFlux<T>;
6014 fn div(self, rhs: &Resistance<T>) -> Self::Output {
6015 InverseMagneticFlux{per_Wb: self.per_C.clone() / rhs.Ohm.clone()}
6016 }
6017}
6018
6019impl<T> core::ops::Mul<Voltage<T>> for InverseCharge<T> where T: NumLike {
6022 type Output = Elastance<T>;
6023 fn mul(self, rhs: Voltage<T>) -> Self::Output {
6024 Elastance{per_F: self.per_C * rhs.V}
6025 }
6026}
6027impl<T> core::ops::Mul<Voltage<T>> for &InverseCharge<T> where T: NumLike {
6029 type Output = Elastance<T>;
6030 fn mul(self, rhs: Voltage<T>) -> Self::Output {
6031 Elastance{per_F: self.per_C.clone() * rhs.V}
6032 }
6033}
6034impl<T> core::ops::Mul<&Voltage<T>> for InverseCharge<T> where T: NumLike {
6036 type Output = Elastance<T>;
6037 fn mul(self, rhs: &Voltage<T>) -> Self::Output {
6038 Elastance{per_F: self.per_C * rhs.V.clone()}
6039 }
6040}
6041impl<T> core::ops::Mul<&Voltage<T>> for &InverseCharge<T> where T: NumLike {
6043 type Output = Elastance<T>;
6044 fn mul(self, rhs: &Voltage<T>) -> Self::Output {
6045 Elastance{per_F: self.per_C.clone() * rhs.V.clone()}
6046 }
6047}
6048
6049impl<T> core::ops::Div<Voltage<T>> for InverseCharge<T> where T: NumLike {
6052 type Output = InverseEnergy<T>;
6053 fn div(self, rhs: Voltage<T>) -> Self::Output {
6054 InverseEnergy{per_J: self.per_C / rhs.V}
6055 }
6056}
6057impl<T> core::ops::Div<Voltage<T>> for &InverseCharge<T> where T: NumLike {
6059 type Output = InverseEnergy<T>;
6060 fn div(self, rhs: Voltage<T>) -> Self::Output {
6061 InverseEnergy{per_J: self.per_C.clone() / rhs.V}
6062 }
6063}
6064impl<T> core::ops::Div<&Voltage<T>> for InverseCharge<T> where T: NumLike {
6066 type Output = InverseEnergy<T>;
6067 fn div(self, rhs: &Voltage<T>) -> Self::Output {
6068 InverseEnergy{per_J: self.per_C / rhs.V.clone()}
6069 }
6070}
6071impl<T> core::ops::Div<&Voltage<T>> for &InverseCharge<T> where T: NumLike {
6073 type Output = InverseEnergy<T>;
6074 fn div(self, rhs: &Voltage<T>) -> Self::Output {
6075 InverseEnergy{per_J: self.per_C.clone() / rhs.V.clone()}
6076 }
6077}
6078
6079impl<T> core::ops::Mul<Energy<T>> for InverseCharge<T> where T: NumLike {
6082 type Output = Voltage<T>;
6083 fn mul(self, rhs: Energy<T>) -> Self::Output {
6084 Voltage{V: self.per_C * rhs.J}
6085 }
6086}
6087impl<T> core::ops::Mul<Energy<T>> for &InverseCharge<T> where T: NumLike {
6089 type Output = Voltage<T>;
6090 fn mul(self, rhs: Energy<T>) -> Self::Output {
6091 Voltage{V: self.per_C.clone() * rhs.J}
6092 }
6093}
6094impl<T> core::ops::Mul<&Energy<T>> for InverseCharge<T> where T: NumLike {
6096 type Output = Voltage<T>;
6097 fn mul(self, rhs: &Energy<T>) -> Self::Output {
6098 Voltage{V: self.per_C * rhs.J.clone()}
6099 }
6100}
6101impl<T> core::ops::Mul<&Energy<T>> for &InverseCharge<T> where T: NumLike {
6103 type Output = Voltage<T>;
6104 fn mul(self, rhs: &Energy<T>) -> Self::Output {
6105 Voltage{V: self.per_C.clone() * rhs.J.clone()}
6106 }
6107}
6108
6109impl<T> core::ops::Mul<Torque<T>> for InverseCharge<T> where T: NumLike {
6112 type Output = Voltage<T>;
6113 fn mul(self, rhs: Torque<T>) -> Self::Output {
6114 Voltage{V: self.per_C * rhs.Nm}
6115 }
6116}
6117impl<T> core::ops::Mul<Torque<T>> for &InverseCharge<T> where T: NumLike {
6119 type Output = Voltage<T>;
6120 fn mul(self, rhs: Torque<T>) -> Self::Output {
6121 Voltage{V: self.per_C.clone() * rhs.Nm}
6122 }
6123}
6124impl<T> core::ops::Mul<&Torque<T>> for InverseCharge<T> where T: NumLike {
6126 type Output = Voltage<T>;
6127 fn mul(self, rhs: &Torque<T>) -> Self::Output {
6128 Voltage{V: self.per_C * rhs.Nm.clone()}
6129 }
6130}
6131impl<T> core::ops::Mul<&Torque<T>> for &InverseCharge<T> where T: NumLike {
6133 type Output = Voltage<T>;
6134 fn mul(self, rhs: &Torque<T>) -> Self::Output {
6135 Voltage{V: self.per_C.clone() * rhs.Nm.clone()}
6136 }
6137}
6138
6139impl<T> core::ops::Div<Frequency<T>> for InverseCharge<T> where T: NumLike {
6142 type Output = InverseCurrent<T>;
6143 fn div(self, rhs: Frequency<T>) -> Self::Output {
6144 InverseCurrent{per_A: self.per_C / rhs.Hz}
6145 }
6146}
6147impl<T> core::ops::Div<Frequency<T>> for &InverseCharge<T> where T: NumLike {
6149 type Output = InverseCurrent<T>;
6150 fn div(self, rhs: Frequency<T>) -> Self::Output {
6151 InverseCurrent{per_A: self.per_C.clone() / rhs.Hz}
6152 }
6153}
6154impl<T> core::ops::Div<&Frequency<T>> for InverseCharge<T> where T: NumLike {
6156 type Output = InverseCurrent<T>;
6157 fn div(self, rhs: &Frequency<T>) -> Self::Output {
6158 InverseCurrent{per_A: self.per_C / rhs.Hz.clone()}
6159 }
6160}
6161impl<T> core::ops::Div<&Frequency<T>> for &InverseCharge<T> where T: NumLike {
6163 type Output = InverseCurrent<T>;
6164 fn div(self, rhs: &Frequency<T>) -> Self::Output {
6165 InverseCurrent{per_A: self.per_C.clone() / rhs.Hz.clone()}
6166 }
6167}
6168
6169impl<T> core::ops::Div<InverseEnergy<T>> for InverseCharge<T> where T: NumLike {
6172 type Output = Voltage<T>;
6173 fn div(self, rhs: InverseEnergy<T>) -> Self::Output {
6174 Voltage{V: self.per_C / rhs.per_J}
6175 }
6176}
6177impl<T> core::ops::Div<InverseEnergy<T>> for &InverseCharge<T> where T: NumLike {
6179 type Output = Voltage<T>;
6180 fn div(self, rhs: InverseEnergy<T>) -> Self::Output {
6181 Voltage{V: self.per_C.clone() / rhs.per_J}
6182 }
6183}
6184impl<T> core::ops::Div<&InverseEnergy<T>> for InverseCharge<T> where T: NumLike {
6186 type Output = Voltage<T>;
6187 fn div(self, rhs: &InverseEnergy<T>) -> Self::Output {
6188 Voltage{V: self.per_C / rhs.per_J.clone()}
6189 }
6190}
6191impl<T> core::ops::Div<&InverseEnergy<T>> for &InverseCharge<T> where T: NumLike {
6193 type Output = Voltage<T>;
6194 fn div(self, rhs: &InverseEnergy<T>) -> Self::Output {
6195 Voltage{V: self.per_C.clone() / rhs.per_J.clone()}
6196 }
6197}
6198
6199impl<T> core::ops::Div<InverseTorque<T>> for InverseCharge<T> where T: NumLike {
6202 type Output = Voltage<T>;
6203 fn div(self, rhs: InverseTorque<T>) -> Self::Output {
6204 Voltage{V: self.per_C / rhs.per_Nm}
6205 }
6206}
6207impl<T> core::ops::Div<InverseTorque<T>> for &InverseCharge<T> where T: NumLike {
6209 type Output = Voltage<T>;
6210 fn div(self, rhs: InverseTorque<T>) -> Self::Output {
6211 Voltage{V: self.per_C.clone() / rhs.per_Nm}
6212 }
6213}
6214impl<T> core::ops::Div<&InverseTorque<T>> for InverseCharge<T> where T: NumLike {
6216 type Output = Voltage<T>;
6217 fn div(self, rhs: &InverseTorque<T>) -> Self::Output {
6218 Voltage{V: self.per_C / rhs.per_Nm.clone()}
6219 }
6220}
6221impl<T> core::ops::Div<&InverseTorque<T>> for &InverseCharge<T> where T: NumLike {
6223 type Output = Voltage<T>;
6224 fn div(self, rhs: &InverseTorque<T>) -> Self::Output {
6225 Voltage{V: self.per_C.clone() / rhs.per_Nm.clone()}
6226 }
6227}
6228
6229impl<T> core::ops::Div<InverseCharge<T>> for f64 where T: NumLike+From<f64> {
6232 type Output = Charge<T>;
6233 fn div(self, rhs: InverseCharge<T>) -> Self::Output {
6234 Charge{C: T::from(self) / rhs.per_C}
6235 }
6236}
6237impl<T> core::ops::Div<InverseCharge<T>> for &f64 where T: NumLike+From<f64> {
6239 type Output = Charge<T>;
6240 fn div(self, rhs: InverseCharge<T>) -> Self::Output {
6241 Charge{C: T::from(self.clone()) / rhs.per_C}
6242 }
6243}
6244impl<T> core::ops::Div<&InverseCharge<T>> for f64 where T: NumLike+From<f64> {
6246 type Output = Charge<T>;
6247 fn div(self, rhs: &InverseCharge<T>) -> Self::Output {
6248 Charge{C: T::from(self) / rhs.per_C.clone()}
6249 }
6250}
6251impl<T> core::ops::Div<&InverseCharge<T>> for &f64 where T: NumLike+From<f64> {
6253 type Output = Charge<T>;
6254 fn div(self, rhs: &InverseCharge<T>) -> Self::Output {
6255 Charge{C: T::from(self.clone()) / rhs.per_C.clone()}
6256 }
6257}
6258
6259impl<T> core::ops::Div<InverseCharge<T>> for f32 where T: NumLike+From<f32> {
6262 type Output = Charge<T>;
6263 fn div(self, rhs: InverseCharge<T>) -> Self::Output {
6264 Charge{C: T::from(self) / rhs.per_C}
6265 }
6266}
6267impl<T> core::ops::Div<InverseCharge<T>> for &f32 where T: NumLike+From<f32> {
6269 type Output = Charge<T>;
6270 fn div(self, rhs: InverseCharge<T>) -> Self::Output {
6271 Charge{C: T::from(self.clone()) / rhs.per_C}
6272 }
6273}
6274impl<T> core::ops::Div<&InverseCharge<T>> for f32 where T: NumLike+From<f32> {
6276 type Output = Charge<T>;
6277 fn div(self, rhs: &InverseCharge<T>) -> Self::Output {
6278 Charge{C: T::from(self) / rhs.per_C.clone()}
6279 }
6280}
6281impl<T> core::ops::Div<&InverseCharge<T>> for &f32 where T: NumLike+From<f32> {
6283 type Output = Charge<T>;
6284 fn div(self, rhs: &InverseCharge<T>) -> Self::Output {
6285 Charge{C: T::from(self.clone()) / rhs.per_C.clone()}
6286 }
6287}
6288
6289impl<T> core::ops::Div<InverseCharge<T>> for i64 where T: NumLike+From<i64> {
6292 type Output = Charge<T>;
6293 fn div(self, rhs: InverseCharge<T>) -> Self::Output {
6294 Charge{C: T::from(self) / rhs.per_C}
6295 }
6296}
6297impl<T> core::ops::Div<InverseCharge<T>> for &i64 where T: NumLike+From<i64> {
6299 type Output = Charge<T>;
6300 fn div(self, rhs: InverseCharge<T>) -> Self::Output {
6301 Charge{C: T::from(self.clone()) / rhs.per_C}
6302 }
6303}
6304impl<T> core::ops::Div<&InverseCharge<T>> for i64 where T: NumLike+From<i64> {
6306 type Output = Charge<T>;
6307 fn div(self, rhs: &InverseCharge<T>) -> Self::Output {
6308 Charge{C: T::from(self) / rhs.per_C.clone()}
6309 }
6310}
6311impl<T> core::ops::Div<&InverseCharge<T>> for &i64 where T: NumLike+From<i64> {
6313 type Output = Charge<T>;
6314 fn div(self, rhs: &InverseCharge<T>) -> Self::Output {
6315 Charge{C: T::from(self.clone()) / rhs.per_C.clone()}
6316 }
6317}
6318
6319impl<T> core::ops::Div<InverseCharge<T>> for i32 where T: NumLike+From<i32> {
6322 type Output = Charge<T>;
6323 fn div(self, rhs: InverseCharge<T>) -> Self::Output {
6324 Charge{C: T::from(self) / rhs.per_C}
6325 }
6326}
6327impl<T> core::ops::Div<InverseCharge<T>> for &i32 where T: NumLike+From<i32> {
6329 type Output = Charge<T>;
6330 fn div(self, rhs: InverseCharge<T>) -> Self::Output {
6331 Charge{C: T::from(self.clone()) / rhs.per_C}
6332 }
6333}
6334impl<T> core::ops::Div<&InverseCharge<T>> for i32 where T: NumLike+From<i32> {
6336 type Output = Charge<T>;
6337 fn div(self, rhs: &InverseCharge<T>) -> Self::Output {
6338 Charge{C: T::from(self) / rhs.per_C.clone()}
6339 }
6340}
6341impl<T> core::ops::Div<&InverseCharge<T>> for &i32 where T: NumLike+From<i32> {
6343 type Output = Charge<T>;
6344 fn div(self, rhs: &InverseCharge<T>) -> Self::Output {
6345 Charge{C: T::from(self.clone()) / rhs.per_C.clone()}
6346 }
6347}
6348
6349#[cfg(feature="num-bigfloat")]
6352impl<T> core::ops::Div<InverseCharge<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
6353 type Output = Charge<T>;
6354 fn div(self, rhs: InverseCharge<T>) -> Self::Output {
6355 Charge{C: T::from(self) / rhs.per_C}
6356 }
6357}
6358#[cfg(feature="num-bigfloat")]
6360impl<T> core::ops::Div<InverseCharge<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
6361 type Output = Charge<T>;
6362 fn div(self, rhs: InverseCharge<T>) -> Self::Output {
6363 Charge{C: T::from(self.clone()) / rhs.per_C}
6364 }
6365}
6366#[cfg(feature="num-bigfloat")]
6368impl<T> core::ops::Div<&InverseCharge<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
6369 type Output = Charge<T>;
6370 fn div(self, rhs: &InverseCharge<T>) -> Self::Output {
6371 Charge{C: T::from(self) / rhs.per_C.clone()}
6372 }
6373}
6374#[cfg(feature="num-bigfloat")]
6376impl<T> core::ops::Div<&InverseCharge<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
6377 type Output = Charge<T>;
6378 fn div(self, rhs: &InverseCharge<T>) -> Self::Output {
6379 Charge{C: T::from(self.clone()) / rhs.per_C.clone()}
6380 }
6381}
6382
6383#[cfg(feature="num-complex")]
6386impl<T> core::ops::Div<InverseCharge<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
6387 type Output = Charge<T>;
6388 fn div(self, rhs: InverseCharge<T>) -> Self::Output {
6389 Charge{C: T::from(self) / rhs.per_C}
6390 }
6391}
6392#[cfg(feature="num-complex")]
6394impl<T> core::ops::Div<InverseCharge<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
6395 type Output = Charge<T>;
6396 fn div(self, rhs: InverseCharge<T>) -> Self::Output {
6397 Charge{C: T::from(self.clone()) / rhs.per_C}
6398 }
6399}
6400#[cfg(feature="num-complex")]
6402impl<T> core::ops::Div<&InverseCharge<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
6403 type Output = Charge<T>;
6404 fn div(self, rhs: &InverseCharge<T>) -> Self::Output {
6405 Charge{C: T::from(self) / rhs.per_C.clone()}
6406 }
6407}
6408#[cfg(feature="num-complex")]
6410impl<T> core::ops::Div<&InverseCharge<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
6411 type Output = Charge<T>;
6412 fn div(self, rhs: &InverseCharge<T>) -> Self::Output {
6413 Charge{C: T::from(self.clone()) / rhs.per_C.clone()}
6414 }
6415}
6416
6417#[cfg(feature="num-complex")]
6420impl<T> core::ops::Div<InverseCharge<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
6421 type Output = Charge<T>;
6422 fn div(self, rhs: InverseCharge<T>) -> Self::Output {
6423 Charge{C: T::from(self) / rhs.per_C}
6424 }
6425}
6426#[cfg(feature="num-complex")]
6428impl<T> core::ops::Div<InverseCharge<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
6429 type Output = Charge<T>;
6430 fn div(self, rhs: InverseCharge<T>) -> Self::Output {
6431 Charge{C: T::from(self.clone()) / rhs.per_C}
6432 }
6433}
6434#[cfg(feature="num-complex")]
6436impl<T> core::ops::Div<&InverseCharge<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
6437 type Output = Charge<T>;
6438 fn div(self, rhs: &InverseCharge<T>) -> Self::Output {
6439 Charge{C: T::from(self) / rhs.per_C.clone()}
6440 }
6441}
6442#[cfg(feature="num-complex")]
6444impl<T> core::ops::Div<&InverseCharge<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
6445 type Output = Charge<T>;
6446 fn div(self, rhs: &InverseCharge<T>) -> Self::Output {
6447 Charge{C: T::from(self.clone()) / rhs.per_C.clone()}
6448 }
6449}
6450
6451#[derive(UnitStruct, Debug, Clone)]
6453#[cfg_attr(feature="serde", derive(Serialize, Deserialize))]
6454pub struct InverseInductance<T: NumLike>{
6455 pub per_H: T
6457}
6458
6459impl<T> InverseInductance<T> where T: NumLike {
6460
6461 pub fn unit_name() -> &'static str { "inverse henries" }
6463
6464 pub fn unit_symbol() -> &'static str { "1/H" }
6466
6467 pub fn from_per_H(per_H: T) -> Self { InverseInductance{per_H: per_H} }
6472
6473 pub fn to_per_H(&self) -> T { self.per_H.clone() }
6475
6476 pub fn from_per_henry(per_henry: T) -> Self { InverseInductance{per_H: per_henry} }
6481
6482 pub fn to_per_henry(&self) -> T { self.per_H.clone() }
6484
6485}
6486
6487impl<T> fmt::Display for InverseInductance<T> where T: NumLike {
6488 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6489 write!(f, "{} {}", &self.per_H, Self::unit_symbol())
6490 }
6491}
6492
6493impl<T> InverseInductance<T> where T: NumLike+From<f64> {
6494
6495 pub fn to_per_mH(&self) -> T {
6499 return self.per_H.clone() * T::from(0.001_f64);
6500 }
6501
6502 pub fn from_per_mH(per_mH: T) -> Self {
6509 InverseInductance{per_H: per_mH * T::from(1000.0_f64)}
6510 }
6511
6512 pub fn to_per_uH(&self) -> T {
6516 return self.per_H.clone() * T::from(1e-06_f64);
6517 }
6518
6519 pub fn from_per_uH(per_uH: T) -> Self {
6526 InverseInductance{per_H: per_uH * T::from(1000000.0_f64)}
6527 }
6528
6529 pub fn to_per_nH(&self) -> T {
6533 return self.per_H.clone() * T::from(1e-09_f64);
6534 }
6535
6536 pub fn from_per_nH(per_nH: T) -> Self {
6543 InverseInductance{per_H: per_nH * T::from(1000000000.0_f64)}
6544 }
6545
6546 pub fn to_per_kH(&self) -> T {
6550 return self.per_H.clone() * T::from(1000.0_f64);
6551 }
6552
6553 pub fn from_per_kH(per_kH: T) -> Self {
6560 InverseInductance{per_H: per_kH * T::from(0.001_f64)}
6561 }
6562
6563 pub fn to_per_MH(&self) -> T {
6567 return self.per_H.clone() * T::from(1000000.0_f64);
6568 }
6569
6570 pub fn from_per_MH(per_MH: T) -> Self {
6577 InverseInductance{per_H: per_MH * T::from(1e-06_f64)}
6578 }
6579
6580 pub fn to_per_GH(&self) -> T {
6584 return self.per_H.clone() * T::from(1000000000.0_f64);
6585 }
6586
6587 pub fn from_per_GH(per_GH: T) -> Self {
6594 InverseInductance{per_H: per_GH * T::from(1e-09_f64)}
6595 }
6596
6597}
6598
6599
6600#[cfg(feature="num-bigfloat")]
6602impl core::ops::Mul<InverseInductance<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
6603 type Output = InverseInductance<num_bigfloat::BigFloat>;
6604 fn mul(self, rhs: InverseInductance<num_bigfloat::BigFloat>) -> Self::Output {
6605 InverseInductance{per_H: self * rhs.per_H}
6606 }
6607}
6608#[cfg(feature="num-bigfloat")]
6610impl core::ops::Mul<InverseInductance<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
6611 type Output = InverseInductance<num_bigfloat::BigFloat>;
6612 fn mul(self, rhs: InverseInductance<num_bigfloat::BigFloat>) -> Self::Output {
6613 InverseInductance{per_H: self.clone() * rhs.per_H}
6614 }
6615}
6616#[cfg(feature="num-bigfloat")]
6618impl core::ops::Mul<&InverseInductance<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
6619 type Output = InverseInductance<num_bigfloat::BigFloat>;
6620 fn mul(self, rhs: &InverseInductance<num_bigfloat::BigFloat>) -> Self::Output {
6621 InverseInductance{per_H: self * rhs.per_H.clone()}
6622 }
6623}
6624#[cfg(feature="num-bigfloat")]
6626impl core::ops::Mul<&InverseInductance<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
6627 type Output = InverseInductance<num_bigfloat::BigFloat>;
6628 fn mul(self, rhs: &InverseInductance<num_bigfloat::BigFloat>) -> Self::Output {
6629 InverseInductance{per_H: self.clone() * rhs.per_H.clone()}
6630 }
6631}
6632
6633#[cfg(feature="num-complex")]
6635impl core::ops::Mul<InverseInductance<num_complex::Complex32>> for num_complex::Complex32 {
6636 type Output = InverseInductance<num_complex::Complex32>;
6637 fn mul(self, rhs: InverseInductance<num_complex::Complex32>) -> Self::Output {
6638 InverseInductance{per_H: self * rhs.per_H}
6639 }
6640}
6641#[cfg(feature="num-complex")]
6643impl core::ops::Mul<InverseInductance<num_complex::Complex32>> for &num_complex::Complex32 {
6644 type Output = InverseInductance<num_complex::Complex32>;
6645 fn mul(self, rhs: InverseInductance<num_complex::Complex32>) -> Self::Output {
6646 InverseInductance{per_H: self.clone() * rhs.per_H}
6647 }
6648}
6649#[cfg(feature="num-complex")]
6651impl core::ops::Mul<&InverseInductance<num_complex::Complex32>> for num_complex::Complex32 {
6652 type Output = InverseInductance<num_complex::Complex32>;
6653 fn mul(self, rhs: &InverseInductance<num_complex::Complex32>) -> Self::Output {
6654 InverseInductance{per_H: self * rhs.per_H.clone()}
6655 }
6656}
6657#[cfg(feature="num-complex")]
6659impl core::ops::Mul<&InverseInductance<num_complex::Complex32>> for &num_complex::Complex32 {
6660 type Output = InverseInductance<num_complex::Complex32>;
6661 fn mul(self, rhs: &InverseInductance<num_complex::Complex32>) -> Self::Output {
6662 InverseInductance{per_H: self.clone() * rhs.per_H.clone()}
6663 }
6664}
6665
6666#[cfg(feature="num-complex")]
6668impl core::ops::Mul<InverseInductance<num_complex::Complex64>> for num_complex::Complex64 {
6669 type Output = InverseInductance<num_complex::Complex64>;
6670 fn mul(self, rhs: InverseInductance<num_complex::Complex64>) -> Self::Output {
6671 InverseInductance{per_H: self * rhs.per_H}
6672 }
6673}
6674#[cfg(feature="num-complex")]
6676impl core::ops::Mul<InverseInductance<num_complex::Complex64>> for &num_complex::Complex64 {
6677 type Output = InverseInductance<num_complex::Complex64>;
6678 fn mul(self, rhs: InverseInductance<num_complex::Complex64>) -> Self::Output {
6679 InverseInductance{per_H: self.clone() * rhs.per_H}
6680 }
6681}
6682#[cfg(feature="num-complex")]
6684impl core::ops::Mul<&InverseInductance<num_complex::Complex64>> for num_complex::Complex64 {
6685 type Output = InverseInductance<num_complex::Complex64>;
6686 fn mul(self, rhs: &InverseInductance<num_complex::Complex64>) -> Self::Output {
6687 InverseInductance{per_H: self * rhs.per_H.clone()}
6688 }
6689}
6690#[cfg(feature="num-complex")]
6692impl core::ops::Mul<&InverseInductance<num_complex::Complex64>> for &num_complex::Complex64 {
6693 type Output = InverseInductance<num_complex::Complex64>;
6694 fn mul(self, rhs: &InverseInductance<num_complex::Complex64>) -> Self::Output {
6695 InverseInductance{per_H: self.clone() * rhs.per_H.clone()}
6696 }
6697}
6698
6699
6700
6701
6702impl<T> core::ops::Div<Current<T>> for InverseInductance<T> where T: NumLike {
6705 type Output = InverseMagneticFlux<T>;
6706 fn div(self, rhs: Current<T>) -> Self::Output {
6707 InverseMagneticFlux{per_Wb: self.per_H / rhs.A}
6708 }
6709}
6710impl<T> core::ops::Div<Current<T>> for &InverseInductance<T> where T: NumLike {
6712 type Output = InverseMagneticFlux<T>;
6713 fn div(self, rhs: Current<T>) -> Self::Output {
6714 InverseMagneticFlux{per_Wb: self.per_H.clone() / rhs.A}
6715 }
6716}
6717impl<T> core::ops::Div<&Current<T>> for InverseInductance<T> where T: NumLike {
6719 type Output = InverseMagneticFlux<T>;
6720 fn div(self, rhs: &Current<T>) -> Self::Output {
6721 InverseMagneticFlux{per_Wb: self.per_H / rhs.A.clone()}
6722 }
6723}
6724impl<T> core::ops::Div<&Current<T>> for &InverseInductance<T> where T: NumLike {
6726 type Output = InverseMagneticFlux<T>;
6727 fn div(self, rhs: &Current<T>) -> Self::Output {
6728 InverseMagneticFlux{per_Wb: self.per_H.clone() / rhs.A.clone()}
6729 }
6730}
6731
6732impl<T> core::ops::Mul<InverseCurrent<T>> for InverseInductance<T> where T: NumLike {
6735 type Output = InverseMagneticFlux<T>;
6736 fn mul(self, rhs: InverseCurrent<T>) -> Self::Output {
6737 InverseMagneticFlux{per_Wb: self.per_H * rhs.per_A}
6738 }
6739}
6740impl<T> core::ops::Mul<InverseCurrent<T>> for &InverseInductance<T> where T: NumLike {
6742 type Output = InverseMagneticFlux<T>;
6743 fn mul(self, rhs: InverseCurrent<T>) -> Self::Output {
6744 InverseMagneticFlux{per_Wb: self.per_H.clone() * rhs.per_A}
6745 }
6746}
6747impl<T> core::ops::Mul<&InverseCurrent<T>> for InverseInductance<T> where T: NumLike {
6749 type Output = InverseMagneticFlux<T>;
6750 fn mul(self, rhs: &InverseCurrent<T>) -> Self::Output {
6751 InverseMagneticFlux{per_Wb: self.per_H * rhs.per_A.clone()}
6752 }
6753}
6754impl<T> core::ops::Mul<&InverseCurrent<T>> for &InverseInductance<T> where T: NumLike {
6756 type Output = InverseMagneticFlux<T>;
6757 fn mul(self, rhs: &InverseCurrent<T>) -> Self::Output {
6758 InverseMagneticFlux{per_Wb: self.per_H.clone() * rhs.per_A.clone()}
6759 }
6760}
6761
6762impl<T> core::ops::Mul<Time<T>> for InverseInductance<T> where T: NumLike {
6765 type Output = Conductance<T>;
6766 fn mul(self, rhs: Time<T>) -> Self::Output {
6767 Conductance{S: self.per_H * rhs.s}
6768 }
6769}
6770impl<T> core::ops::Mul<Time<T>> for &InverseInductance<T> where T: NumLike {
6772 type Output = Conductance<T>;
6773 fn mul(self, rhs: Time<T>) -> Self::Output {
6774 Conductance{S: self.per_H.clone() * rhs.s}
6775 }
6776}
6777impl<T> core::ops::Mul<&Time<T>> for InverseInductance<T> where T: NumLike {
6779 type Output = Conductance<T>;
6780 fn mul(self, rhs: &Time<T>) -> Self::Output {
6781 Conductance{S: self.per_H * rhs.s.clone()}
6782 }
6783}
6784impl<T> core::ops::Mul<&Time<T>> for &InverseInductance<T> where T: NumLike {
6786 type Output = Conductance<T>;
6787 fn mul(self, rhs: &Time<T>) -> Self::Output {
6788 Conductance{S: self.per_H.clone() * rhs.s.clone()}
6789 }
6790}
6791
6792impl<T> core::ops::Div<Conductance<T>> for InverseInductance<T> where T: NumLike {
6795 type Output = Frequency<T>;
6796 fn div(self, rhs: Conductance<T>) -> Self::Output {
6797 Frequency{Hz: self.per_H / rhs.S}
6798 }
6799}
6800impl<T> core::ops::Div<Conductance<T>> for &InverseInductance<T> where T: NumLike {
6802 type Output = Frequency<T>;
6803 fn div(self, rhs: Conductance<T>) -> Self::Output {
6804 Frequency{Hz: self.per_H.clone() / rhs.S}
6805 }
6806}
6807impl<T> core::ops::Div<&Conductance<T>> for InverseInductance<T> where T: NumLike {
6809 type Output = Frequency<T>;
6810 fn div(self, rhs: &Conductance<T>) -> Self::Output {
6811 Frequency{Hz: self.per_H / rhs.S.clone()}
6812 }
6813}
6814impl<T> core::ops::Div<&Conductance<T>> for &InverseInductance<T> where T: NumLike {
6816 type Output = Frequency<T>;
6817 fn div(self, rhs: &Conductance<T>) -> Self::Output {
6818 Frequency{Hz: self.per_H.clone() / rhs.S.clone()}
6819 }
6820}
6821
6822impl<T> core::ops::Div<InverseMagneticFlux<T>> for InverseInductance<T> where T: NumLike {
6825 type Output = Current<T>;
6826 fn div(self, rhs: InverseMagneticFlux<T>) -> Self::Output {
6827 Current{A: self.per_H / rhs.per_Wb}
6828 }
6829}
6830impl<T> core::ops::Div<InverseMagneticFlux<T>> for &InverseInductance<T> where T: NumLike {
6832 type Output = Current<T>;
6833 fn div(self, rhs: InverseMagneticFlux<T>) -> Self::Output {
6834 Current{A: self.per_H.clone() / rhs.per_Wb}
6835 }
6836}
6837impl<T> core::ops::Div<&InverseMagneticFlux<T>> for InverseInductance<T> where T: NumLike {
6839 type Output = Current<T>;
6840 fn div(self, rhs: &InverseMagneticFlux<T>) -> Self::Output {
6841 Current{A: self.per_H / rhs.per_Wb.clone()}
6842 }
6843}
6844impl<T> core::ops::Div<&InverseMagneticFlux<T>> for &InverseInductance<T> where T: NumLike {
6846 type Output = Current<T>;
6847 fn div(self, rhs: &InverseMagneticFlux<T>) -> Self::Output {
6848 Current{A: self.per_H.clone() / rhs.per_Wb.clone()}
6849 }
6850}
6851
6852impl<T> core::ops::Mul<MagneticFlux<T>> for InverseInductance<T> where T: NumLike {
6855 type Output = Current<T>;
6856 fn mul(self, rhs: MagneticFlux<T>) -> Self::Output {
6857 Current{A: self.per_H * rhs.Wb}
6858 }
6859}
6860impl<T> core::ops::Mul<MagneticFlux<T>> for &InverseInductance<T> where T: NumLike {
6862 type Output = Current<T>;
6863 fn mul(self, rhs: MagneticFlux<T>) -> Self::Output {
6864 Current{A: self.per_H.clone() * rhs.Wb}
6865 }
6866}
6867impl<T> core::ops::Mul<&MagneticFlux<T>> for InverseInductance<T> where T: NumLike {
6869 type Output = Current<T>;
6870 fn mul(self, rhs: &MagneticFlux<T>) -> Self::Output {
6871 Current{A: self.per_H * rhs.Wb.clone()}
6872 }
6873}
6874impl<T> core::ops::Mul<&MagneticFlux<T>> for &InverseInductance<T> where T: NumLike {
6876 type Output = Current<T>;
6877 fn mul(self, rhs: &MagneticFlux<T>) -> Self::Output {
6878 Current{A: self.per_H.clone() * rhs.Wb.clone()}
6879 }
6880}
6881
6882impl<T> core::ops::Mul<Resistance<T>> for InverseInductance<T> where T: NumLike {
6885 type Output = Frequency<T>;
6886 fn mul(self, rhs: Resistance<T>) -> Self::Output {
6887 Frequency{Hz: self.per_H * rhs.Ohm}
6888 }
6889}
6890impl<T> core::ops::Mul<Resistance<T>> for &InverseInductance<T> where T: NumLike {
6892 type Output = Frequency<T>;
6893 fn mul(self, rhs: Resistance<T>) -> Self::Output {
6894 Frequency{Hz: self.per_H.clone() * rhs.Ohm}
6895 }
6896}
6897impl<T> core::ops::Mul<&Resistance<T>> for InverseInductance<T> where T: NumLike {
6899 type Output = Frequency<T>;
6900 fn mul(self, rhs: &Resistance<T>) -> Self::Output {
6901 Frequency{Hz: self.per_H * rhs.Ohm.clone()}
6902 }
6903}
6904impl<T> core::ops::Mul<&Resistance<T>> for &InverseInductance<T> where T: NumLike {
6906 type Output = Frequency<T>;
6907 fn mul(self, rhs: &Resistance<T>) -> Self::Output {
6908 Frequency{Hz: self.per_H.clone() * rhs.Ohm.clone()}
6909 }
6910}
6911
6912impl<T> core::ops::Div<Frequency<T>> for InverseInductance<T> where T: NumLike {
6915 type Output = Conductance<T>;
6916 fn div(self, rhs: Frequency<T>) -> Self::Output {
6917 Conductance{S: self.per_H / rhs.Hz}
6918 }
6919}
6920impl<T> core::ops::Div<Frequency<T>> for &InverseInductance<T> where T: NumLike {
6922 type Output = Conductance<T>;
6923 fn div(self, rhs: Frequency<T>) -> Self::Output {
6924 Conductance{S: self.per_H.clone() / rhs.Hz}
6925 }
6926}
6927impl<T> core::ops::Div<&Frequency<T>> for InverseInductance<T> where T: NumLike {
6929 type Output = Conductance<T>;
6930 fn div(self, rhs: &Frequency<T>) -> Self::Output {
6931 Conductance{S: self.per_H / rhs.Hz.clone()}
6932 }
6933}
6934impl<T> core::ops::Div<&Frequency<T>> for &InverseInductance<T> where T: NumLike {
6936 type Output = Conductance<T>;
6937 fn div(self, rhs: &Frequency<T>) -> Self::Output {
6938 Conductance{S: self.per_H.clone() / rhs.Hz.clone()}
6939 }
6940}
6941
6942impl<T> core::ops::Div<InverseInductance<T>> for f64 where T: NumLike+From<f64> {
6945 type Output = Inductance<T>;
6946 fn div(self, rhs: InverseInductance<T>) -> Self::Output {
6947 Inductance{H: T::from(self) / rhs.per_H}
6948 }
6949}
6950impl<T> core::ops::Div<InverseInductance<T>> for &f64 where T: NumLike+From<f64> {
6952 type Output = Inductance<T>;
6953 fn div(self, rhs: InverseInductance<T>) -> Self::Output {
6954 Inductance{H: T::from(self.clone()) / rhs.per_H}
6955 }
6956}
6957impl<T> core::ops::Div<&InverseInductance<T>> for f64 where T: NumLike+From<f64> {
6959 type Output = Inductance<T>;
6960 fn div(self, rhs: &InverseInductance<T>) -> Self::Output {
6961 Inductance{H: T::from(self) / rhs.per_H.clone()}
6962 }
6963}
6964impl<T> core::ops::Div<&InverseInductance<T>> for &f64 where T: NumLike+From<f64> {
6966 type Output = Inductance<T>;
6967 fn div(self, rhs: &InverseInductance<T>) -> Self::Output {
6968 Inductance{H: T::from(self.clone()) / rhs.per_H.clone()}
6969 }
6970}
6971
6972impl<T> core::ops::Div<InverseInductance<T>> for f32 where T: NumLike+From<f32> {
6975 type Output = Inductance<T>;
6976 fn div(self, rhs: InverseInductance<T>) -> Self::Output {
6977 Inductance{H: T::from(self) / rhs.per_H}
6978 }
6979}
6980impl<T> core::ops::Div<InverseInductance<T>> for &f32 where T: NumLike+From<f32> {
6982 type Output = Inductance<T>;
6983 fn div(self, rhs: InverseInductance<T>) -> Self::Output {
6984 Inductance{H: T::from(self.clone()) / rhs.per_H}
6985 }
6986}
6987impl<T> core::ops::Div<&InverseInductance<T>> for f32 where T: NumLike+From<f32> {
6989 type Output = Inductance<T>;
6990 fn div(self, rhs: &InverseInductance<T>) -> Self::Output {
6991 Inductance{H: T::from(self) / rhs.per_H.clone()}
6992 }
6993}
6994impl<T> core::ops::Div<&InverseInductance<T>> for &f32 where T: NumLike+From<f32> {
6996 type Output = Inductance<T>;
6997 fn div(self, rhs: &InverseInductance<T>) -> Self::Output {
6998 Inductance{H: T::from(self.clone()) / rhs.per_H.clone()}
6999 }
7000}
7001
7002impl<T> core::ops::Div<InverseInductance<T>> for i64 where T: NumLike+From<i64> {
7005 type Output = Inductance<T>;
7006 fn div(self, rhs: InverseInductance<T>) -> Self::Output {
7007 Inductance{H: T::from(self) / rhs.per_H}
7008 }
7009}
7010impl<T> core::ops::Div<InverseInductance<T>> for &i64 where T: NumLike+From<i64> {
7012 type Output = Inductance<T>;
7013 fn div(self, rhs: InverseInductance<T>) -> Self::Output {
7014 Inductance{H: T::from(self.clone()) / rhs.per_H}
7015 }
7016}
7017impl<T> core::ops::Div<&InverseInductance<T>> for i64 where T: NumLike+From<i64> {
7019 type Output = Inductance<T>;
7020 fn div(self, rhs: &InverseInductance<T>) -> Self::Output {
7021 Inductance{H: T::from(self) / rhs.per_H.clone()}
7022 }
7023}
7024impl<T> core::ops::Div<&InverseInductance<T>> for &i64 where T: NumLike+From<i64> {
7026 type Output = Inductance<T>;
7027 fn div(self, rhs: &InverseInductance<T>) -> Self::Output {
7028 Inductance{H: T::from(self.clone()) / rhs.per_H.clone()}
7029 }
7030}
7031
7032impl<T> core::ops::Div<InverseInductance<T>> for i32 where T: NumLike+From<i32> {
7035 type Output = Inductance<T>;
7036 fn div(self, rhs: InverseInductance<T>) -> Self::Output {
7037 Inductance{H: T::from(self) / rhs.per_H}
7038 }
7039}
7040impl<T> core::ops::Div<InverseInductance<T>> for &i32 where T: NumLike+From<i32> {
7042 type Output = Inductance<T>;
7043 fn div(self, rhs: InverseInductance<T>) -> Self::Output {
7044 Inductance{H: T::from(self.clone()) / rhs.per_H}
7045 }
7046}
7047impl<T> core::ops::Div<&InverseInductance<T>> for i32 where T: NumLike+From<i32> {
7049 type Output = Inductance<T>;
7050 fn div(self, rhs: &InverseInductance<T>) -> Self::Output {
7051 Inductance{H: T::from(self) / rhs.per_H.clone()}
7052 }
7053}
7054impl<T> core::ops::Div<&InverseInductance<T>> for &i32 where T: NumLike+From<i32> {
7056 type Output = Inductance<T>;
7057 fn div(self, rhs: &InverseInductance<T>) -> Self::Output {
7058 Inductance{H: T::from(self.clone()) / rhs.per_H.clone()}
7059 }
7060}
7061
7062#[cfg(feature="num-bigfloat")]
7065impl<T> core::ops::Div<InverseInductance<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
7066 type Output = Inductance<T>;
7067 fn div(self, rhs: InverseInductance<T>) -> Self::Output {
7068 Inductance{H: T::from(self) / rhs.per_H}
7069 }
7070}
7071#[cfg(feature="num-bigfloat")]
7073impl<T> core::ops::Div<InverseInductance<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
7074 type Output = Inductance<T>;
7075 fn div(self, rhs: InverseInductance<T>) -> Self::Output {
7076 Inductance{H: T::from(self.clone()) / rhs.per_H}
7077 }
7078}
7079#[cfg(feature="num-bigfloat")]
7081impl<T> core::ops::Div<&InverseInductance<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
7082 type Output = Inductance<T>;
7083 fn div(self, rhs: &InverseInductance<T>) -> Self::Output {
7084 Inductance{H: T::from(self) / rhs.per_H.clone()}
7085 }
7086}
7087#[cfg(feature="num-bigfloat")]
7089impl<T> core::ops::Div<&InverseInductance<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
7090 type Output = Inductance<T>;
7091 fn div(self, rhs: &InverseInductance<T>) -> Self::Output {
7092 Inductance{H: T::from(self.clone()) / rhs.per_H.clone()}
7093 }
7094}
7095
7096#[cfg(feature="num-complex")]
7099impl<T> core::ops::Div<InverseInductance<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
7100 type Output = Inductance<T>;
7101 fn div(self, rhs: InverseInductance<T>) -> Self::Output {
7102 Inductance{H: T::from(self) / rhs.per_H}
7103 }
7104}
7105#[cfg(feature="num-complex")]
7107impl<T> core::ops::Div<InverseInductance<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
7108 type Output = Inductance<T>;
7109 fn div(self, rhs: InverseInductance<T>) -> Self::Output {
7110 Inductance{H: T::from(self.clone()) / rhs.per_H}
7111 }
7112}
7113#[cfg(feature="num-complex")]
7115impl<T> core::ops::Div<&InverseInductance<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
7116 type Output = Inductance<T>;
7117 fn div(self, rhs: &InverseInductance<T>) -> Self::Output {
7118 Inductance{H: T::from(self) / rhs.per_H.clone()}
7119 }
7120}
7121#[cfg(feature="num-complex")]
7123impl<T> core::ops::Div<&InverseInductance<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
7124 type Output = Inductance<T>;
7125 fn div(self, rhs: &InverseInductance<T>) -> Self::Output {
7126 Inductance{H: T::from(self.clone()) / rhs.per_H.clone()}
7127 }
7128}
7129
7130#[cfg(feature="num-complex")]
7133impl<T> core::ops::Div<InverseInductance<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
7134 type Output = Inductance<T>;
7135 fn div(self, rhs: InverseInductance<T>) -> Self::Output {
7136 Inductance{H: T::from(self) / rhs.per_H}
7137 }
7138}
7139#[cfg(feature="num-complex")]
7141impl<T> core::ops::Div<InverseInductance<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
7142 type Output = Inductance<T>;
7143 fn div(self, rhs: InverseInductance<T>) -> Self::Output {
7144 Inductance{H: T::from(self.clone()) / rhs.per_H}
7145 }
7146}
7147#[cfg(feature="num-complex")]
7149impl<T> core::ops::Div<&InverseInductance<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
7150 type Output = Inductance<T>;
7151 fn div(self, rhs: &InverseInductance<T>) -> Self::Output {
7152 Inductance{H: T::from(self) / rhs.per_H.clone()}
7153 }
7154}
7155#[cfg(feature="num-complex")]
7157impl<T> core::ops::Div<&InverseInductance<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
7158 type Output = Inductance<T>;
7159 fn div(self, rhs: &InverseInductance<T>) -> Self::Output {
7160 Inductance{H: T::from(self.clone()) / rhs.per_H.clone()}
7161 }
7162}
7163
7164#[derive(UnitStruct, Debug, Clone)]
7166#[cfg_attr(feature="serde", derive(Serialize, Deserialize))]
7167pub struct InverseLuminousFlux<T: NumLike>{
7168 pub per_lm: T
7170}
7171
7172impl<T> InverseLuminousFlux<T> where T: NumLike {
7173
7174 pub fn unit_name() -> &'static str { "inverse lumens" }
7176
7177 pub fn unit_symbol() -> &'static str { "1/lm" }
7179
7180 pub fn from_per_lm(per_lm: T) -> Self { InverseLuminousFlux{per_lm: per_lm} }
7185
7186 pub fn to_per_lm(&self) -> T { self.per_lm.clone() }
7188
7189 pub fn from_per_lumens(per_lumens: T) -> Self { InverseLuminousFlux{per_lm: per_lumens} }
7194
7195 pub fn to_per_lumens(&self) -> T { self.per_lm.clone() }
7197
7198}
7199
7200impl<T> fmt::Display for InverseLuminousFlux<T> where T: NumLike {
7201 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7202 write!(f, "{} {}", &self.per_lm, Self::unit_symbol())
7203 }
7204}
7205
7206impl<T> InverseLuminousFlux<T> where T: NumLike+From<f64> {
7207
7208 pub fn to_per_mlm(&self) -> T {
7212 return self.per_lm.clone() * T::from(0.001_f64);
7213 }
7214
7215 pub fn from_per_mlm(per_mlm: T) -> Self {
7222 InverseLuminousFlux{per_lm: per_mlm * T::from(1000.0_f64)}
7223 }
7224
7225 pub fn to_per_ulm(&self) -> T {
7229 return self.per_lm.clone() * T::from(1e-06_f64);
7230 }
7231
7232 pub fn from_per_ulm(per_ulm: T) -> Self {
7239 InverseLuminousFlux{per_lm: per_ulm * T::from(1000000.0_f64)}
7240 }
7241
7242 pub fn to_per_nlm(&self) -> T {
7246 return self.per_lm.clone() * T::from(1e-09_f64);
7247 }
7248
7249 pub fn from_per_nlm(per_nlm: T) -> Self {
7256 InverseLuminousFlux{per_lm: per_nlm * T::from(1000000000.0_f64)}
7257 }
7258
7259 pub fn to_per_klm(&self) -> T {
7263 return self.per_lm.clone() * T::from(1000.0_f64);
7264 }
7265
7266 pub fn from_per_klm(per_klm: T) -> Self {
7273 InverseLuminousFlux{per_lm: per_klm * T::from(0.001_f64)}
7274 }
7275
7276 pub fn to_per_Mlm(&self) -> T {
7280 return self.per_lm.clone() * T::from(1000000.0_f64);
7281 }
7282
7283 pub fn from_per_Mlm(per_Mlm: T) -> Self {
7290 InverseLuminousFlux{per_lm: per_Mlm * T::from(1e-06_f64)}
7291 }
7292
7293 pub fn to_per_Glm(&self) -> T {
7297 return self.per_lm.clone() * T::from(1000000000.0_f64);
7298 }
7299
7300 pub fn from_per_Glm(per_Glm: T) -> Self {
7307 InverseLuminousFlux{per_lm: per_Glm * T::from(1e-09_f64)}
7308 }
7309
7310}
7311
7312
7313#[cfg(feature="num-bigfloat")]
7315impl core::ops::Mul<InverseLuminousFlux<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
7316 type Output = InverseLuminousFlux<num_bigfloat::BigFloat>;
7317 fn mul(self, rhs: InverseLuminousFlux<num_bigfloat::BigFloat>) -> Self::Output {
7318 InverseLuminousFlux{per_lm: self * rhs.per_lm}
7319 }
7320}
7321#[cfg(feature="num-bigfloat")]
7323impl core::ops::Mul<InverseLuminousFlux<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
7324 type Output = InverseLuminousFlux<num_bigfloat::BigFloat>;
7325 fn mul(self, rhs: InverseLuminousFlux<num_bigfloat::BigFloat>) -> Self::Output {
7326 InverseLuminousFlux{per_lm: self.clone() * rhs.per_lm}
7327 }
7328}
7329#[cfg(feature="num-bigfloat")]
7331impl core::ops::Mul<&InverseLuminousFlux<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
7332 type Output = InverseLuminousFlux<num_bigfloat::BigFloat>;
7333 fn mul(self, rhs: &InverseLuminousFlux<num_bigfloat::BigFloat>) -> Self::Output {
7334 InverseLuminousFlux{per_lm: self * rhs.per_lm.clone()}
7335 }
7336}
7337#[cfg(feature="num-bigfloat")]
7339impl core::ops::Mul<&InverseLuminousFlux<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
7340 type Output = InverseLuminousFlux<num_bigfloat::BigFloat>;
7341 fn mul(self, rhs: &InverseLuminousFlux<num_bigfloat::BigFloat>) -> Self::Output {
7342 InverseLuminousFlux{per_lm: self.clone() * rhs.per_lm.clone()}
7343 }
7344}
7345
7346#[cfg(feature="num-complex")]
7348impl core::ops::Mul<InverseLuminousFlux<num_complex::Complex32>> for num_complex::Complex32 {
7349 type Output = InverseLuminousFlux<num_complex::Complex32>;
7350 fn mul(self, rhs: InverseLuminousFlux<num_complex::Complex32>) -> Self::Output {
7351 InverseLuminousFlux{per_lm: self * rhs.per_lm}
7352 }
7353}
7354#[cfg(feature="num-complex")]
7356impl core::ops::Mul<InverseLuminousFlux<num_complex::Complex32>> for &num_complex::Complex32 {
7357 type Output = InverseLuminousFlux<num_complex::Complex32>;
7358 fn mul(self, rhs: InverseLuminousFlux<num_complex::Complex32>) -> Self::Output {
7359 InverseLuminousFlux{per_lm: self.clone() * rhs.per_lm}
7360 }
7361}
7362#[cfg(feature="num-complex")]
7364impl core::ops::Mul<&InverseLuminousFlux<num_complex::Complex32>> for num_complex::Complex32 {
7365 type Output = InverseLuminousFlux<num_complex::Complex32>;
7366 fn mul(self, rhs: &InverseLuminousFlux<num_complex::Complex32>) -> Self::Output {
7367 InverseLuminousFlux{per_lm: self * rhs.per_lm.clone()}
7368 }
7369}
7370#[cfg(feature="num-complex")]
7372impl core::ops::Mul<&InverseLuminousFlux<num_complex::Complex32>> for &num_complex::Complex32 {
7373 type Output = InverseLuminousFlux<num_complex::Complex32>;
7374 fn mul(self, rhs: &InverseLuminousFlux<num_complex::Complex32>) -> Self::Output {
7375 InverseLuminousFlux{per_lm: self.clone() * rhs.per_lm.clone()}
7376 }
7377}
7378
7379#[cfg(feature="num-complex")]
7381impl core::ops::Mul<InverseLuminousFlux<num_complex::Complex64>> for num_complex::Complex64 {
7382 type Output = InverseLuminousFlux<num_complex::Complex64>;
7383 fn mul(self, rhs: InverseLuminousFlux<num_complex::Complex64>) -> Self::Output {
7384 InverseLuminousFlux{per_lm: self * rhs.per_lm}
7385 }
7386}
7387#[cfg(feature="num-complex")]
7389impl core::ops::Mul<InverseLuminousFlux<num_complex::Complex64>> for &num_complex::Complex64 {
7390 type Output = InverseLuminousFlux<num_complex::Complex64>;
7391 fn mul(self, rhs: InverseLuminousFlux<num_complex::Complex64>) -> Self::Output {
7392 InverseLuminousFlux{per_lm: self.clone() * rhs.per_lm}
7393 }
7394}
7395#[cfg(feature="num-complex")]
7397impl core::ops::Mul<&InverseLuminousFlux<num_complex::Complex64>> for num_complex::Complex64 {
7398 type Output = InverseLuminousFlux<num_complex::Complex64>;
7399 fn mul(self, rhs: &InverseLuminousFlux<num_complex::Complex64>) -> Self::Output {
7400 InverseLuminousFlux{per_lm: self * rhs.per_lm.clone()}
7401 }
7402}
7403#[cfg(feature="num-complex")]
7405impl core::ops::Mul<&InverseLuminousFlux<num_complex::Complex64>> for &num_complex::Complex64 {
7406 type Output = InverseLuminousFlux<num_complex::Complex64>;
7407 fn mul(self, rhs: &InverseLuminousFlux<num_complex::Complex64>) -> Self::Output {
7408 InverseLuminousFlux{per_lm: self.clone() * rhs.per_lm.clone()}
7409 }
7410}
7411
7412
7413
7414
7415impl<T> core::ops::Div<InverseLuminosity<T>> for InverseLuminousFlux<T> where T: NumLike {
7418 type Output = InverseSolidAngle<T>;
7419 fn div(self, rhs: InverseLuminosity<T>) -> Self::Output {
7420 InverseSolidAngle{per_sr: self.per_lm / rhs.per_cd}
7421 }
7422}
7423impl<T> core::ops::Div<InverseLuminosity<T>> for &InverseLuminousFlux<T> where T: NumLike {
7425 type Output = InverseSolidAngle<T>;
7426 fn div(self, rhs: InverseLuminosity<T>) -> Self::Output {
7427 InverseSolidAngle{per_sr: self.per_lm.clone() / rhs.per_cd}
7428 }
7429}
7430impl<T> core::ops::Div<&InverseLuminosity<T>> for InverseLuminousFlux<T> where T: NumLike {
7432 type Output = InverseSolidAngle<T>;
7433 fn div(self, rhs: &InverseLuminosity<T>) -> Self::Output {
7434 InverseSolidAngle{per_sr: self.per_lm / rhs.per_cd.clone()}
7435 }
7436}
7437impl<T> core::ops::Div<&InverseLuminosity<T>> for &InverseLuminousFlux<T> where T: NumLike {
7439 type Output = InverseSolidAngle<T>;
7440 fn div(self, rhs: &InverseLuminosity<T>) -> Self::Output {
7441 InverseSolidAngle{per_sr: self.per_lm.clone() / rhs.per_cd.clone()}
7442 }
7443}
7444
7445impl<T> core::ops::Mul<Luminosity<T>> for InverseLuminousFlux<T> where T: NumLike {
7448 type Output = InverseSolidAngle<T>;
7449 fn mul(self, rhs: Luminosity<T>) -> Self::Output {
7450 InverseSolidAngle{per_sr: self.per_lm * rhs.cd}
7451 }
7452}
7453impl<T> core::ops::Mul<Luminosity<T>> for &InverseLuminousFlux<T> where T: NumLike {
7455 type Output = InverseSolidAngle<T>;
7456 fn mul(self, rhs: Luminosity<T>) -> Self::Output {
7457 InverseSolidAngle{per_sr: self.per_lm.clone() * rhs.cd}
7458 }
7459}
7460impl<T> core::ops::Mul<&Luminosity<T>> for InverseLuminousFlux<T> where T: NumLike {
7462 type Output = InverseSolidAngle<T>;
7463 fn mul(self, rhs: &Luminosity<T>) -> Self::Output {
7464 InverseSolidAngle{per_sr: self.per_lm * rhs.cd.clone()}
7465 }
7466}
7467impl<T> core::ops::Mul<&Luminosity<T>> for &InverseLuminousFlux<T> where T: NumLike {
7469 type Output = InverseSolidAngle<T>;
7470 fn mul(self, rhs: &Luminosity<T>) -> Self::Output {
7471 InverseSolidAngle{per_sr: self.per_lm.clone() * rhs.cd.clone()}
7472 }
7473}
7474
7475impl<T> core::ops::Div<AreaPerLumen<T>> for InverseLuminousFlux<T> where T: NumLike {
7478 type Output = InverseArea<T>;
7479 fn div(self, rhs: AreaPerLumen<T>) -> Self::Output {
7480 InverseArea{per_m2: self.per_lm / rhs.m2_per_lm}
7481 }
7482}
7483impl<T> core::ops::Div<AreaPerLumen<T>> for &InverseLuminousFlux<T> where T: NumLike {
7485 type Output = InverseArea<T>;
7486 fn div(self, rhs: AreaPerLumen<T>) -> Self::Output {
7487 InverseArea{per_m2: self.per_lm.clone() / rhs.m2_per_lm}
7488 }
7489}
7490impl<T> core::ops::Div<&AreaPerLumen<T>> for InverseLuminousFlux<T> where T: NumLike {
7492 type Output = InverseArea<T>;
7493 fn div(self, rhs: &AreaPerLumen<T>) -> Self::Output {
7494 InverseArea{per_m2: self.per_lm / rhs.m2_per_lm.clone()}
7495 }
7496}
7497impl<T> core::ops::Div<&AreaPerLumen<T>> for &InverseLuminousFlux<T> where T: NumLike {
7499 type Output = InverseArea<T>;
7500 fn div(self, rhs: &AreaPerLumen<T>) -> Self::Output {
7501 InverseArea{per_m2: self.per_lm.clone() / rhs.m2_per_lm.clone()}
7502 }
7503}
7504
7505impl<T> core::ops::Mul<Illuminance<T>> for InverseLuminousFlux<T> where T: NumLike {
7508 type Output = InverseArea<T>;
7509 fn mul(self, rhs: Illuminance<T>) -> Self::Output {
7510 InverseArea{per_m2: self.per_lm * rhs.lux}
7511 }
7512}
7513impl<T> core::ops::Mul<Illuminance<T>> for &InverseLuminousFlux<T> where T: NumLike {
7515 type Output = InverseArea<T>;
7516 fn mul(self, rhs: Illuminance<T>) -> Self::Output {
7517 InverseArea{per_m2: self.per_lm.clone() * rhs.lux}
7518 }
7519}
7520impl<T> core::ops::Mul<&Illuminance<T>> for InverseLuminousFlux<T> where T: NumLike {
7522 type Output = InverseArea<T>;
7523 fn mul(self, rhs: &Illuminance<T>) -> Self::Output {
7524 InverseArea{per_m2: self.per_lm * rhs.lux.clone()}
7525 }
7526}
7527impl<T> core::ops::Mul<&Illuminance<T>> for &InverseLuminousFlux<T> where T: NumLike {
7529 type Output = InverseArea<T>;
7530 fn mul(self, rhs: &Illuminance<T>) -> Self::Output {
7531 InverseArea{per_m2: self.per_lm.clone() * rhs.lux.clone()}
7532 }
7533}
7534
7535impl<T> core::ops::Mul<Area<T>> for InverseLuminousFlux<T> where T: NumLike {
7538 type Output = AreaPerLumen<T>;
7539 fn mul(self, rhs: Area<T>) -> Self::Output {
7540 AreaPerLumen{m2_per_lm: self.per_lm * rhs.m2}
7541 }
7542}
7543impl<T> core::ops::Mul<Area<T>> for &InverseLuminousFlux<T> where T: NumLike {
7545 type Output = AreaPerLumen<T>;
7546 fn mul(self, rhs: Area<T>) -> Self::Output {
7547 AreaPerLumen{m2_per_lm: self.per_lm.clone() * rhs.m2}
7548 }
7549}
7550impl<T> core::ops::Mul<&Area<T>> for InverseLuminousFlux<T> where T: NumLike {
7552 type Output = AreaPerLumen<T>;
7553 fn mul(self, rhs: &Area<T>) -> Self::Output {
7554 AreaPerLumen{m2_per_lm: self.per_lm * rhs.m2.clone()}
7555 }
7556}
7557impl<T> core::ops::Mul<&Area<T>> for &InverseLuminousFlux<T> where T: NumLike {
7559 type Output = AreaPerLumen<T>;
7560 fn mul(self, rhs: &Area<T>) -> Self::Output {
7561 AreaPerLumen{m2_per_lm: self.per_lm.clone() * rhs.m2.clone()}
7562 }
7563}
7564
7565impl<T> core::ops::Div<InverseArea<T>> for InverseLuminousFlux<T> where T: NumLike {
7568 type Output = AreaPerLumen<T>;
7569 fn div(self, rhs: InverseArea<T>) -> Self::Output {
7570 AreaPerLumen{m2_per_lm: self.per_lm / rhs.per_m2}
7571 }
7572}
7573impl<T> core::ops::Div<InverseArea<T>> for &InverseLuminousFlux<T> where T: NumLike {
7575 type Output = AreaPerLumen<T>;
7576 fn div(self, rhs: InverseArea<T>) -> Self::Output {
7577 AreaPerLumen{m2_per_lm: self.per_lm.clone() / rhs.per_m2}
7578 }
7579}
7580impl<T> core::ops::Div<&InverseArea<T>> for InverseLuminousFlux<T> where T: NumLike {
7582 type Output = AreaPerLumen<T>;
7583 fn div(self, rhs: &InverseArea<T>) -> Self::Output {
7584 AreaPerLumen{m2_per_lm: self.per_lm / rhs.per_m2.clone()}
7585 }
7586}
7587impl<T> core::ops::Div<&InverseArea<T>> for &InverseLuminousFlux<T> where T: NumLike {
7589 type Output = AreaPerLumen<T>;
7590 fn div(self, rhs: &InverseArea<T>) -> Self::Output {
7591 AreaPerLumen{m2_per_lm: self.per_lm.clone() / rhs.per_m2.clone()}
7592 }
7593}
7594
7595impl<T> core::ops::Div<InverseSolidAngle<T>> for InverseLuminousFlux<T> where T: NumLike {
7598 type Output = InverseLuminosity<T>;
7599 fn div(self, rhs: InverseSolidAngle<T>) -> Self::Output {
7600 InverseLuminosity{per_cd: self.per_lm / rhs.per_sr}
7601 }
7602}
7603impl<T> core::ops::Div<InverseSolidAngle<T>> for &InverseLuminousFlux<T> where T: NumLike {
7605 type Output = InverseLuminosity<T>;
7606 fn div(self, rhs: InverseSolidAngle<T>) -> Self::Output {
7607 InverseLuminosity{per_cd: self.per_lm.clone() / rhs.per_sr}
7608 }
7609}
7610impl<T> core::ops::Div<&InverseSolidAngle<T>> for InverseLuminousFlux<T> where T: NumLike {
7612 type Output = InverseLuminosity<T>;
7613 fn div(self, rhs: &InverseSolidAngle<T>) -> Self::Output {
7614 InverseLuminosity{per_cd: self.per_lm / rhs.per_sr.clone()}
7615 }
7616}
7617impl<T> core::ops::Div<&InverseSolidAngle<T>> for &InverseLuminousFlux<T> where T: NumLike {
7619 type Output = InverseLuminosity<T>;
7620 fn div(self, rhs: &InverseSolidAngle<T>) -> Self::Output {
7621 InverseLuminosity{per_cd: self.per_lm.clone() / rhs.per_sr.clone()}
7622 }
7623}
7624
7625impl<T> core::ops::Mul<SolidAngle<T>> for InverseLuminousFlux<T> where T: NumLike {
7628 type Output = InverseLuminosity<T>;
7629 fn mul(self, rhs: SolidAngle<T>) -> Self::Output {
7630 InverseLuminosity{per_cd: self.per_lm * rhs.sr}
7631 }
7632}
7633impl<T> core::ops::Mul<SolidAngle<T>> for &InverseLuminousFlux<T> where T: NumLike {
7635 type Output = InverseLuminosity<T>;
7636 fn mul(self, rhs: SolidAngle<T>) -> Self::Output {
7637 InverseLuminosity{per_cd: self.per_lm.clone() * rhs.sr}
7638 }
7639}
7640impl<T> core::ops::Mul<&SolidAngle<T>> for InverseLuminousFlux<T> where T: NumLike {
7642 type Output = InverseLuminosity<T>;
7643 fn mul(self, rhs: &SolidAngle<T>) -> Self::Output {
7644 InverseLuminosity{per_cd: self.per_lm * rhs.sr.clone()}
7645 }
7646}
7647impl<T> core::ops::Mul<&SolidAngle<T>> for &InverseLuminousFlux<T> where T: NumLike {
7649 type Output = InverseLuminosity<T>;
7650 fn mul(self, rhs: &SolidAngle<T>) -> Self::Output {
7651 InverseLuminosity{per_cd: self.per_lm.clone() * rhs.sr.clone()}
7652 }
7653}
7654
7655impl<T> core::ops::Div<InverseLuminousFlux<T>> for f64 where T: NumLike+From<f64> {
7658 type Output = LuminousFlux<T>;
7659 fn div(self, rhs: InverseLuminousFlux<T>) -> Self::Output {
7660 LuminousFlux{lm: T::from(self) / rhs.per_lm}
7661 }
7662}
7663impl<T> core::ops::Div<InverseLuminousFlux<T>> for &f64 where T: NumLike+From<f64> {
7665 type Output = LuminousFlux<T>;
7666 fn div(self, rhs: InverseLuminousFlux<T>) -> Self::Output {
7667 LuminousFlux{lm: T::from(self.clone()) / rhs.per_lm}
7668 }
7669}
7670impl<T> core::ops::Div<&InverseLuminousFlux<T>> for f64 where T: NumLike+From<f64> {
7672 type Output = LuminousFlux<T>;
7673 fn div(self, rhs: &InverseLuminousFlux<T>) -> Self::Output {
7674 LuminousFlux{lm: T::from(self) / rhs.per_lm.clone()}
7675 }
7676}
7677impl<T> core::ops::Div<&InverseLuminousFlux<T>> for &f64 where T: NumLike+From<f64> {
7679 type Output = LuminousFlux<T>;
7680 fn div(self, rhs: &InverseLuminousFlux<T>) -> Self::Output {
7681 LuminousFlux{lm: T::from(self.clone()) / rhs.per_lm.clone()}
7682 }
7683}
7684
7685impl<T> core::ops::Div<InverseLuminousFlux<T>> for f32 where T: NumLike+From<f32> {
7688 type Output = LuminousFlux<T>;
7689 fn div(self, rhs: InverseLuminousFlux<T>) -> Self::Output {
7690 LuminousFlux{lm: T::from(self) / rhs.per_lm}
7691 }
7692}
7693impl<T> core::ops::Div<InverseLuminousFlux<T>> for &f32 where T: NumLike+From<f32> {
7695 type Output = LuminousFlux<T>;
7696 fn div(self, rhs: InverseLuminousFlux<T>) -> Self::Output {
7697 LuminousFlux{lm: T::from(self.clone()) / rhs.per_lm}
7698 }
7699}
7700impl<T> core::ops::Div<&InverseLuminousFlux<T>> for f32 where T: NumLike+From<f32> {
7702 type Output = LuminousFlux<T>;
7703 fn div(self, rhs: &InverseLuminousFlux<T>) -> Self::Output {
7704 LuminousFlux{lm: T::from(self) / rhs.per_lm.clone()}
7705 }
7706}
7707impl<T> core::ops::Div<&InverseLuminousFlux<T>> for &f32 where T: NumLike+From<f32> {
7709 type Output = LuminousFlux<T>;
7710 fn div(self, rhs: &InverseLuminousFlux<T>) -> Self::Output {
7711 LuminousFlux{lm: T::from(self.clone()) / rhs.per_lm.clone()}
7712 }
7713}
7714
7715impl<T> core::ops::Div<InverseLuminousFlux<T>> for i64 where T: NumLike+From<i64> {
7718 type Output = LuminousFlux<T>;
7719 fn div(self, rhs: InverseLuminousFlux<T>) -> Self::Output {
7720 LuminousFlux{lm: T::from(self) / rhs.per_lm}
7721 }
7722}
7723impl<T> core::ops::Div<InverseLuminousFlux<T>> for &i64 where T: NumLike+From<i64> {
7725 type Output = LuminousFlux<T>;
7726 fn div(self, rhs: InverseLuminousFlux<T>) -> Self::Output {
7727 LuminousFlux{lm: T::from(self.clone()) / rhs.per_lm}
7728 }
7729}
7730impl<T> core::ops::Div<&InverseLuminousFlux<T>> for i64 where T: NumLike+From<i64> {
7732 type Output = LuminousFlux<T>;
7733 fn div(self, rhs: &InverseLuminousFlux<T>) -> Self::Output {
7734 LuminousFlux{lm: T::from(self) / rhs.per_lm.clone()}
7735 }
7736}
7737impl<T> core::ops::Div<&InverseLuminousFlux<T>> for &i64 where T: NumLike+From<i64> {
7739 type Output = LuminousFlux<T>;
7740 fn div(self, rhs: &InverseLuminousFlux<T>) -> Self::Output {
7741 LuminousFlux{lm: T::from(self.clone()) / rhs.per_lm.clone()}
7742 }
7743}
7744
7745impl<T> core::ops::Div<InverseLuminousFlux<T>> for i32 where T: NumLike+From<i32> {
7748 type Output = LuminousFlux<T>;
7749 fn div(self, rhs: InverseLuminousFlux<T>) -> Self::Output {
7750 LuminousFlux{lm: T::from(self) / rhs.per_lm}
7751 }
7752}
7753impl<T> core::ops::Div<InverseLuminousFlux<T>> for &i32 where T: NumLike+From<i32> {
7755 type Output = LuminousFlux<T>;
7756 fn div(self, rhs: InverseLuminousFlux<T>) -> Self::Output {
7757 LuminousFlux{lm: T::from(self.clone()) / rhs.per_lm}
7758 }
7759}
7760impl<T> core::ops::Div<&InverseLuminousFlux<T>> for i32 where T: NumLike+From<i32> {
7762 type Output = LuminousFlux<T>;
7763 fn div(self, rhs: &InverseLuminousFlux<T>) -> Self::Output {
7764 LuminousFlux{lm: T::from(self) / rhs.per_lm.clone()}
7765 }
7766}
7767impl<T> core::ops::Div<&InverseLuminousFlux<T>> for &i32 where T: NumLike+From<i32> {
7769 type Output = LuminousFlux<T>;
7770 fn div(self, rhs: &InverseLuminousFlux<T>) -> Self::Output {
7771 LuminousFlux{lm: T::from(self.clone()) / rhs.per_lm.clone()}
7772 }
7773}
7774
7775#[cfg(feature="num-bigfloat")]
7778impl<T> core::ops::Div<InverseLuminousFlux<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
7779 type Output = LuminousFlux<T>;
7780 fn div(self, rhs: InverseLuminousFlux<T>) -> Self::Output {
7781 LuminousFlux{lm: T::from(self) / rhs.per_lm}
7782 }
7783}
7784#[cfg(feature="num-bigfloat")]
7786impl<T> core::ops::Div<InverseLuminousFlux<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
7787 type Output = LuminousFlux<T>;
7788 fn div(self, rhs: InverseLuminousFlux<T>) -> Self::Output {
7789 LuminousFlux{lm: T::from(self.clone()) / rhs.per_lm}
7790 }
7791}
7792#[cfg(feature="num-bigfloat")]
7794impl<T> core::ops::Div<&InverseLuminousFlux<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
7795 type Output = LuminousFlux<T>;
7796 fn div(self, rhs: &InverseLuminousFlux<T>) -> Self::Output {
7797 LuminousFlux{lm: T::from(self) / rhs.per_lm.clone()}
7798 }
7799}
7800#[cfg(feature="num-bigfloat")]
7802impl<T> core::ops::Div<&InverseLuminousFlux<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
7803 type Output = LuminousFlux<T>;
7804 fn div(self, rhs: &InverseLuminousFlux<T>) -> Self::Output {
7805 LuminousFlux{lm: T::from(self.clone()) / rhs.per_lm.clone()}
7806 }
7807}
7808
7809#[cfg(feature="num-complex")]
7812impl<T> core::ops::Div<InverseLuminousFlux<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
7813 type Output = LuminousFlux<T>;
7814 fn div(self, rhs: InverseLuminousFlux<T>) -> Self::Output {
7815 LuminousFlux{lm: T::from(self) / rhs.per_lm}
7816 }
7817}
7818#[cfg(feature="num-complex")]
7820impl<T> core::ops::Div<InverseLuminousFlux<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
7821 type Output = LuminousFlux<T>;
7822 fn div(self, rhs: InverseLuminousFlux<T>) -> Self::Output {
7823 LuminousFlux{lm: T::from(self.clone()) / rhs.per_lm}
7824 }
7825}
7826#[cfg(feature="num-complex")]
7828impl<T> core::ops::Div<&InverseLuminousFlux<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
7829 type Output = LuminousFlux<T>;
7830 fn div(self, rhs: &InverseLuminousFlux<T>) -> Self::Output {
7831 LuminousFlux{lm: T::from(self) / rhs.per_lm.clone()}
7832 }
7833}
7834#[cfg(feature="num-complex")]
7836impl<T> core::ops::Div<&InverseLuminousFlux<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
7837 type Output = LuminousFlux<T>;
7838 fn div(self, rhs: &InverseLuminousFlux<T>) -> Self::Output {
7839 LuminousFlux{lm: T::from(self.clone()) / rhs.per_lm.clone()}
7840 }
7841}
7842
7843#[cfg(feature="num-complex")]
7846impl<T> core::ops::Div<InverseLuminousFlux<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
7847 type Output = LuminousFlux<T>;
7848 fn div(self, rhs: InverseLuminousFlux<T>) -> Self::Output {
7849 LuminousFlux{lm: T::from(self) / rhs.per_lm}
7850 }
7851}
7852#[cfg(feature="num-complex")]
7854impl<T> core::ops::Div<InverseLuminousFlux<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
7855 type Output = LuminousFlux<T>;
7856 fn div(self, rhs: InverseLuminousFlux<T>) -> Self::Output {
7857 LuminousFlux{lm: T::from(self.clone()) / rhs.per_lm}
7858 }
7859}
7860#[cfg(feature="num-complex")]
7862impl<T> core::ops::Div<&InverseLuminousFlux<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
7863 type Output = LuminousFlux<T>;
7864 fn div(self, rhs: &InverseLuminousFlux<T>) -> Self::Output {
7865 LuminousFlux{lm: T::from(self) / rhs.per_lm.clone()}
7866 }
7867}
7868#[cfg(feature="num-complex")]
7870impl<T> core::ops::Div<&InverseLuminousFlux<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
7871 type Output = LuminousFlux<T>;
7872 fn div(self, rhs: &InverseLuminousFlux<T>) -> Self::Output {
7873 LuminousFlux{lm: T::from(self.clone()) / rhs.per_lm.clone()}
7874 }
7875}
7876
7877#[derive(UnitStruct, Debug, Clone)]
7879#[cfg_attr(feature="serde", derive(Serialize, Deserialize))]
7880pub struct InverseMagneticFlux<T: NumLike>{
7881 pub per_Wb: T
7883}
7884
7885impl<T> InverseMagneticFlux<T> where T: NumLike {
7886
7887 pub fn unit_name() -> &'static str { "inverse webers" }
7889
7890 pub fn unit_symbol() -> &'static str { "1/Wb" }
7892
7893 pub fn from_per_Wb(per_Wb: T) -> Self { InverseMagneticFlux{per_Wb: per_Wb} }
7898
7899 pub fn to_per_Wb(&self) -> T { self.per_Wb.clone() }
7901
7902 pub fn from_per_weber(per_weber: T) -> Self { InverseMagneticFlux{per_Wb: per_weber} }
7907
7908 pub fn to_per_weber(&self) -> T { self.per_Wb.clone() }
7910
7911}
7912
7913impl<T> fmt::Display for InverseMagneticFlux<T> where T: NumLike {
7914 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7915 write!(f, "{} {}", &self.per_Wb, Self::unit_symbol())
7916 }
7917}
7918
7919impl<T> InverseMagneticFlux<T> where T: NumLike+From<f64> {
7920
7921 pub fn to_per_mWb(&self) -> T {
7925 return self.per_Wb.clone() * T::from(0.001_f64);
7926 }
7927
7928 pub fn from_per_mWb(per_mWb: T) -> Self {
7935 InverseMagneticFlux{per_Wb: per_mWb * T::from(1000.0_f64)}
7936 }
7937
7938 pub fn to_per_uWb(&self) -> T {
7942 return self.per_Wb.clone() * T::from(1e-06_f64);
7943 }
7944
7945 pub fn from_per_uWb(per_uWb: T) -> Self {
7952 InverseMagneticFlux{per_Wb: per_uWb * T::from(1000000.0_f64)}
7953 }
7954
7955 pub fn to_per_nWb(&self) -> T {
7959 return self.per_Wb.clone() * T::from(1e-09_f64);
7960 }
7961
7962 pub fn from_per_nWb(per_nWb: T) -> Self {
7969 InverseMagneticFlux{per_Wb: per_nWb * T::from(1000000000.0_f64)}
7970 }
7971
7972 pub fn to_per_kWb(&self) -> T {
7976 return self.per_Wb.clone() * T::from(1000.0_f64);
7977 }
7978
7979 pub fn from_per_kWb(per_kWb: T) -> Self {
7986 InverseMagneticFlux{per_Wb: per_kWb * T::from(0.001_f64)}
7987 }
7988
7989 pub fn to_per_MWb(&self) -> T {
7993 return self.per_Wb.clone() * T::from(1000000.0_f64);
7994 }
7995
7996 pub fn from_per_MWb(per_MWb: T) -> Self {
8003 InverseMagneticFlux{per_Wb: per_MWb * T::from(1e-06_f64)}
8004 }
8005
8006 pub fn to_per_GWb(&self) -> T {
8010 return self.per_Wb.clone() * T::from(1000000000.0_f64);
8011 }
8012
8013 pub fn from_per_GWb(per_GWb: T) -> Self {
8020 InverseMagneticFlux{per_Wb: per_GWb * T::from(1e-09_f64)}
8021 }
8022
8023}
8024
8025
8026#[cfg(feature="num-bigfloat")]
8028impl core::ops::Mul<InverseMagneticFlux<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
8029 type Output = InverseMagneticFlux<num_bigfloat::BigFloat>;
8030 fn mul(self, rhs: InverseMagneticFlux<num_bigfloat::BigFloat>) -> Self::Output {
8031 InverseMagneticFlux{per_Wb: self * rhs.per_Wb}
8032 }
8033}
8034#[cfg(feature="num-bigfloat")]
8036impl core::ops::Mul<InverseMagneticFlux<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
8037 type Output = InverseMagneticFlux<num_bigfloat::BigFloat>;
8038 fn mul(self, rhs: InverseMagneticFlux<num_bigfloat::BigFloat>) -> Self::Output {
8039 InverseMagneticFlux{per_Wb: self.clone() * rhs.per_Wb}
8040 }
8041}
8042#[cfg(feature="num-bigfloat")]
8044impl core::ops::Mul<&InverseMagneticFlux<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
8045 type Output = InverseMagneticFlux<num_bigfloat::BigFloat>;
8046 fn mul(self, rhs: &InverseMagneticFlux<num_bigfloat::BigFloat>) -> Self::Output {
8047 InverseMagneticFlux{per_Wb: self * rhs.per_Wb.clone()}
8048 }
8049}
8050#[cfg(feature="num-bigfloat")]
8052impl core::ops::Mul<&InverseMagneticFlux<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
8053 type Output = InverseMagneticFlux<num_bigfloat::BigFloat>;
8054 fn mul(self, rhs: &InverseMagneticFlux<num_bigfloat::BigFloat>) -> Self::Output {
8055 InverseMagneticFlux{per_Wb: self.clone() * rhs.per_Wb.clone()}
8056 }
8057}
8058
8059#[cfg(feature="num-complex")]
8061impl core::ops::Mul<InverseMagneticFlux<num_complex::Complex32>> for num_complex::Complex32 {
8062 type Output = InverseMagneticFlux<num_complex::Complex32>;
8063 fn mul(self, rhs: InverseMagneticFlux<num_complex::Complex32>) -> Self::Output {
8064 InverseMagneticFlux{per_Wb: self * rhs.per_Wb}
8065 }
8066}
8067#[cfg(feature="num-complex")]
8069impl core::ops::Mul<InverseMagneticFlux<num_complex::Complex32>> for &num_complex::Complex32 {
8070 type Output = InverseMagneticFlux<num_complex::Complex32>;
8071 fn mul(self, rhs: InverseMagneticFlux<num_complex::Complex32>) -> Self::Output {
8072 InverseMagneticFlux{per_Wb: self.clone() * rhs.per_Wb}
8073 }
8074}
8075#[cfg(feature="num-complex")]
8077impl core::ops::Mul<&InverseMagneticFlux<num_complex::Complex32>> for num_complex::Complex32 {
8078 type Output = InverseMagneticFlux<num_complex::Complex32>;
8079 fn mul(self, rhs: &InverseMagneticFlux<num_complex::Complex32>) -> Self::Output {
8080 InverseMagneticFlux{per_Wb: self * rhs.per_Wb.clone()}
8081 }
8082}
8083#[cfg(feature="num-complex")]
8085impl core::ops::Mul<&InverseMagneticFlux<num_complex::Complex32>> for &num_complex::Complex32 {
8086 type Output = InverseMagneticFlux<num_complex::Complex32>;
8087 fn mul(self, rhs: &InverseMagneticFlux<num_complex::Complex32>) -> Self::Output {
8088 InverseMagneticFlux{per_Wb: self.clone() * rhs.per_Wb.clone()}
8089 }
8090}
8091
8092#[cfg(feature="num-complex")]
8094impl core::ops::Mul<InverseMagneticFlux<num_complex::Complex64>> for num_complex::Complex64 {
8095 type Output = InverseMagneticFlux<num_complex::Complex64>;
8096 fn mul(self, rhs: InverseMagneticFlux<num_complex::Complex64>) -> Self::Output {
8097 InverseMagneticFlux{per_Wb: self * rhs.per_Wb}
8098 }
8099}
8100#[cfg(feature="num-complex")]
8102impl core::ops::Mul<InverseMagneticFlux<num_complex::Complex64>> for &num_complex::Complex64 {
8103 type Output = InverseMagneticFlux<num_complex::Complex64>;
8104 fn mul(self, rhs: InverseMagneticFlux<num_complex::Complex64>) -> Self::Output {
8105 InverseMagneticFlux{per_Wb: self.clone() * rhs.per_Wb}
8106 }
8107}
8108#[cfg(feature="num-complex")]
8110impl core::ops::Mul<&InverseMagneticFlux<num_complex::Complex64>> for num_complex::Complex64 {
8111 type Output = InverseMagneticFlux<num_complex::Complex64>;
8112 fn mul(self, rhs: &InverseMagneticFlux<num_complex::Complex64>) -> Self::Output {
8113 InverseMagneticFlux{per_Wb: self * rhs.per_Wb.clone()}
8114 }
8115}
8116#[cfg(feature="num-complex")]
8118impl core::ops::Mul<&InverseMagneticFlux<num_complex::Complex64>> for &num_complex::Complex64 {
8119 type Output = InverseMagneticFlux<num_complex::Complex64>;
8120 fn mul(self, rhs: &InverseMagneticFlux<num_complex::Complex64>) -> Self::Output {
8121 InverseMagneticFlux{per_Wb: self.clone() * rhs.per_Wb.clone()}
8122 }
8123}
8124
8125
8126
8127
8128impl<T> core::ops::Mul<Current<T>> for InverseMagneticFlux<T> where T: NumLike {
8131 type Output = InverseInductance<T>;
8132 fn mul(self, rhs: Current<T>) -> Self::Output {
8133 InverseInductance{per_H: self.per_Wb * rhs.A}
8134 }
8135}
8136impl<T> core::ops::Mul<Current<T>> for &InverseMagneticFlux<T> where T: NumLike {
8138 type Output = InverseInductance<T>;
8139 fn mul(self, rhs: Current<T>) -> Self::Output {
8140 InverseInductance{per_H: self.per_Wb.clone() * rhs.A}
8141 }
8142}
8143impl<T> core::ops::Mul<&Current<T>> for InverseMagneticFlux<T> where T: NumLike {
8145 type Output = InverseInductance<T>;
8146 fn mul(self, rhs: &Current<T>) -> Self::Output {
8147 InverseInductance{per_H: self.per_Wb * rhs.A.clone()}
8148 }
8149}
8150impl<T> core::ops::Mul<&Current<T>> for &InverseMagneticFlux<T> where T: NumLike {
8152 type Output = InverseInductance<T>;
8153 fn mul(self, rhs: &Current<T>) -> Self::Output {
8154 InverseInductance{per_H: self.per_Wb.clone() * rhs.A.clone()}
8155 }
8156}
8157
8158impl<T> core::ops::Div<Current<T>> for InverseMagneticFlux<T> where T: NumLike {
8161 type Output = InverseEnergy<T>;
8162 fn div(self, rhs: Current<T>) -> Self::Output {
8163 InverseEnergy{per_J: self.per_Wb / rhs.A}
8164 }
8165}
8166impl<T> core::ops::Div<Current<T>> for &InverseMagneticFlux<T> where T: NumLike {
8168 type Output = InverseEnergy<T>;
8169 fn div(self, rhs: Current<T>) -> Self::Output {
8170 InverseEnergy{per_J: self.per_Wb.clone() / rhs.A}
8171 }
8172}
8173impl<T> core::ops::Div<&Current<T>> for InverseMagneticFlux<T> where T: NumLike {
8175 type Output = InverseEnergy<T>;
8176 fn div(self, rhs: &Current<T>) -> Self::Output {
8177 InverseEnergy{per_J: self.per_Wb / rhs.A.clone()}
8178 }
8179}
8180impl<T> core::ops::Div<&Current<T>> for &InverseMagneticFlux<T> where T: NumLike {
8182 type Output = InverseEnergy<T>;
8183 fn div(self, rhs: &Current<T>) -> Self::Output {
8184 InverseEnergy{per_J: self.per_Wb.clone() / rhs.A.clone()}
8185 }
8186}
8187
8188impl<T> core::ops::Mul<InverseCurrent<T>> for InverseMagneticFlux<T> where T: NumLike {
8191 type Output = InverseEnergy<T>;
8192 fn mul(self, rhs: InverseCurrent<T>) -> Self::Output {
8193 InverseEnergy{per_J: self.per_Wb * rhs.per_A}
8194 }
8195}
8196impl<T> core::ops::Mul<InverseCurrent<T>> for &InverseMagneticFlux<T> where T: NumLike {
8198 type Output = InverseEnergy<T>;
8199 fn mul(self, rhs: InverseCurrent<T>) -> Self::Output {
8200 InverseEnergy{per_J: self.per_Wb.clone() * rhs.per_A}
8201 }
8202}
8203impl<T> core::ops::Mul<&InverseCurrent<T>> for InverseMagneticFlux<T> where T: NumLike {
8205 type Output = InverseEnergy<T>;
8206 fn mul(self, rhs: &InverseCurrent<T>) -> Self::Output {
8207 InverseEnergy{per_J: self.per_Wb * rhs.per_A.clone()}
8208 }
8209}
8210impl<T> core::ops::Mul<&InverseCurrent<T>> for &InverseMagneticFlux<T> where T: NumLike {
8212 type Output = InverseEnergy<T>;
8213 fn mul(self, rhs: &InverseCurrent<T>) -> Self::Output {
8214 InverseEnergy{per_J: self.per_Wb.clone() * rhs.per_A.clone()}
8215 }
8216}
8217
8218impl<T> core::ops::Div<InverseCurrent<T>> for InverseMagneticFlux<T> where T: NumLike {
8221 type Output = InverseInductance<T>;
8222 fn div(self, rhs: InverseCurrent<T>) -> Self::Output {
8223 InverseInductance{per_H: self.per_Wb / rhs.per_A}
8224 }
8225}
8226impl<T> core::ops::Div<InverseCurrent<T>> for &InverseMagneticFlux<T> where T: NumLike {
8228 type Output = InverseInductance<T>;
8229 fn div(self, rhs: InverseCurrent<T>) -> Self::Output {
8230 InverseInductance{per_H: self.per_Wb.clone() / rhs.per_A}
8231 }
8232}
8233impl<T> core::ops::Div<&InverseCurrent<T>> for InverseMagneticFlux<T> where T: NumLike {
8235 type Output = InverseInductance<T>;
8236 fn div(self, rhs: &InverseCurrent<T>) -> Self::Output {
8237 InverseInductance{per_H: self.per_Wb / rhs.per_A.clone()}
8238 }
8239}
8240impl<T> core::ops::Div<&InverseCurrent<T>> for &InverseMagneticFlux<T> where T: NumLike {
8242 type Output = InverseInductance<T>;
8243 fn div(self, rhs: &InverseCurrent<T>) -> Self::Output {
8244 InverseInductance{per_H: self.per_Wb.clone() / rhs.per_A.clone()}
8245 }
8246}
8247
8248impl<T> core::ops::Mul<Time<T>> for InverseMagneticFlux<T> where T: NumLike {
8251 type Output = InverseVoltage<T>;
8252 fn mul(self, rhs: Time<T>) -> Self::Output {
8253 InverseVoltage{per_V: self.per_Wb * rhs.s}
8254 }
8255}
8256impl<T> core::ops::Mul<Time<T>> for &InverseMagneticFlux<T> where T: NumLike {
8258 type Output = InverseVoltage<T>;
8259 fn mul(self, rhs: Time<T>) -> Self::Output {
8260 InverseVoltage{per_V: self.per_Wb.clone() * rhs.s}
8261 }
8262}
8263impl<T> core::ops::Mul<&Time<T>> for InverseMagneticFlux<T> where T: NumLike {
8265 type Output = InverseVoltage<T>;
8266 fn mul(self, rhs: &Time<T>) -> Self::Output {
8267 InverseVoltage{per_V: self.per_Wb * rhs.s.clone()}
8268 }
8269}
8270impl<T> core::ops::Mul<&Time<T>> for &InverseMagneticFlux<T> where T: NumLike {
8272 type Output = InverseVoltage<T>;
8273 fn mul(self, rhs: &Time<T>) -> Self::Output {
8274 InverseVoltage{per_V: self.per_Wb.clone() * rhs.s.clone()}
8275 }
8276}
8277
8278impl<T> core::ops::Mul<Charge<T>> for InverseMagneticFlux<T> where T: NumLike {
8281 type Output = Conductance<T>;
8282 fn mul(self, rhs: Charge<T>) -> Self::Output {
8283 Conductance{S: self.per_Wb * rhs.C}
8284 }
8285}
8286impl<T> core::ops::Mul<Charge<T>> for &InverseMagneticFlux<T> where T: NumLike {
8288 type Output = Conductance<T>;
8289 fn mul(self, rhs: Charge<T>) -> Self::Output {
8290 Conductance{S: self.per_Wb.clone() * rhs.C}
8291 }
8292}
8293impl<T> core::ops::Mul<&Charge<T>> for InverseMagneticFlux<T> where T: NumLike {
8295 type Output = Conductance<T>;
8296 fn mul(self, rhs: &Charge<T>) -> Self::Output {
8297 Conductance{S: self.per_Wb * rhs.C.clone()}
8298 }
8299}
8300impl<T> core::ops::Mul<&Charge<T>> for &InverseMagneticFlux<T> where T: NumLike {
8302 type Output = Conductance<T>;
8303 fn mul(self, rhs: &Charge<T>) -> Self::Output {
8304 Conductance{S: self.per_Wb.clone() * rhs.C.clone()}
8305 }
8306}
8307
8308impl<T> core::ops::Div<Conductance<T>> for InverseMagneticFlux<T> where T: NumLike {
8311 type Output = InverseCharge<T>;
8312 fn div(self, rhs: Conductance<T>) -> Self::Output {
8313 InverseCharge{per_C: self.per_Wb / rhs.S}
8314 }
8315}
8316impl<T> core::ops::Div<Conductance<T>> for &InverseMagneticFlux<T> where T: NumLike {
8318 type Output = InverseCharge<T>;
8319 fn div(self, rhs: Conductance<T>) -> Self::Output {
8320 InverseCharge{per_C: self.per_Wb.clone() / rhs.S}
8321 }
8322}
8323impl<T> core::ops::Div<&Conductance<T>> for InverseMagneticFlux<T> where T: NumLike {
8325 type Output = InverseCharge<T>;
8326 fn div(self, rhs: &Conductance<T>) -> Self::Output {
8327 InverseCharge{per_C: self.per_Wb / rhs.S.clone()}
8328 }
8329}
8330impl<T> core::ops::Div<&Conductance<T>> for &InverseMagneticFlux<T> where T: NumLike {
8332 type Output = InverseCharge<T>;
8333 fn div(self, rhs: &Conductance<T>) -> Self::Output {
8334 InverseCharge{per_C: self.per_Wb.clone() / rhs.S.clone()}
8335 }
8336}
8337
8338impl<T> core::ops::Mul<Inductance<T>> for InverseMagneticFlux<T> where T: NumLike {
8341 type Output = InverseCurrent<T>;
8342 fn mul(self, rhs: Inductance<T>) -> Self::Output {
8343 InverseCurrent{per_A: self.per_Wb * rhs.H}
8344 }
8345}
8346impl<T> core::ops::Mul<Inductance<T>> for &InverseMagneticFlux<T> where T: NumLike {
8348 type Output = InverseCurrent<T>;
8349 fn mul(self, rhs: Inductance<T>) -> Self::Output {
8350 InverseCurrent{per_A: self.per_Wb.clone() * rhs.H}
8351 }
8352}
8353impl<T> core::ops::Mul<&Inductance<T>> for InverseMagneticFlux<T> where T: NumLike {
8355 type Output = InverseCurrent<T>;
8356 fn mul(self, rhs: &Inductance<T>) -> Self::Output {
8357 InverseCurrent{per_A: self.per_Wb * rhs.H.clone()}
8358 }
8359}
8360impl<T> core::ops::Mul<&Inductance<T>> for &InverseMagneticFlux<T> where T: NumLike {
8362 type Output = InverseCurrent<T>;
8363 fn mul(self, rhs: &Inductance<T>) -> Self::Output {
8364 InverseCurrent{per_A: self.per_Wb.clone() * rhs.H.clone()}
8365 }
8366}
8367
8368impl<T> core::ops::Div<InverseCharge<T>> for InverseMagneticFlux<T> where T: NumLike {
8371 type Output = Conductance<T>;
8372 fn div(self, rhs: InverseCharge<T>) -> Self::Output {
8373 Conductance{S: self.per_Wb / rhs.per_C}
8374 }
8375}
8376impl<T> core::ops::Div<InverseCharge<T>> for &InverseMagneticFlux<T> where T: NumLike {
8378 type Output = Conductance<T>;
8379 fn div(self, rhs: InverseCharge<T>) -> Self::Output {
8380 Conductance{S: self.per_Wb.clone() / rhs.per_C}
8381 }
8382}
8383impl<T> core::ops::Div<&InverseCharge<T>> for InverseMagneticFlux<T> where T: NumLike {
8385 type Output = Conductance<T>;
8386 fn div(self, rhs: &InverseCharge<T>) -> Self::Output {
8387 Conductance{S: self.per_Wb / rhs.per_C.clone()}
8388 }
8389}
8390impl<T> core::ops::Div<&InverseCharge<T>> for &InverseMagneticFlux<T> where T: NumLike {
8392 type Output = Conductance<T>;
8393 fn div(self, rhs: &InverseCharge<T>) -> Self::Output {
8394 Conductance{S: self.per_Wb.clone() / rhs.per_C.clone()}
8395 }
8396}
8397
8398impl<T> core::ops::Div<InverseInductance<T>> for InverseMagneticFlux<T> where T: NumLike {
8401 type Output = InverseCurrent<T>;
8402 fn div(self, rhs: InverseInductance<T>) -> Self::Output {
8403 InverseCurrent{per_A: self.per_Wb / rhs.per_H}
8404 }
8405}
8406impl<T> core::ops::Div<InverseInductance<T>> for &InverseMagneticFlux<T> where T: NumLike {
8408 type Output = InverseCurrent<T>;
8409 fn div(self, rhs: InverseInductance<T>) -> Self::Output {
8410 InverseCurrent{per_A: self.per_Wb.clone() / rhs.per_H}
8411 }
8412}
8413impl<T> core::ops::Div<&InverseInductance<T>> for InverseMagneticFlux<T> where T: NumLike {
8415 type Output = InverseCurrent<T>;
8416 fn div(self, rhs: &InverseInductance<T>) -> Self::Output {
8417 InverseCurrent{per_A: self.per_Wb / rhs.per_H.clone()}
8418 }
8419}
8420impl<T> core::ops::Div<&InverseInductance<T>> for &InverseMagneticFlux<T> where T: NumLike {
8422 type Output = InverseCurrent<T>;
8423 fn div(self, rhs: &InverseInductance<T>) -> Self::Output {
8424 InverseCurrent{per_A: self.per_Wb.clone() / rhs.per_H.clone()}
8425 }
8426}
8427
8428impl<T> core::ops::Div<InverseMagneticFluxDensity<T>> for InverseMagneticFlux<T> where T: NumLike {
8431 type Output = InverseArea<T>;
8432 fn div(self, rhs: InverseMagneticFluxDensity<T>) -> Self::Output {
8433 InverseArea{per_m2: self.per_Wb / rhs.m2_per_Wb}
8434 }
8435}
8436impl<T> core::ops::Div<InverseMagneticFluxDensity<T>> for &InverseMagneticFlux<T> where T: NumLike {
8438 type Output = InverseArea<T>;
8439 fn div(self, rhs: InverseMagneticFluxDensity<T>) -> Self::Output {
8440 InverseArea{per_m2: self.per_Wb.clone() / rhs.m2_per_Wb}
8441 }
8442}
8443impl<T> core::ops::Div<&InverseMagneticFluxDensity<T>> for InverseMagneticFlux<T> where T: NumLike {
8445 type Output = InverseArea<T>;
8446 fn div(self, rhs: &InverseMagneticFluxDensity<T>) -> Self::Output {
8447 InverseArea{per_m2: self.per_Wb / rhs.m2_per_Wb.clone()}
8448 }
8449}
8450impl<T> core::ops::Div<&InverseMagneticFluxDensity<T>> for &InverseMagneticFlux<T> where T: NumLike {
8452 type Output = InverseArea<T>;
8453 fn div(self, rhs: &InverseMagneticFluxDensity<T>) -> Self::Output {
8454 InverseArea{per_m2: self.per_Wb.clone() / rhs.m2_per_Wb.clone()}
8455 }
8456}
8457
8458impl<T> core::ops::Div<InverseVoltage<T>> for InverseMagneticFlux<T> where T: NumLike {
8461 type Output = Frequency<T>;
8462 fn div(self, rhs: InverseVoltage<T>) -> Self::Output {
8463 Frequency{Hz: self.per_Wb / rhs.per_V}
8464 }
8465}
8466impl<T> core::ops::Div<InverseVoltage<T>> for &InverseMagneticFlux<T> where T: NumLike {
8468 type Output = Frequency<T>;
8469 fn div(self, rhs: InverseVoltage<T>) -> Self::Output {
8470 Frequency{Hz: self.per_Wb.clone() / rhs.per_V}
8471 }
8472}
8473impl<T> core::ops::Div<&InverseVoltage<T>> for InverseMagneticFlux<T> where T: NumLike {
8475 type Output = Frequency<T>;
8476 fn div(self, rhs: &InverseVoltage<T>) -> Self::Output {
8477 Frequency{Hz: self.per_Wb / rhs.per_V.clone()}
8478 }
8479}
8480impl<T> core::ops::Div<&InverseVoltage<T>> for &InverseMagneticFlux<T> where T: NumLike {
8482 type Output = Frequency<T>;
8483 fn div(self, rhs: &InverseVoltage<T>) -> Self::Output {
8484 Frequency{Hz: self.per_Wb.clone() / rhs.per_V.clone()}
8485 }
8486}
8487
8488impl<T> core::ops::Mul<MagneticFluxDensity<T>> for InverseMagneticFlux<T> where T: NumLike {
8491 type Output = InverseArea<T>;
8492 fn mul(self, rhs: MagneticFluxDensity<T>) -> Self::Output {
8493 InverseArea{per_m2: self.per_Wb * rhs.T}
8494 }
8495}
8496impl<T> core::ops::Mul<MagneticFluxDensity<T>> for &InverseMagneticFlux<T> where T: NumLike {
8498 type Output = InverseArea<T>;
8499 fn mul(self, rhs: MagneticFluxDensity<T>) -> Self::Output {
8500 InverseArea{per_m2: self.per_Wb.clone() * rhs.T}
8501 }
8502}
8503impl<T> core::ops::Mul<&MagneticFluxDensity<T>> for InverseMagneticFlux<T> where T: NumLike {
8505 type Output = InverseArea<T>;
8506 fn mul(self, rhs: &MagneticFluxDensity<T>) -> Self::Output {
8507 InverseArea{per_m2: self.per_Wb * rhs.T.clone()}
8508 }
8509}
8510impl<T> core::ops::Mul<&MagneticFluxDensity<T>> for &InverseMagneticFlux<T> where T: NumLike {
8512 type Output = InverseArea<T>;
8513 fn mul(self, rhs: &MagneticFluxDensity<T>) -> Self::Output {
8514 InverseArea{per_m2: self.per_Wb.clone() * rhs.T.clone()}
8515 }
8516}
8517
8518impl<T> core::ops::Mul<Resistance<T>> for InverseMagneticFlux<T> where T: NumLike {
8521 type Output = InverseCharge<T>;
8522 fn mul(self, rhs: Resistance<T>) -> Self::Output {
8523 InverseCharge{per_C: self.per_Wb * rhs.Ohm}
8524 }
8525}
8526impl<T> core::ops::Mul<Resistance<T>> for &InverseMagneticFlux<T> where T: NumLike {
8528 type Output = InverseCharge<T>;
8529 fn mul(self, rhs: Resistance<T>) -> Self::Output {
8530 InverseCharge{per_C: self.per_Wb.clone() * rhs.Ohm}
8531 }
8532}
8533impl<T> core::ops::Mul<&Resistance<T>> for InverseMagneticFlux<T> where T: NumLike {
8535 type Output = InverseCharge<T>;
8536 fn mul(self, rhs: &Resistance<T>) -> Self::Output {
8537 InverseCharge{per_C: self.per_Wb * rhs.Ohm.clone()}
8538 }
8539}
8540impl<T> core::ops::Mul<&Resistance<T>> for &InverseMagneticFlux<T> where T: NumLike {
8542 type Output = InverseCharge<T>;
8543 fn mul(self, rhs: &Resistance<T>) -> Self::Output {
8544 InverseCharge{per_C: self.per_Wb.clone() * rhs.Ohm.clone()}
8545 }
8546}
8547
8548impl<T> core::ops::Mul<Voltage<T>> for InverseMagneticFlux<T> where T: NumLike {
8551 type Output = Frequency<T>;
8552 fn mul(self, rhs: Voltage<T>) -> Self::Output {
8553 Frequency{Hz: self.per_Wb * rhs.V}
8554 }
8555}
8556impl<T> core::ops::Mul<Voltage<T>> for &InverseMagneticFlux<T> where T: NumLike {
8558 type Output = Frequency<T>;
8559 fn mul(self, rhs: Voltage<T>) -> Self::Output {
8560 Frequency{Hz: self.per_Wb.clone() * rhs.V}
8561 }
8562}
8563impl<T> core::ops::Mul<&Voltage<T>> for InverseMagneticFlux<T> where T: NumLike {
8565 type Output = Frequency<T>;
8566 fn mul(self, rhs: &Voltage<T>) -> Self::Output {
8567 Frequency{Hz: self.per_Wb * rhs.V.clone()}
8568 }
8569}
8570impl<T> core::ops::Mul<&Voltage<T>> for &InverseMagneticFlux<T> where T: NumLike {
8572 type Output = Frequency<T>;
8573 fn mul(self, rhs: &Voltage<T>) -> Self::Output {
8574 Frequency{Hz: self.per_Wb.clone() * rhs.V.clone()}
8575 }
8576}
8577
8578impl<T> core::ops::Mul<Area<T>> for InverseMagneticFlux<T> where T: NumLike {
8581 type Output = InverseMagneticFluxDensity<T>;
8582 fn mul(self, rhs: Area<T>) -> Self::Output {
8583 InverseMagneticFluxDensity{m2_per_Wb: self.per_Wb * rhs.m2}
8584 }
8585}
8586impl<T> core::ops::Mul<Area<T>> for &InverseMagneticFlux<T> where T: NumLike {
8588 type Output = InverseMagneticFluxDensity<T>;
8589 fn mul(self, rhs: Area<T>) -> Self::Output {
8590 InverseMagneticFluxDensity{m2_per_Wb: self.per_Wb.clone() * rhs.m2}
8591 }
8592}
8593impl<T> core::ops::Mul<&Area<T>> for InverseMagneticFlux<T> where T: NumLike {
8595 type Output = InverseMagneticFluxDensity<T>;
8596 fn mul(self, rhs: &Area<T>) -> Self::Output {
8597 InverseMagneticFluxDensity{m2_per_Wb: self.per_Wb * rhs.m2.clone()}
8598 }
8599}
8600impl<T> core::ops::Mul<&Area<T>> for &InverseMagneticFlux<T> where T: NumLike {
8602 type Output = InverseMagneticFluxDensity<T>;
8603 fn mul(self, rhs: &Area<T>) -> Self::Output {
8604 InverseMagneticFluxDensity{m2_per_Wb: self.per_Wb.clone() * rhs.m2.clone()}
8605 }
8606}
8607
8608impl<T> core::ops::Div<InverseArea<T>> for InverseMagneticFlux<T> where T: NumLike {
8611 type Output = InverseMagneticFluxDensity<T>;
8612 fn div(self, rhs: InverseArea<T>) -> Self::Output {
8613 InverseMagneticFluxDensity{m2_per_Wb: self.per_Wb / rhs.per_m2}
8614 }
8615}
8616impl<T> core::ops::Div<InverseArea<T>> for &InverseMagneticFlux<T> where T: NumLike {
8618 type Output = InverseMagneticFluxDensity<T>;
8619 fn div(self, rhs: InverseArea<T>) -> Self::Output {
8620 InverseMagneticFluxDensity{m2_per_Wb: self.per_Wb.clone() / rhs.per_m2}
8621 }
8622}
8623impl<T> core::ops::Div<&InverseArea<T>> for InverseMagneticFlux<T> where T: NumLike {
8625 type Output = InverseMagneticFluxDensity<T>;
8626 fn div(self, rhs: &InverseArea<T>) -> Self::Output {
8627 InverseMagneticFluxDensity{m2_per_Wb: self.per_Wb / rhs.per_m2.clone()}
8628 }
8629}
8630impl<T> core::ops::Div<&InverseArea<T>> for &InverseMagneticFlux<T> where T: NumLike {
8632 type Output = InverseMagneticFluxDensity<T>;
8633 fn div(self, rhs: &InverseArea<T>) -> Self::Output {
8634 InverseMagneticFluxDensity{m2_per_Wb: self.per_Wb.clone() / rhs.per_m2.clone()}
8635 }
8636}
8637
8638impl<T> core::ops::Mul<Energy<T>> for InverseMagneticFlux<T> where T: NumLike {
8641 type Output = Current<T>;
8642 fn mul(self, rhs: Energy<T>) -> Self::Output {
8643 Current{A: self.per_Wb * rhs.J}
8644 }
8645}
8646impl<T> core::ops::Mul<Energy<T>> for &InverseMagneticFlux<T> where T: NumLike {
8648 type Output = Current<T>;
8649 fn mul(self, rhs: Energy<T>) -> Self::Output {
8650 Current{A: self.per_Wb.clone() * rhs.J}
8651 }
8652}
8653impl<T> core::ops::Mul<&Energy<T>> for InverseMagneticFlux<T> where T: NumLike {
8655 type Output = Current<T>;
8656 fn mul(self, rhs: &Energy<T>) -> Self::Output {
8657 Current{A: self.per_Wb * rhs.J.clone()}
8658 }
8659}
8660impl<T> core::ops::Mul<&Energy<T>> for &InverseMagneticFlux<T> where T: NumLike {
8662 type Output = Current<T>;
8663 fn mul(self, rhs: &Energy<T>) -> Self::Output {
8664 Current{A: self.per_Wb.clone() * rhs.J.clone()}
8665 }
8666}
8667
8668impl<T> core::ops::Mul<Torque<T>> for InverseMagneticFlux<T> where T: NumLike {
8671 type Output = Current<T>;
8672 fn mul(self, rhs: Torque<T>) -> Self::Output {
8673 Current{A: self.per_Wb * rhs.Nm}
8674 }
8675}
8676impl<T> core::ops::Mul<Torque<T>> for &InverseMagneticFlux<T> where T: NumLike {
8678 type Output = Current<T>;
8679 fn mul(self, rhs: Torque<T>) -> Self::Output {
8680 Current{A: self.per_Wb.clone() * rhs.Nm}
8681 }
8682}
8683impl<T> core::ops::Mul<&Torque<T>> for InverseMagneticFlux<T> where T: NumLike {
8685 type Output = Current<T>;
8686 fn mul(self, rhs: &Torque<T>) -> Self::Output {
8687 Current{A: self.per_Wb * rhs.Nm.clone()}
8688 }
8689}
8690impl<T> core::ops::Mul<&Torque<T>> for &InverseMagneticFlux<T> where T: NumLike {
8692 type Output = Current<T>;
8693 fn mul(self, rhs: &Torque<T>) -> Self::Output {
8694 Current{A: self.per_Wb.clone() * rhs.Nm.clone()}
8695 }
8696}
8697
8698impl<T> core::ops::Div<Frequency<T>> for InverseMagneticFlux<T> where T: NumLike {
8701 type Output = InverseVoltage<T>;
8702 fn div(self, rhs: Frequency<T>) -> Self::Output {
8703 InverseVoltage{per_V: self.per_Wb / rhs.Hz}
8704 }
8705}
8706impl<T> core::ops::Div<Frequency<T>> for &InverseMagneticFlux<T> where T: NumLike {
8708 type Output = InverseVoltage<T>;
8709 fn div(self, rhs: Frequency<T>) -> Self::Output {
8710 InverseVoltage{per_V: self.per_Wb.clone() / rhs.Hz}
8711 }
8712}
8713impl<T> core::ops::Div<&Frequency<T>> for InverseMagneticFlux<T> where T: NumLike {
8715 type Output = InverseVoltage<T>;
8716 fn div(self, rhs: &Frequency<T>) -> Self::Output {
8717 InverseVoltage{per_V: self.per_Wb / rhs.Hz.clone()}
8718 }
8719}
8720impl<T> core::ops::Div<&Frequency<T>> for &InverseMagneticFlux<T> where T: NumLike {
8722 type Output = InverseVoltage<T>;
8723 fn div(self, rhs: &Frequency<T>) -> Self::Output {
8724 InverseVoltage{per_V: self.per_Wb.clone() / rhs.Hz.clone()}
8725 }
8726}
8727
8728impl<T> core::ops::Div<InverseEnergy<T>> for InverseMagneticFlux<T> where T: NumLike {
8731 type Output = Current<T>;
8732 fn div(self, rhs: InverseEnergy<T>) -> Self::Output {
8733 Current{A: self.per_Wb / rhs.per_J}
8734 }
8735}
8736impl<T> core::ops::Div<InverseEnergy<T>> for &InverseMagneticFlux<T> where T: NumLike {
8738 type Output = Current<T>;
8739 fn div(self, rhs: InverseEnergy<T>) -> Self::Output {
8740 Current{A: self.per_Wb.clone() / rhs.per_J}
8741 }
8742}
8743impl<T> core::ops::Div<&InverseEnergy<T>> for InverseMagneticFlux<T> where T: NumLike {
8745 type Output = Current<T>;
8746 fn div(self, rhs: &InverseEnergy<T>) -> Self::Output {
8747 Current{A: self.per_Wb / rhs.per_J.clone()}
8748 }
8749}
8750impl<T> core::ops::Div<&InverseEnergy<T>> for &InverseMagneticFlux<T> where T: NumLike {
8752 type Output = Current<T>;
8753 fn div(self, rhs: &InverseEnergy<T>) -> Self::Output {
8754 Current{A: self.per_Wb.clone() / rhs.per_J.clone()}
8755 }
8756}
8757
8758impl<T> core::ops::Div<InverseTorque<T>> for InverseMagneticFlux<T> where T: NumLike {
8761 type Output = Current<T>;
8762 fn div(self, rhs: InverseTorque<T>) -> Self::Output {
8763 Current{A: self.per_Wb / rhs.per_Nm}
8764 }
8765}
8766impl<T> core::ops::Div<InverseTorque<T>> for &InverseMagneticFlux<T> where T: NumLike {
8768 type Output = Current<T>;
8769 fn div(self, rhs: InverseTorque<T>) -> Self::Output {
8770 Current{A: self.per_Wb.clone() / rhs.per_Nm}
8771 }
8772}
8773impl<T> core::ops::Div<&InverseTorque<T>> for InverseMagneticFlux<T> where T: NumLike {
8775 type Output = Current<T>;
8776 fn div(self, rhs: &InverseTorque<T>) -> Self::Output {
8777 Current{A: self.per_Wb / rhs.per_Nm.clone()}
8778 }
8779}
8780impl<T> core::ops::Div<&InverseTorque<T>> for &InverseMagneticFlux<T> where T: NumLike {
8782 type Output = Current<T>;
8783 fn div(self, rhs: &InverseTorque<T>) -> Self::Output {
8784 Current{A: self.per_Wb.clone() / rhs.per_Nm.clone()}
8785 }
8786}
8787
8788impl<T> core::ops::Div<InverseMagneticFlux<T>> for f64 where T: NumLike+From<f64> {
8791 type Output = MagneticFlux<T>;
8792 fn div(self, rhs: InverseMagneticFlux<T>) -> Self::Output {
8793 MagneticFlux{Wb: T::from(self) / rhs.per_Wb}
8794 }
8795}
8796impl<T> core::ops::Div<InverseMagneticFlux<T>> for &f64 where T: NumLike+From<f64> {
8798 type Output = MagneticFlux<T>;
8799 fn div(self, rhs: InverseMagneticFlux<T>) -> Self::Output {
8800 MagneticFlux{Wb: T::from(self.clone()) / rhs.per_Wb}
8801 }
8802}
8803impl<T> core::ops::Div<&InverseMagneticFlux<T>> for f64 where T: NumLike+From<f64> {
8805 type Output = MagneticFlux<T>;
8806 fn div(self, rhs: &InverseMagneticFlux<T>) -> Self::Output {
8807 MagneticFlux{Wb: T::from(self) / rhs.per_Wb.clone()}
8808 }
8809}
8810impl<T> core::ops::Div<&InverseMagneticFlux<T>> for &f64 where T: NumLike+From<f64> {
8812 type Output = MagneticFlux<T>;
8813 fn div(self, rhs: &InverseMagneticFlux<T>) -> Self::Output {
8814 MagneticFlux{Wb: T::from(self.clone()) / rhs.per_Wb.clone()}
8815 }
8816}
8817
8818impl<T> core::ops::Div<InverseMagneticFlux<T>> for f32 where T: NumLike+From<f32> {
8821 type Output = MagneticFlux<T>;
8822 fn div(self, rhs: InverseMagneticFlux<T>) -> Self::Output {
8823 MagneticFlux{Wb: T::from(self) / rhs.per_Wb}
8824 }
8825}
8826impl<T> core::ops::Div<InverseMagneticFlux<T>> for &f32 where T: NumLike+From<f32> {
8828 type Output = MagneticFlux<T>;
8829 fn div(self, rhs: InverseMagneticFlux<T>) -> Self::Output {
8830 MagneticFlux{Wb: T::from(self.clone()) / rhs.per_Wb}
8831 }
8832}
8833impl<T> core::ops::Div<&InverseMagneticFlux<T>> for f32 where T: NumLike+From<f32> {
8835 type Output = MagneticFlux<T>;
8836 fn div(self, rhs: &InverseMagneticFlux<T>) -> Self::Output {
8837 MagneticFlux{Wb: T::from(self) / rhs.per_Wb.clone()}
8838 }
8839}
8840impl<T> core::ops::Div<&InverseMagneticFlux<T>> for &f32 where T: NumLike+From<f32> {
8842 type Output = MagneticFlux<T>;
8843 fn div(self, rhs: &InverseMagneticFlux<T>) -> Self::Output {
8844 MagneticFlux{Wb: T::from(self.clone()) / rhs.per_Wb.clone()}
8845 }
8846}
8847
8848impl<T> core::ops::Div<InverseMagneticFlux<T>> for i64 where T: NumLike+From<i64> {
8851 type Output = MagneticFlux<T>;
8852 fn div(self, rhs: InverseMagneticFlux<T>) -> Self::Output {
8853 MagneticFlux{Wb: T::from(self) / rhs.per_Wb}
8854 }
8855}
8856impl<T> core::ops::Div<InverseMagneticFlux<T>> for &i64 where T: NumLike+From<i64> {
8858 type Output = MagneticFlux<T>;
8859 fn div(self, rhs: InverseMagneticFlux<T>) -> Self::Output {
8860 MagneticFlux{Wb: T::from(self.clone()) / rhs.per_Wb}
8861 }
8862}
8863impl<T> core::ops::Div<&InverseMagneticFlux<T>> for i64 where T: NumLike+From<i64> {
8865 type Output = MagneticFlux<T>;
8866 fn div(self, rhs: &InverseMagneticFlux<T>) -> Self::Output {
8867 MagneticFlux{Wb: T::from(self) / rhs.per_Wb.clone()}
8868 }
8869}
8870impl<T> core::ops::Div<&InverseMagneticFlux<T>> for &i64 where T: NumLike+From<i64> {
8872 type Output = MagneticFlux<T>;
8873 fn div(self, rhs: &InverseMagneticFlux<T>) -> Self::Output {
8874 MagneticFlux{Wb: T::from(self.clone()) / rhs.per_Wb.clone()}
8875 }
8876}
8877
8878impl<T> core::ops::Div<InverseMagneticFlux<T>> for i32 where T: NumLike+From<i32> {
8881 type Output = MagneticFlux<T>;
8882 fn div(self, rhs: InverseMagneticFlux<T>) -> Self::Output {
8883 MagneticFlux{Wb: T::from(self) / rhs.per_Wb}
8884 }
8885}
8886impl<T> core::ops::Div<InverseMagneticFlux<T>> for &i32 where T: NumLike+From<i32> {
8888 type Output = MagneticFlux<T>;
8889 fn div(self, rhs: InverseMagneticFlux<T>) -> Self::Output {
8890 MagneticFlux{Wb: T::from(self.clone()) / rhs.per_Wb}
8891 }
8892}
8893impl<T> core::ops::Div<&InverseMagneticFlux<T>> for i32 where T: NumLike+From<i32> {
8895 type Output = MagneticFlux<T>;
8896 fn div(self, rhs: &InverseMagneticFlux<T>) -> Self::Output {
8897 MagneticFlux{Wb: T::from(self) / rhs.per_Wb.clone()}
8898 }
8899}
8900impl<T> core::ops::Div<&InverseMagneticFlux<T>> for &i32 where T: NumLike+From<i32> {
8902 type Output = MagneticFlux<T>;
8903 fn div(self, rhs: &InverseMagneticFlux<T>) -> Self::Output {
8904 MagneticFlux{Wb: T::from(self.clone()) / rhs.per_Wb.clone()}
8905 }
8906}
8907
8908#[cfg(feature="num-bigfloat")]
8911impl<T> core::ops::Div<InverseMagneticFlux<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
8912 type Output = MagneticFlux<T>;
8913 fn div(self, rhs: InverseMagneticFlux<T>) -> Self::Output {
8914 MagneticFlux{Wb: T::from(self) / rhs.per_Wb}
8915 }
8916}
8917#[cfg(feature="num-bigfloat")]
8919impl<T> core::ops::Div<InverseMagneticFlux<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
8920 type Output = MagneticFlux<T>;
8921 fn div(self, rhs: InverseMagneticFlux<T>) -> Self::Output {
8922 MagneticFlux{Wb: T::from(self.clone()) / rhs.per_Wb}
8923 }
8924}
8925#[cfg(feature="num-bigfloat")]
8927impl<T> core::ops::Div<&InverseMagneticFlux<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
8928 type Output = MagneticFlux<T>;
8929 fn div(self, rhs: &InverseMagneticFlux<T>) -> Self::Output {
8930 MagneticFlux{Wb: T::from(self) / rhs.per_Wb.clone()}
8931 }
8932}
8933#[cfg(feature="num-bigfloat")]
8935impl<T> core::ops::Div<&InverseMagneticFlux<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
8936 type Output = MagneticFlux<T>;
8937 fn div(self, rhs: &InverseMagneticFlux<T>) -> Self::Output {
8938 MagneticFlux{Wb: T::from(self.clone()) / rhs.per_Wb.clone()}
8939 }
8940}
8941
8942#[cfg(feature="num-complex")]
8945impl<T> core::ops::Div<InverseMagneticFlux<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
8946 type Output = MagneticFlux<T>;
8947 fn div(self, rhs: InverseMagneticFlux<T>) -> Self::Output {
8948 MagneticFlux{Wb: T::from(self) / rhs.per_Wb}
8949 }
8950}
8951#[cfg(feature="num-complex")]
8953impl<T> core::ops::Div<InverseMagneticFlux<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
8954 type Output = MagneticFlux<T>;
8955 fn div(self, rhs: InverseMagneticFlux<T>) -> Self::Output {
8956 MagneticFlux{Wb: T::from(self.clone()) / rhs.per_Wb}
8957 }
8958}
8959#[cfg(feature="num-complex")]
8961impl<T> core::ops::Div<&InverseMagneticFlux<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
8962 type Output = MagneticFlux<T>;
8963 fn div(self, rhs: &InverseMagneticFlux<T>) -> Self::Output {
8964 MagneticFlux{Wb: T::from(self) / rhs.per_Wb.clone()}
8965 }
8966}
8967#[cfg(feature="num-complex")]
8969impl<T> core::ops::Div<&InverseMagneticFlux<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
8970 type Output = MagneticFlux<T>;
8971 fn div(self, rhs: &InverseMagneticFlux<T>) -> Self::Output {
8972 MagneticFlux{Wb: T::from(self.clone()) / rhs.per_Wb.clone()}
8973 }
8974}
8975
8976#[cfg(feature="num-complex")]
8979impl<T> core::ops::Div<InverseMagneticFlux<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
8980 type Output = MagneticFlux<T>;
8981 fn div(self, rhs: InverseMagneticFlux<T>) -> Self::Output {
8982 MagneticFlux{Wb: T::from(self) / rhs.per_Wb}
8983 }
8984}
8985#[cfg(feature="num-complex")]
8987impl<T> core::ops::Div<InverseMagneticFlux<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
8988 type Output = MagneticFlux<T>;
8989 fn div(self, rhs: InverseMagneticFlux<T>) -> Self::Output {
8990 MagneticFlux{Wb: T::from(self.clone()) / rhs.per_Wb}
8991 }
8992}
8993#[cfg(feature="num-complex")]
8995impl<T> core::ops::Div<&InverseMagneticFlux<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
8996 type Output = MagneticFlux<T>;
8997 fn div(self, rhs: &InverseMagneticFlux<T>) -> Self::Output {
8998 MagneticFlux{Wb: T::from(self) / rhs.per_Wb.clone()}
8999 }
9000}
9001#[cfg(feature="num-complex")]
9003impl<T> core::ops::Div<&InverseMagneticFlux<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
9004 type Output = MagneticFlux<T>;
9005 fn div(self, rhs: &InverseMagneticFlux<T>) -> Self::Output {
9006 MagneticFlux{Wb: T::from(self.clone()) / rhs.per_Wb.clone()}
9007 }
9008}
9009
9010#[derive(UnitStruct, Debug, Clone)]
9012#[cfg_attr(feature="serde", derive(Serialize, Deserialize))]
9013pub struct InverseMagneticFluxDensity<T: NumLike>{
9014 pub m2_per_Wb: T
9016}
9017
9018impl<T> InverseMagneticFluxDensity<T> where T: NumLike {
9019
9020 pub fn unit_name() -> &'static str { "square meters per weber" }
9022
9023 pub fn unit_symbol() -> &'static str { "m²/Wb" }
9025
9026 pub fn from_m2_per_Wb(m2_per_Wb: T) -> Self { InverseMagneticFluxDensity{m2_per_Wb: m2_per_Wb} }
9031
9032 pub fn to_m2_per_Wb(&self) -> T { self.m2_per_Wb.clone() }
9034
9035 pub fn from_square_meters_per_weber(square_meters_per_weber: T) -> Self { InverseMagneticFluxDensity{m2_per_Wb: square_meters_per_weber} }
9040
9041 pub fn to_square_meters_per_weber(&self) -> T { self.m2_per_Wb.clone() }
9043
9044 pub fn from_per_T(per_T: T) -> Self { InverseMagneticFluxDensity{m2_per_Wb: per_T} }
9049
9050 pub fn to_per_T(&self) -> T { self.m2_per_Wb.clone() }
9052
9053 pub fn from_per_tesla(per_tesla: T) -> Self { InverseMagneticFluxDensity{m2_per_Wb: per_tesla} }
9058
9059 pub fn to_per_tesla(&self) -> T { self.m2_per_Wb.clone() }
9061
9062}
9063
9064impl<T> fmt::Display for InverseMagneticFluxDensity<T> where T: NumLike {
9065 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
9066 write!(f, "{} {}", &self.m2_per_Wb, Self::unit_symbol())
9067 }
9068}
9069
9070impl<T> InverseMagneticFluxDensity<T> where T: NumLike+From<f64> {
9071
9072}
9073
9074
9075#[cfg(feature="num-bigfloat")]
9077impl core::ops::Mul<InverseMagneticFluxDensity<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
9078 type Output = InverseMagneticFluxDensity<num_bigfloat::BigFloat>;
9079 fn mul(self, rhs: InverseMagneticFluxDensity<num_bigfloat::BigFloat>) -> Self::Output {
9080 InverseMagneticFluxDensity{m2_per_Wb: self * rhs.m2_per_Wb}
9081 }
9082}
9083#[cfg(feature="num-bigfloat")]
9085impl core::ops::Mul<InverseMagneticFluxDensity<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
9086 type Output = InverseMagneticFluxDensity<num_bigfloat::BigFloat>;
9087 fn mul(self, rhs: InverseMagneticFluxDensity<num_bigfloat::BigFloat>) -> Self::Output {
9088 InverseMagneticFluxDensity{m2_per_Wb: self.clone() * rhs.m2_per_Wb}
9089 }
9090}
9091#[cfg(feature="num-bigfloat")]
9093impl core::ops::Mul<&InverseMagneticFluxDensity<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
9094 type Output = InverseMagneticFluxDensity<num_bigfloat::BigFloat>;
9095 fn mul(self, rhs: &InverseMagneticFluxDensity<num_bigfloat::BigFloat>) -> Self::Output {
9096 InverseMagneticFluxDensity{m2_per_Wb: self * rhs.m2_per_Wb.clone()}
9097 }
9098}
9099#[cfg(feature="num-bigfloat")]
9101impl core::ops::Mul<&InverseMagneticFluxDensity<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
9102 type Output = InverseMagneticFluxDensity<num_bigfloat::BigFloat>;
9103 fn mul(self, rhs: &InverseMagneticFluxDensity<num_bigfloat::BigFloat>) -> Self::Output {
9104 InverseMagneticFluxDensity{m2_per_Wb: self.clone() * rhs.m2_per_Wb.clone()}
9105 }
9106}
9107
9108#[cfg(feature="num-complex")]
9110impl core::ops::Mul<InverseMagneticFluxDensity<num_complex::Complex32>> for num_complex::Complex32 {
9111 type Output = InverseMagneticFluxDensity<num_complex::Complex32>;
9112 fn mul(self, rhs: InverseMagneticFluxDensity<num_complex::Complex32>) -> Self::Output {
9113 InverseMagneticFluxDensity{m2_per_Wb: self * rhs.m2_per_Wb}
9114 }
9115}
9116#[cfg(feature="num-complex")]
9118impl core::ops::Mul<InverseMagneticFluxDensity<num_complex::Complex32>> for &num_complex::Complex32 {
9119 type Output = InverseMagneticFluxDensity<num_complex::Complex32>;
9120 fn mul(self, rhs: InverseMagneticFluxDensity<num_complex::Complex32>) -> Self::Output {
9121 InverseMagneticFluxDensity{m2_per_Wb: self.clone() * rhs.m2_per_Wb}
9122 }
9123}
9124#[cfg(feature="num-complex")]
9126impl core::ops::Mul<&InverseMagneticFluxDensity<num_complex::Complex32>> for num_complex::Complex32 {
9127 type Output = InverseMagneticFluxDensity<num_complex::Complex32>;
9128 fn mul(self, rhs: &InverseMagneticFluxDensity<num_complex::Complex32>) -> Self::Output {
9129 InverseMagneticFluxDensity{m2_per_Wb: self * rhs.m2_per_Wb.clone()}
9130 }
9131}
9132#[cfg(feature="num-complex")]
9134impl core::ops::Mul<&InverseMagneticFluxDensity<num_complex::Complex32>> for &num_complex::Complex32 {
9135 type Output = InverseMagneticFluxDensity<num_complex::Complex32>;
9136 fn mul(self, rhs: &InverseMagneticFluxDensity<num_complex::Complex32>) -> Self::Output {
9137 InverseMagneticFluxDensity{m2_per_Wb: self.clone() * rhs.m2_per_Wb.clone()}
9138 }
9139}
9140
9141#[cfg(feature="num-complex")]
9143impl core::ops::Mul<InverseMagneticFluxDensity<num_complex::Complex64>> for num_complex::Complex64 {
9144 type Output = InverseMagneticFluxDensity<num_complex::Complex64>;
9145 fn mul(self, rhs: InverseMagneticFluxDensity<num_complex::Complex64>) -> Self::Output {
9146 InverseMagneticFluxDensity{m2_per_Wb: self * rhs.m2_per_Wb}
9147 }
9148}
9149#[cfg(feature="num-complex")]
9151impl core::ops::Mul<InverseMagneticFluxDensity<num_complex::Complex64>> for &num_complex::Complex64 {
9152 type Output = InverseMagneticFluxDensity<num_complex::Complex64>;
9153 fn mul(self, rhs: InverseMagneticFluxDensity<num_complex::Complex64>) -> Self::Output {
9154 InverseMagneticFluxDensity{m2_per_Wb: self.clone() * rhs.m2_per_Wb}
9155 }
9156}
9157#[cfg(feature="num-complex")]
9159impl core::ops::Mul<&InverseMagneticFluxDensity<num_complex::Complex64>> for num_complex::Complex64 {
9160 type Output = InverseMagneticFluxDensity<num_complex::Complex64>;
9161 fn mul(self, rhs: &InverseMagneticFluxDensity<num_complex::Complex64>) -> Self::Output {
9162 InverseMagneticFluxDensity{m2_per_Wb: self * rhs.m2_per_Wb.clone()}
9163 }
9164}
9165#[cfg(feature="num-complex")]
9167impl core::ops::Mul<&InverseMagneticFluxDensity<num_complex::Complex64>> for &num_complex::Complex64 {
9168 type Output = InverseMagneticFluxDensity<num_complex::Complex64>;
9169 fn mul(self, rhs: &InverseMagneticFluxDensity<num_complex::Complex64>) -> Self::Output {
9170 InverseMagneticFluxDensity{m2_per_Wb: self.clone() * rhs.m2_per_Wb.clone()}
9171 }
9172}
9173
9174
9175
9176
9177impl<T> core::ops::Div<InverseMagneticFlux<T>> for InverseMagneticFluxDensity<T> where T: NumLike {
9180 type Output = Area<T>;
9181 fn div(self, rhs: InverseMagneticFlux<T>) -> Self::Output {
9182 Area{m2: self.m2_per_Wb / rhs.per_Wb}
9183 }
9184}
9185impl<T> core::ops::Div<InverseMagneticFlux<T>> for &InverseMagneticFluxDensity<T> where T: NumLike {
9187 type Output = Area<T>;
9188 fn div(self, rhs: InverseMagneticFlux<T>) -> Self::Output {
9189 Area{m2: self.m2_per_Wb.clone() / rhs.per_Wb}
9190 }
9191}
9192impl<T> core::ops::Div<&InverseMagneticFlux<T>> for InverseMagneticFluxDensity<T> where T: NumLike {
9194 type Output = Area<T>;
9195 fn div(self, rhs: &InverseMagneticFlux<T>) -> Self::Output {
9196 Area{m2: self.m2_per_Wb / rhs.per_Wb.clone()}
9197 }
9198}
9199impl<T> core::ops::Div<&InverseMagneticFlux<T>> for &InverseMagneticFluxDensity<T> where T: NumLike {
9201 type Output = Area<T>;
9202 fn div(self, rhs: &InverseMagneticFlux<T>) -> Self::Output {
9203 Area{m2: self.m2_per_Wb.clone() / rhs.per_Wb.clone()}
9204 }
9205}
9206
9207impl<T> core::ops::Mul<MagneticFlux<T>> for InverseMagneticFluxDensity<T> where T: NumLike {
9210 type Output = Area<T>;
9211 fn mul(self, rhs: MagneticFlux<T>) -> Self::Output {
9212 Area{m2: self.m2_per_Wb * rhs.Wb}
9213 }
9214}
9215impl<T> core::ops::Mul<MagneticFlux<T>> for &InverseMagneticFluxDensity<T> where T: NumLike {
9217 type Output = Area<T>;
9218 fn mul(self, rhs: MagneticFlux<T>) -> Self::Output {
9219 Area{m2: self.m2_per_Wb.clone() * rhs.Wb}
9220 }
9221}
9222impl<T> core::ops::Mul<&MagneticFlux<T>> for InverseMagneticFluxDensity<T> where T: NumLike {
9224 type Output = Area<T>;
9225 fn mul(self, rhs: &MagneticFlux<T>) -> Self::Output {
9226 Area{m2: self.m2_per_Wb * rhs.Wb.clone()}
9227 }
9228}
9229impl<T> core::ops::Mul<&MagneticFlux<T>> for &InverseMagneticFluxDensity<T> where T: NumLike {
9231 type Output = Area<T>;
9232 fn mul(self, rhs: &MagneticFlux<T>) -> Self::Output {
9233 Area{m2: self.m2_per_Wb.clone() * rhs.Wb.clone()}
9234 }
9235}
9236
9237impl<T> core::ops::Div<Area<T>> for InverseMagneticFluxDensity<T> where T: NumLike {
9240 type Output = InverseMagneticFlux<T>;
9241 fn div(self, rhs: Area<T>) -> Self::Output {
9242 InverseMagneticFlux{per_Wb: self.m2_per_Wb / rhs.m2}
9243 }
9244}
9245impl<T> core::ops::Div<Area<T>> for &InverseMagneticFluxDensity<T> where T: NumLike {
9247 type Output = InverseMagneticFlux<T>;
9248 fn div(self, rhs: Area<T>) -> Self::Output {
9249 InverseMagneticFlux{per_Wb: self.m2_per_Wb.clone() / rhs.m2}
9250 }
9251}
9252impl<T> core::ops::Div<&Area<T>> for InverseMagneticFluxDensity<T> where T: NumLike {
9254 type Output = InverseMagneticFlux<T>;
9255 fn div(self, rhs: &Area<T>) -> Self::Output {
9256 InverseMagneticFlux{per_Wb: self.m2_per_Wb / rhs.m2.clone()}
9257 }
9258}
9259impl<T> core::ops::Div<&Area<T>> for &InverseMagneticFluxDensity<T> where T: NumLike {
9261 type Output = InverseMagneticFlux<T>;
9262 fn div(self, rhs: &Area<T>) -> Self::Output {
9263 InverseMagneticFlux{per_Wb: self.m2_per_Wb.clone() / rhs.m2.clone()}
9264 }
9265}
9266
9267impl<T> core::ops::Mul<InverseArea<T>> for InverseMagneticFluxDensity<T> where T: NumLike {
9270 type Output = InverseMagneticFlux<T>;
9271 fn mul(self, rhs: InverseArea<T>) -> Self::Output {
9272 InverseMagneticFlux{per_Wb: self.m2_per_Wb * rhs.per_m2}
9273 }
9274}
9275impl<T> core::ops::Mul<InverseArea<T>> for &InverseMagneticFluxDensity<T> where T: NumLike {
9277 type Output = InverseMagneticFlux<T>;
9278 fn mul(self, rhs: InverseArea<T>) -> Self::Output {
9279 InverseMagneticFlux{per_Wb: self.m2_per_Wb.clone() * rhs.per_m2}
9280 }
9281}
9282impl<T> core::ops::Mul<&InverseArea<T>> for InverseMagneticFluxDensity<T> where T: NumLike {
9284 type Output = InverseMagneticFlux<T>;
9285 fn mul(self, rhs: &InverseArea<T>) -> Self::Output {
9286 InverseMagneticFlux{per_Wb: self.m2_per_Wb * rhs.per_m2.clone()}
9287 }
9288}
9289impl<T> core::ops::Mul<&InverseArea<T>> for &InverseMagneticFluxDensity<T> where T: NumLike {
9291 type Output = InverseMagneticFlux<T>;
9292 fn mul(self, rhs: &InverseArea<T>) -> Self::Output {
9293 InverseMagneticFlux{per_Wb: self.m2_per_Wb.clone() * rhs.per_m2.clone()}
9294 }
9295}
9296
9297impl<T> core::ops::Div<InverseMagneticFluxDensity<T>> for f64 where T: NumLike+From<f64> {
9300 type Output = MagneticFluxDensity<T>;
9301 fn div(self, rhs: InverseMagneticFluxDensity<T>) -> Self::Output {
9302 MagneticFluxDensity{T: T::from(self) / rhs.m2_per_Wb}
9303 }
9304}
9305impl<T> core::ops::Div<InverseMagneticFluxDensity<T>> for &f64 where T: NumLike+From<f64> {
9307 type Output = MagneticFluxDensity<T>;
9308 fn div(self, rhs: InverseMagneticFluxDensity<T>) -> Self::Output {
9309 MagneticFluxDensity{T: T::from(self.clone()) / rhs.m2_per_Wb}
9310 }
9311}
9312impl<T> core::ops::Div<&InverseMagneticFluxDensity<T>> for f64 where T: NumLike+From<f64> {
9314 type Output = MagneticFluxDensity<T>;
9315 fn div(self, rhs: &InverseMagneticFluxDensity<T>) -> Self::Output {
9316 MagneticFluxDensity{T: T::from(self) / rhs.m2_per_Wb.clone()}
9317 }
9318}
9319impl<T> core::ops::Div<&InverseMagneticFluxDensity<T>> for &f64 where T: NumLike+From<f64> {
9321 type Output = MagneticFluxDensity<T>;
9322 fn div(self, rhs: &InverseMagneticFluxDensity<T>) -> Self::Output {
9323 MagneticFluxDensity{T: T::from(self.clone()) / rhs.m2_per_Wb.clone()}
9324 }
9325}
9326
9327impl<T> core::ops::Div<InverseMagneticFluxDensity<T>> for f32 where T: NumLike+From<f32> {
9330 type Output = MagneticFluxDensity<T>;
9331 fn div(self, rhs: InverseMagneticFluxDensity<T>) -> Self::Output {
9332 MagneticFluxDensity{T: T::from(self) / rhs.m2_per_Wb}
9333 }
9334}
9335impl<T> core::ops::Div<InverseMagneticFluxDensity<T>> for &f32 where T: NumLike+From<f32> {
9337 type Output = MagneticFluxDensity<T>;
9338 fn div(self, rhs: InverseMagneticFluxDensity<T>) -> Self::Output {
9339 MagneticFluxDensity{T: T::from(self.clone()) / rhs.m2_per_Wb}
9340 }
9341}
9342impl<T> core::ops::Div<&InverseMagneticFluxDensity<T>> for f32 where T: NumLike+From<f32> {
9344 type Output = MagneticFluxDensity<T>;
9345 fn div(self, rhs: &InverseMagneticFluxDensity<T>) -> Self::Output {
9346 MagneticFluxDensity{T: T::from(self) / rhs.m2_per_Wb.clone()}
9347 }
9348}
9349impl<T> core::ops::Div<&InverseMagneticFluxDensity<T>> for &f32 where T: NumLike+From<f32> {
9351 type Output = MagneticFluxDensity<T>;
9352 fn div(self, rhs: &InverseMagneticFluxDensity<T>) -> Self::Output {
9353 MagneticFluxDensity{T: T::from(self.clone()) / rhs.m2_per_Wb.clone()}
9354 }
9355}
9356
9357impl<T> core::ops::Div<InverseMagneticFluxDensity<T>> for i64 where T: NumLike+From<i64> {
9360 type Output = MagneticFluxDensity<T>;
9361 fn div(self, rhs: InverseMagneticFluxDensity<T>) -> Self::Output {
9362 MagneticFluxDensity{T: T::from(self) / rhs.m2_per_Wb}
9363 }
9364}
9365impl<T> core::ops::Div<InverseMagneticFluxDensity<T>> for &i64 where T: NumLike+From<i64> {
9367 type Output = MagneticFluxDensity<T>;
9368 fn div(self, rhs: InverseMagneticFluxDensity<T>) -> Self::Output {
9369 MagneticFluxDensity{T: T::from(self.clone()) / rhs.m2_per_Wb}
9370 }
9371}
9372impl<T> core::ops::Div<&InverseMagneticFluxDensity<T>> for i64 where T: NumLike+From<i64> {
9374 type Output = MagneticFluxDensity<T>;
9375 fn div(self, rhs: &InverseMagneticFluxDensity<T>) -> Self::Output {
9376 MagneticFluxDensity{T: T::from(self) / rhs.m2_per_Wb.clone()}
9377 }
9378}
9379impl<T> core::ops::Div<&InverseMagneticFluxDensity<T>> for &i64 where T: NumLike+From<i64> {
9381 type Output = MagneticFluxDensity<T>;
9382 fn div(self, rhs: &InverseMagneticFluxDensity<T>) -> Self::Output {
9383 MagneticFluxDensity{T: T::from(self.clone()) / rhs.m2_per_Wb.clone()}
9384 }
9385}
9386
9387impl<T> core::ops::Div<InverseMagneticFluxDensity<T>> for i32 where T: NumLike+From<i32> {
9390 type Output = MagneticFluxDensity<T>;
9391 fn div(self, rhs: InverseMagneticFluxDensity<T>) -> Self::Output {
9392 MagneticFluxDensity{T: T::from(self) / rhs.m2_per_Wb}
9393 }
9394}
9395impl<T> core::ops::Div<InverseMagneticFluxDensity<T>> for &i32 where T: NumLike+From<i32> {
9397 type Output = MagneticFluxDensity<T>;
9398 fn div(self, rhs: InverseMagneticFluxDensity<T>) -> Self::Output {
9399 MagneticFluxDensity{T: T::from(self.clone()) / rhs.m2_per_Wb}
9400 }
9401}
9402impl<T> core::ops::Div<&InverseMagneticFluxDensity<T>> for i32 where T: NumLike+From<i32> {
9404 type Output = MagneticFluxDensity<T>;
9405 fn div(self, rhs: &InverseMagneticFluxDensity<T>) -> Self::Output {
9406 MagneticFluxDensity{T: T::from(self) / rhs.m2_per_Wb.clone()}
9407 }
9408}
9409impl<T> core::ops::Div<&InverseMagneticFluxDensity<T>> for &i32 where T: NumLike+From<i32> {
9411 type Output = MagneticFluxDensity<T>;
9412 fn div(self, rhs: &InverseMagneticFluxDensity<T>) -> Self::Output {
9413 MagneticFluxDensity{T: T::from(self.clone()) / rhs.m2_per_Wb.clone()}
9414 }
9415}
9416
9417#[cfg(feature="num-bigfloat")]
9420impl<T> core::ops::Div<InverseMagneticFluxDensity<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
9421 type Output = MagneticFluxDensity<T>;
9422 fn div(self, rhs: InverseMagneticFluxDensity<T>) -> Self::Output {
9423 MagneticFluxDensity{T: T::from(self) / rhs.m2_per_Wb}
9424 }
9425}
9426#[cfg(feature="num-bigfloat")]
9428impl<T> core::ops::Div<InverseMagneticFluxDensity<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
9429 type Output = MagneticFluxDensity<T>;
9430 fn div(self, rhs: InverseMagneticFluxDensity<T>) -> Self::Output {
9431 MagneticFluxDensity{T: T::from(self.clone()) / rhs.m2_per_Wb}
9432 }
9433}
9434#[cfg(feature="num-bigfloat")]
9436impl<T> core::ops::Div<&InverseMagneticFluxDensity<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
9437 type Output = MagneticFluxDensity<T>;
9438 fn div(self, rhs: &InverseMagneticFluxDensity<T>) -> Self::Output {
9439 MagneticFluxDensity{T: T::from(self) / rhs.m2_per_Wb.clone()}
9440 }
9441}
9442#[cfg(feature="num-bigfloat")]
9444impl<T> core::ops::Div<&InverseMagneticFluxDensity<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
9445 type Output = MagneticFluxDensity<T>;
9446 fn div(self, rhs: &InverseMagneticFluxDensity<T>) -> Self::Output {
9447 MagneticFluxDensity{T: T::from(self.clone()) / rhs.m2_per_Wb.clone()}
9448 }
9449}
9450
9451#[cfg(feature="num-complex")]
9454impl<T> core::ops::Div<InverseMagneticFluxDensity<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
9455 type Output = MagneticFluxDensity<T>;
9456 fn div(self, rhs: InverseMagneticFluxDensity<T>) -> Self::Output {
9457 MagneticFluxDensity{T: T::from(self) / rhs.m2_per_Wb}
9458 }
9459}
9460#[cfg(feature="num-complex")]
9462impl<T> core::ops::Div<InverseMagneticFluxDensity<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
9463 type Output = MagneticFluxDensity<T>;
9464 fn div(self, rhs: InverseMagneticFluxDensity<T>) -> Self::Output {
9465 MagneticFluxDensity{T: T::from(self.clone()) / rhs.m2_per_Wb}
9466 }
9467}
9468#[cfg(feature="num-complex")]
9470impl<T> core::ops::Div<&InverseMagneticFluxDensity<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
9471 type Output = MagneticFluxDensity<T>;
9472 fn div(self, rhs: &InverseMagneticFluxDensity<T>) -> Self::Output {
9473 MagneticFluxDensity{T: T::from(self) / rhs.m2_per_Wb.clone()}
9474 }
9475}
9476#[cfg(feature="num-complex")]
9478impl<T> core::ops::Div<&InverseMagneticFluxDensity<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
9479 type Output = MagneticFluxDensity<T>;
9480 fn div(self, rhs: &InverseMagneticFluxDensity<T>) -> Self::Output {
9481 MagneticFluxDensity{T: T::from(self.clone()) / rhs.m2_per_Wb.clone()}
9482 }
9483}
9484
9485#[cfg(feature="num-complex")]
9488impl<T> core::ops::Div<InverseMagneticFluxDensity<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
9489 type Output = MagneticFluxDensity<T>;
9490 fn div(self, rhs: InverseMagneticFluxDensity<T>) -> Self::Output {
9491 MagneticFluxDensity{T: T::from(self) / rhs.m2_per_Wb}
9492 }
9493}
9494#[cfg(feature="num-complex")]
9496impl<T> core::ops::Div<InverseMagneticFluxDensity<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
9497 type Output = MagneticFluxDensity<T>;
9498 fn div(self, rhs: InverseMagneticFluxDensity<T>) -> Self::Output {
9499 MagneticFluxDensity{T: T::from(self.clone()) / rhs.m2_per_Wb}
9500 }
9501}
9502#[cfg(feature="num-complex")]
9504impl<T> core::ops::Div<&InverseMagneticFluxDensity<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
9505 type Output = MagneticFluxDensity<T>;
9506 fn div(self, rhs: &InverseMagneticFluxDensity<T>) -> Self::Output {
9507 MagneticFluxDensity{T: T::from(self) / rhs.m2_per_Wb.clone()}
9508 }
9509}
9510#[cfg(feature="num-complex")]
9512impl<T> core::ops::Div<&InverseMagneticFluxDensity<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
9513 type Output = MagneticFluxDensity<T>;
9514 fn div(self, rhs: &InverseMagneticFluxDensity<T>) -> Self::Output {
9515 MagneticFluxDensity{T: T::from(self.clone()) / rhs.m2_per_Wb.clone()}
9516 }
9517}
9518
9519#[derive(UnitStruct, Debug, Clone)]
9521#[cfg_attr(feature="serde", derive(Serialize, Deserialize))]
9522pub struct InverseVoltage<T: NumLike>{
9523 pub per_V: T
9525}
9526
9527impl<T> InverseVoltage<T> where T: NumLike {
9528
9529 pub fn unit_name() -> &'static str { "inverse volts" }
9531
9532 pub fn unit_symbol() -> &'static str { "1/V" }
9534
9535 pub fn from_per_V(per_V: T) -> Self { InverseVoltage{per_V: per_V} }
9540
9541 pub fn to_per_V(&self) -> T { self.per_V.clone() }
9543
9544 pub fn from_per_volt(per_volt: T) -> Self { InverseVoltage{per_V: per_volt} }
9549
9550 pub fn to_per_volt(&self) -> T { self.per_V.clone() }
9552
9553}
9554
9555impl<T> fmt::Display for InverseVoltage<T> where T: NumLike {
9556 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
9557 write!(f, "{} {}", &self.per_V, Self::unit_symbol())
9558 }
9559}
9560
9561impl<T> InverseVoltage<T> where T: NumLike+From<f64> {
9562
9563 pub fn to_per_mV(&self) -> T {
9567 return self.per_V.clone() * T::from(0.001_f64);
9568 }
9569
9570 pub fn from_per_mV(per_mV: T) -> Self {
9577 InverseVoltage{per_V: per_mV * T::from(1000.0_f64)}
9578 }
9579
9580 pub fn to_per_uV(&self) -> T {
9584 return self.per_V.clone() * T::from(1e-06_f64);
9585 }
9586
9587 pub fn from_per_uV(per_uV: T) -> Self {
9594 InverseVoltage{per_V: per_uV * T::from(1000000.0_f64)}
9595 }
9596
9597 pub fn to_per_nV(&self) -> T {
9601 return self.per_V.clone() * T::from(1e-09_f64);
9602 }
9603
9604 pub fn from_per_nV(per_nV: T) -> Self {
9611 InverseVoltage{per_V: per_nV * T::from(1000000000.0_f64)}
9612 }
9613
9614 pub fn to_per_kV(&self) -> T {
9618 return self.per_V.clone() * T::from(1000.0_f64);
9619 }
9620
9621 pub fn from_per_kV(per_kV: T) -> Self {
9628 InverseVoltage{per_V: per_kV * T::from(0.001_f64)}
9629 }
9630
9631 pub fn to_per_MV(&self) -> T {
9635 return self.per_V.clone() * T::from(1000000.0_f64);
9636 }
9637
9638 pub fn from_per_MV(per_MV: T) -> Self {
9645 InverseVoltage{per_V: per_MV * T::from(1e-06_f64)}
9646 }
9647
9648 pub fn to_per_GV(&self) -> T {
9652 return self.per_V.clone() * T::from(1000000000.0_f64);
9653 }
9654
9655 pub fn from_per_GV(per_GV: T) -> Self {
9662 InverseVoltage{per_V: per_GV * T::from(1e-09_f64)}
9663 }
9664
9665}
9666
9667
9668#[cfg(feature="num-bigfloat")]
9670impl core::ops::Mul<InverseVoltage<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
9671 type Output = InverseVoltage<num_bigfloat::BigFloat>;
9672 fn mul(self, rhs: InverseVoltage<num_bigfloat::BigFloat>) -> Self::Output {
9673 InverseVoltage{per_V: self * rhs.per_V}
9674 }
9675}
9676#[cfg(feature="num-bigfloat")]
9678impl core::ops::Mul<InverseVoltage<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
9679 type Output = InverseVoltage<num_bigfloat::BigFloat>;
9680 fn mul(self, rhs: InverseVoltage<num_bigfloat::BigFloat>) -> Self::Output {
9681 InverseVoltage{per_V: self.clone() * rhs.per_V}
9682 }
9683}
9684#[cfg(feature="num-bigfloat")]
9686impl core::ops::Mul<&InverseVoltage<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
9687 type Output = InverseVoltage<num_bigfloat::BigFloat>;
9688 fn mul(self, rhs: &InverseVoltage<num_bigfloat::BigFloat>) -> Self::Output {
9689 InverseVoltage{per_V: self * rhs.per_V.clone()}
9690 }
9691}
9692#[cfg(feature="num-bigfloat")]
9694impl core::ops::Mul<&InverseVoltage<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
9695 type Output = InverseVoltage<num_bigfloat::BigFloat>;
9696 fn mul(self, rhs: &InverseVoltage<num_bigfloat::BigFloat>) -> Self::Output {
9697 InverseVoltage{per_V: self.clone() * rhs.per_V.clone()}
9698 }
9699}
9700
9701#[cfg(feature="num-complex")]
9703impl core::ops::Mul<InverseVoltage<num_complex::Complex32>> for num_complex::Complex32 {
9704 type Output = InverseVoltage<num_complex::Complex32>;
9705 fn mul(self, rhs: InverseVoltage<num_complex::Complex32>) -> Self::Output {
9706 InverseVoltage{per_V: self * rhs.per_V}
9707 }
9708}
9709#[cfg(feature="num-complex")]
9711impl core::ops::Mul<InverseVoltage<num_complex::Complex32>> for &num_complex::Complex32 {
9712 type Output = InverseVoltage<num_complex::Complex32>;
9713 fn mul(self, rhs: InverseVoltage<num_complex::Complex32>) -> Self::Output {
9714 InverseVoltage{per_V: self.clone() * rhs.per_V}
9715 }
9716}
9717#[cfg(feature="num-complex")]
9719impl core::ops::Mul<&InverseVoltage<num_complex::Complex32>> for num_complex::Complex32 {
9720 type Output = InverseVoltage<num_complex::Complex32>;
9721 fn mul(self, rhs: &InverseVoltage<num_complex::Complex32>) -> Self::Output {
9722 InverseVoltage{per_V: self * rhs.per_V.clone()}
9723 }
9724}
9725#[cfg(feature="num-complex")]
9727impl core::ops::Mul<&InverseVoltage<num_complex::Complex32>> for &num_complex::Complex32 {
9728 type Output = InverseVoltage<num_complex::Complex32>;
9729 fn mul(self, rhs: &InverseVoltage<num_complex::Complex32>) -> Self::Output {
9730 InverseVoltage{per_V: self.clone() * rhs.per_V.clone()}
9731 }
9732}
9733
9734#[cfg(feature="num-complex")]
9736impl core::ops::Mul<InverseVoltage<num_complex::Complex64>> for num_complex::Complex64 {
9737 type Output = InverseVoltage<num_complex::Complex64>;
9738 fn mul(self, rhs: InverseVoltage<num_complex::Complex64>) -> Self::Output {
9739 InverseVoltage{per_V: self * rhs.per_V}
9740 }
9741}
9742#[cfg(feature="num-complex")]
9744impl core::ops::Mul<InverseVoltage<num_complex::Complex64>> for &num_complex::Complex64 {
9745 type Output = InverseVoltage<num_complex::Complex64>;
9746 fn mul(self, rhs: InverseVoltage<num_complex::Complex64>) -> Self::Output {
9747 InverseVoltage{per_V: self.clone() * rhs.per_V}
9748 }
9749}
9750#[cfg(feature="num-complex")]
9752impl core::ops::Mul<&InverseVoltage<num_complex::Complex64>> for num_complex::Complex64 {
9753 type Output = InverseVoltage<num_complex::Complex64>;
9754 fn mul(self, rhs: &InverseVoltage<num_complex::Complex64>) -> Self::Output {
9755 InverseVoltage{per_V: self * rhs.per_V.clone()}
9756 }
9757}
9758#[cfg(feature="num-complex")]
9760impl core::ops::Mul<&InverseVoltage<num_complex::Complex64>> for &num_complex::Complex64 {
9761 type Output = InverseVoltage<num_complex::Complex64>;
9762 fn mul(self, rhs: &InverseVoltage<num_complex::Complex64>) -> Self::Output {
9763 InverseVoltage{per_V: self.clone() * rhs.per_V.clone()}
9764 }
9765}
9766
9767
9768
9769
9770impl<T> core::ops::Mul<Current<T>> for InverseVoltage<T> where T: NumLike {
9773 type Output = Conductance<T>;
9774 fn mul(self, rhs: Current<T>) -> Self::Output {
9775 Conductance{S: self.per_V * rhs.A}
9776 }
9777}
9778impl<T> core::ops::Mul<Current<T>> for &InverseVoltage<T> where T: NumLike {
9780 type Output = Conductance<T>;
9781 fn mul(self, rhs: Current<T>) -> Self::Output {
9782 Conductance{S: self.per_V.clone() * rhs.A}
9783 }
9784}
9785impl<T> core::ops::Mul<&Current<T>> for InverseVoltage<T> where T: NumLike {
9787 type Output = Conductance<T>;
9788 fn mul(self, rhs: &Current<T>) -> Self::Output {
9789 Conductance{S: self.per_V * rhs.A.clone()}
9790 }
9791}
9792impl<T> core::ops::Mul<&Current<T>> for &InverseVoltage<T> where T: NumLike {
9794 type Output = Conductance<T>;
9795 fn mul(self, rhs: &Current<T>) -> Self::Output {
9796 Conductance{S: self.per_V.clone() * rhs.A.clone()}
9797 }
9798}
9799
9800impl<T> core::ops::Div<Current<T>> for InverseVoltage<T> where T: NumLike {
9803 type Output = InversePower<T>;
9804 fn div(self, rhs: Current<T>) -> Self::Output {
9805 InversePower{per_W: self.per_V / rhs.A}
9806 }
9807}
9808impl<T> core::ops::Div<Current<T>> for &InverseVoltage<T> where T: NumLike {
9810 type Output = InversePower<T>;
9811 fn div(self, rhs: Current<T>) -> Self::Output {
9812 InversePower{per_W: self.per_V.clone() / rhs.A}
9813 }
9814}
9815impl<T> core::ops::Div<&Current<T>> for InverseVoltage<T> where T: NumLike {
9817 type Output = InversePower<T>;
9818 fn div(self, rhs: &Current<T>) -> Self::Output {
9819 InversePower{per_W: self.per_V / rhs.A.clone()}
9820 }
9821}
9822impl<T> core::ops::Div<&Current<T>> for &InverseVoltage<T> where T: NumLike {
9824 type Output = InversePower<T>;
9825 fn div(self, rhs: &Current<T>) -> Self::Output {
9826 InversePower{per_W: self.per_V.clone() / rhs.A.clone()}
9827 }
9828}
9829
9830impl<T> core::ops::Mul<InverseCurrent<T>> for InverseVoltage<T> where T: NumLike {
9833 type Output = InversePower<T>;
9834 fn mul(self, rhs: InverseCurrent<T>) -> Self::Output {
9835 InversePower{per_W: self.per_V * rhs.per_A}
9836 }
9837}
9838impl<T> core::ops::Mul<InverseCurrent<T>> for &InverseVoltage<T> where T: NumLike {
9840 type Output = InversePower<T>;
9841 fn mul(self, rhs: InverseCurrent<T>) -> Self::Output {
9842 InversePower{per_W: self.per_V.clone() * rhs.per_A}
9843 }
9844}
9845impl<T> core::ops::Mul<&InverseCurrent<T>> for InverseVoltage<T> where T: NumLike {
9847 type Output = InversePower<T>;
9848 fn mul(self, rhs: &InverseCurrent<T>) -> Self::Output {
9849 InversePower{per_W: self.per_V * rhs.per_A.clone()}
9850 }
9851}
9852impl<T> core::ops::Mul<&InverseCurrent<T>> for &InverseVoltage<T> where T: NumLike {
9854 type Output = InversePower<T>;
9855 fn mul(self, rhs: &InverseCurrent<T>) -> Self::Output {
9856 InversePower{per_W: self.per_V.clone() * rhs.per_A.clone()}
9857 }
9858}
9859
9860impl<T> core::ops::Div<InverseCurrent<T>> for InverseVoltage<T> where T: NumLike {
9863 type Output = Conductance<T>;
9864 fn div(self, rhs: InverseCurrent<T>) -> Self::Output {
9865 Conductance{S: self.per_V / rhs.per_A}
9866 }
9867}
9868impl<T> core::ops::Div<InverseCurrent<T>> for &InverseVoltage<T> where T: NumLike {
9870 type Output = Conductance<T>;
9871 fn div(self, rhs: InverseCurrent<T>) -> Self::Output {
9872 Conductance{S: self.per_V.clone() / rhs.per_A}
9873 }
9874}
9875impl<T> core::ops::Div<&InverseCurrent<T>> for InverseVoltage<T> where T: NumLike {
9877 type Output = Conductance<T>;
9878 fn div(self, rhs: &InverseCurrent<T>) -> Self::Output {
9879 Conductance{S: self.per_V / rhs.per_A.clone()}
9880 }
9881}
9882impl<T> core::ops::Div<&InverseCurrent<T>> for &InverseVoltage<T> where T: NumLike {
9884 type Output = Conductance<T>;
9885 fn div(self, rhs: &InverseCurrent<T>) -> Self::Output {
9886 Conductance{S: self.per_V.clone() / rhs.per_A.clone()}
9887 }
9888}
9889
9890impl<T> core::ops::Div<Time<T>> for InverseVoltage<T> where T: NumLike {
9893 type Output = InverseMagneticFlux<T>;
9894 fn div(self, rhs: Time<T>) -> Self::Output {
9895 InverseMagneticFlux{per_Wb: self.per_V / rhs.s}
9896 }
9897}
9898impl<T> core::ops::Div<Time<T>> for &InverseVoltage<T> where T: NumLike {
9900 type Output = InverseMagneticFlux<T>;
9901 fn div(self, rhs: Time<T>) -> Self::Output {
9902 InverseMagneticFlux{per_Wb: self.per_V.clone() / rhs.s}
9903 }
9904}
9905impl<T> core::ops::Div<&Time<T>> for InverseVoltage<T> where T: NumLike {
9907 type Output = InverseMagneticFlux<T>;
9908 fn div(self, rhs: &Time<T>) -> Self::Output {
9909 InverseMagneticFlux{per_Wb: self.per_V / rhs.s.clone()}
9910 }
9911}
9912impl<T> core::ops::Div<&Time<T>> for &InverseVoltage<T> where T: NumLike {
9914 type Output = InverseMagneticFlux<T>;
9915 fn div(self, rhs: &Time<T>) -> Self::Output {
9916 InverseMagneticFlux{per_Wb: self.per_V.clone() / rhs.s.clone()}
9917 }
9918}
9919
9920impl<T> core::ops::Div<Capacitance<T>> for InverseVoltage<T> where T: NumLike {
9923 type Output = InverseCharge<T>;
9924 fn div(self, rhs: Capacitance<T>) -> Self::Output {
9925 InverseCharge{per_C: self.per_V / rhs.F}
9926 }
9927}
9928impl<T> core::ops::Div<Capacitance<T>> for &InverseVoltage<T> where T: NumLike {
9930 type Output = InverseCharge<T>;
9931 fn div(self, rhs: Capacitance<T>) -> Self::Output {
9932 InverseCharge{per_C: self.per_V.clone() / rhs.F}
9933 }
9934}
9935impl<T> core::ops::Div<&Capacitance<T>> for InverseVoltage<T> where T: NumLike {
9937 type Output = InverseCharge<T>;
9938 fn div(self, rhs: &Capacitance<T>) -> Self::Output {
9939 InverseCharge{per_C: self.per_V / rhs.F.clone()}
9940 }
9941}
9942impl<T> core::ops::Div<&Capacitance<T>> for &InverseVoltage<T> where T: NumLike {
9944 type Output = InverseCharge<T>;
9945 fn div(self, rhs: &Capacitance<T>) -> Self::Output {
9946 InverseCharge{per_C: self.per_V.clone() / rhs.F.clone()}
9947 }
9948}
9949
9950impl<T> core::ops::Mul<Charge<T>> for InverseVoltage<T> where T: NumLike {
9953 type Output = Capacitance<T>;
9954 fn mul(self, rhs: Charge<T>) -> Self::Output {
9955 Capacitance{F: self.per_V * rhs.C}
9956 }
9957}
9958impl<T> core::ops::Mul<Charge<T>> for &InverseVoltage<T> where T: NumLike {
9960 type Output = Capacitance<T>;
9961 fn mul(self, rhs: Charge<T>) -> Self::Output {
9962 Capacitance{F: self.per_V.clone() * rhs.C}
9963 }
9964}
9965impl<T> core::ops::Mul<&Charge<T>> for InverseVoltage<T> where T: NumLike {
9967 type Output = Capacitance<T>;
9968 fn mul(self, rhs: &Charge<T>) -> Self::Output {
9969 Capacitance{F: self.per_V * rhs.C.clone()}
9970 }
9971}
9972impl<T> core::ops::Mul<&Charge<T>> for &InverseVoltage<T> where T: NumLike {
9974 type Output = Capacitance<T>;
9975 fn mul(self, rhs: &Charge<T>) -> Self::Output {
9976 Capacitance{F: self.per_V.clone() * rhs.C.clone()}
9977 }
9978}
9979
9980impl<T> core::ops::Div<Charge<T>> for InverseVoltage<T> where T: NumLike {
9983 type Output = InverseEnergy<T>;
9984 fn div(self, rhs: Charge<T>) -> Self::Output {
9985 InverseEnergy{per_J: self.per_V / rhs.C}
9986 }
9987}
9988impl<T> core::ops::Div<Charge<T>> for &InverseVoltage<T> where T: NumLike {
9990 type Output = InverseEnergy<T>;
9991 fn div(self, rhs: Charge<T>) -> Self::Output {
9992 InverseEnergy{per_J: self.per_V.clone() / rhs.C}
9993 }
9994}
9995impl<T> core::ops::Div<&Charge<T>> for InverseVoltage<T> where T: NumLike {
9997 type Output = InverseEnergy<T>;
9998 fn div(self, rhs: &Charge<T>) -> Self::Output {
9999 InverseEnergy{per_J: self.per_V / rhs.C.clone()}
10000 }
10001}
10002impl<T> core::ops::Div<&Charge<T>> for &InverseVoltage<T> where T: NumLike {
10004 type Output = InverseEnergy<T>;
10005 fn div(self, rhs: &Charge<T>) -> Self::Output {
10006 InverseEnergy{per_J: self.per_V.clone() / rhs.C.clone()}
10007 }
10008}
10009
10010impl<T> core::ops::Div<Conductance<T>> for InverseVoltage<T> where T: NumLike {
10013 type Output = InverseCurrent<T>;
10014 fn div(self, rhs: Conductance<T>) -> Self::Output {
10015 InverseCurrent{per_A: self.per_V / rhs.S}
10016 }
10017}
10018impl<T> core::ops::Div<Conductance<T>> for &InverseVoltage<T> where T: NumLike {
10020 type Output = InverseCurrent<T>;
10021 fn div(self, rhs: Conductance<T>) -> Self::Output {
10022 InverseCurrent{per_A: self.per_V.clone() / rhs.S}
10023 }
10024}
10025impl<T> core::ops::Div<&Conductance<T>> for InverseVoltage<T> where T: NumLike {
10027 type Output = InverseCurrent<T>;
10028 fn div(self, rhs: &Conductance<T>) -> Self::Output {
10029 InverseCurrent{per_A: self.per_V / rhs.S.clone()}
10030 }
10031}
10032impl<T> core::ops::Div<&Conductance<T>> for &InverseVoltage<T> where T: NumLike {
10034 type Output = InverseCurrent<T>;
10035 fn div(self, rhs: &Conductance<T>) -> Self::Output {
10036 InverseCurrent{per_A: self.per_V.clone() / rhs.S.clone()}
10037 }
10038}
10039
10040impl<T> core::ops::Mul<Elastance<T>> for InverseVoltage<T> where T: NumLike {
10043 type Output = InverseCharge<T>;
10044 fn mul(self, rhs: Elastance<T>) -> Self::Output {
10045 InverseCharge{per_C: self.per_V * rhs.per_F}
10046 }
10047}
10048impl<T> core::ops::Mul<Elastance<T>> for &InverseVoltage<T> where T: NumLike {
10050 type Output = InverseCharge<T>;
10051 fn mul(self, rhs: Elastance<T>) -> Self::Output {
10052 InverseCharge{per_C: self.per_V.clone() * rhs.per_F}
10053 }
10054}
10055impl<T> core::ops::Mul<&Elastance<T>> for InverseVoltage<T> where T: NumLike {
10057 type Output = InverseCharge<T>;
10058 fn mul(self, rhs: &Elastance<T>) -> Self::Output {
10059 InverseCharge{per_C: self.per_V * rhs.per_F.clone()}
10060 }
10061}
10062impl<T> core::ops::Mul<&Elastance<T>> for &InverseVoltage<T> where T: NumLike {
10064 type Output = InverseCharge<T>;
10065 fn mul(self, rhs: &Elastance<T>) -> Self::Output {
10066 InverseCharge{per_C: self.per_V.clone() * rhs.per_F.clone()}
10067 }
10068}
10069
10070impl<T> core::ops::Mul<InverseCharge<T>> for InverseVoltage<T> where T: NumLike {
10073 type Output = InverseEnergy<T>;
10074 fn mul(self, rhs: InverseCharge<T>) -> Self::Output {
10075 InverseEnergy{per_J: self.per_V * rhs.per_C}
10076 }
10077}
10078impl<T> core::ops::Mul<InverseCharge<T>> for &InverseVoltage<T> where T: NumLike {
10080 type Output = InverseEnergy<T>;
10081 fn mul(self, rhs: InverseCharge<T>) -> Self::Output {
10082 InverseEnergy{per_J: self.per_V.clone() * rhs.per_C}
10083 }
10084}
10085impl<T> core::ops::Mul<&InverseCharge<T>> for InverseVoltage<T> where T: NumLike {
10087 type Output = InverseEnergy<T>;
10088 fn mul(self, rhs: &InverseCharge<T>) -> Self::Output {
10089 InverseEnergy{per_J: self.per_V * rhs.per_C.clone()}
10090 }
10091}
10092impl<T> core::ops::Mul<&InverseCharge<T>> for &InverseVoltage<T> where T: NumLike {
10094 type Output = InverseEnergy<T>;
10095 fn mul(self, rhs: &InverseCharge<T>) -> Self::Output {
10096 InverseEnergy{per_J: self.per_V.clone() * rhs.per_C.clone()}
10097 }
10098}
10099
10100impl<T> core::ops::Div<InverseCharge<T>> for InverseVoltage<T> where T: NumLike {
10103 type Output = Capacitance<T>;
10104 fn div(self, rhs: InverseCharge<T>) -> Self::Output {
10105 Capacitance{F: self.per_V / rhs.per_C}
10106 }
10107}
10108impl<T> core::ops::Div<InverseCharge<T>> for &InverseVoltage<T> where T: NumLike {
10110 type Output = Capacitance<T>;
10111 fn div(self, rhs: InverseCharge<T>) -> Self::Output {
10112 Capacitance{F: self.per_V.clone() / rhs.per_C}
10113 }
10114}
10115impl<T> core::ops::Div<&InverseCharge<T>> for InverseVoltage<T> where T: NumLike {
10117 type Output = Capacitance<T>;
10118 fn div(self, rhs: &InverseCharge<T>) -> Self::Output {
10119 Capacitance{F: self.per_V / rhs.per_C.clone()}
10120 }
10121}
10122impl<T> core::ops::Div<&InverseCharge<T>> for &InverseVoltage<T> where T: NumLike {
10124 type Output = Capacitance<T>;
10125 fn div(self, rhs: &InverseCharge<T>) -> Self::Output {
10126 Capacitance{F: self.per_V.clone() / rhs.per_C.clone()}
10127 }
10128}
10129
10130impl<T> core::ops::Div<InverseMagneticFlux<T>> for InverseVoltage<T> where T: NumLike {
10133 type Output = Time<T>;
10134 fn div(self, rhs: InverseMagneticFlux<T>) -> Self::Output {
10135 Time{s: self.per_V / rhs.per_Wb}
10136 }
10137}
10138impl<T> core::ops::Div<InverseMagneticFlux<T>> for &InverseVoltage<T> where T: NumLike {
10140 type Output = Time<T>;
10141 fn div(self, rhs: InverseMagneticFlux<T>) -> Self::Output {
10142 Time{s: self.per_V.clone() / rhs.per_Wb}
10143 }
10144}
10145impl<T> core::ops::Div<&InverseMagneticFlux<T>> for InverseVoltage<T> where T: NumLike {
10147 type Output = Time<T>;
10148 fn div(self, rhs: &InverseMagneticFlux<T>) -> Self::Output {
10149 Time{s: self.per_V / rhs.per_Wb.clone()}
10150 }
10151}
10152impl<T> core::ops::Div<&InverseMagneticFlux<T>> for &InverseVoltage<T> where T: NumLike {
10154 type Output = Time<T>;
10155 fn div(self, rhs: &InverseMagneticFlux<T>) -> Self::Output {
10156 Time{s: self.per_V.clone() / rhs.per_Wb.clone()}
10157 }
10158}
10159
10160impl<T> core::ops::Mul<MagneticFlux<T>> for InverseVoltage<T> where T: NumLike {
10163 type Output = Time<T>;
10164 fn mul(self, rhs: MagneticFlux<T>) -> Self::Output {
10165 Time{s: self.per_V * rhs.Wb}
10166 }
10167}
10168impl<T> core::ops::Mul<MagneticFlux<T>> for &InverseVoltage<T> where T: NumLike {
10170 type Output = Time<T>;
10171 fn mul(self, rhs: MagneticFlux<T>) -> Self::Output {
10172 Time{s: self.per_V.clone() * rhs.Wb}
10173 }
10174}
10175impl<T> core::ops::Mul<&MagneticFlux<T>> for InverseVoltage<T> where T: NumLike {
10177 type Output = Time<T>;
10178 fn mul(self, rhs: &MagneticFlux<T>) -> Self::Output {
10179 Time{s: self.per_V * rhs.Wb.clone()}
10180 }
10181}
10182impl<T> core::ops::Mul<&MagneticFlux<T>> for &InverseVoltage<T> where T: NumLike {
10184 type Output = Time<T>;
10185 fn mul(self, rhs: &MagneticFlux<T>) -> Self::Output {
10186 Time{s: self.per_V.clone() * rhs.Wb.clone()}
10187 }
10188}
10189
10190impl<T> core::ops::Mul<Resistance<T>> for InverseVoltage<T> where T: NumLike {
10193 type Output = InverseCurrent<T>;
10194 fn mul(self, rhs: Resistance<T>) -> Self::Output {
10195 InverseCurrent{per_A: self.per_V * rhs.Ohm}
10196 }
10197}
10198impl<T> core::ops::Mul<Resistance<T>> for &InverseVoltage<T> where T: NumLike {
10200 type Output = InverseCurrent<T>;
10201 fn mul(self, rhs: Resistance<T>) -> Self::Output {
10202 InverseCurrent{per_A: self.per_V.clone() * rhs.Ohm}
10203 }
10204}
10205impl<T> core::ops::Mul<&Resistance<T>> for InverseVoltage<T> where T: NumLike {
10207 type Output = InverseCurrent<T>;
10208 fn mul(self, rhs: &Resistance<T>) -> Self::Output {
10209 InverseCurrent{per_A: self.per_V * rhs.Ohm.clone()}
10210 }
10211}
10212impl<T> core::ops::Mul<&Resistance<T>> for &InverseVoltage<T> where T: NumLike {
10214 type Output = InverseCurrent<T>;
10215 fn mul(self, rhs: &Resistance<T>) -> Self::Output {
10216 InverseCurrent{per_A: self.per_V.clone() * rhs.Ohm.clone()}
10217 }
10218}
10219
10220impl<T> core::ops::Mul<Energy<T>> for InverseVoltage<T> where T: NumLike {
10223 type Output = Charge<T>;
10224 fn mul(self, rhs: Energy<T>) -> Self::Output {
10225 Charge{C: self.per_V * rhs.J}
10226 }
10227}
10228impl<T> core::ops::Mul<Energy<T>> for &InverseVoltage<T> where T: NumLike {
10230 type Output = Charge<T>;
10231 fn mul(self, rhs: Energy<T>) -> Self::Output {
10232 Charge{C: self.per_V.clone() * rhs.J}
10233 }
10234}
10235impl<T> core::ops::Mul<&Energy<T>> for InverseVoltage<T> where T: NumLike {
10237 type Output = Charge<T>;
10238 fn mul(self, rhs: &Energy<T>) -> Self::Output {
10239 Charge{C: self.per_V * rhs.J.clone()}
10240 }
10241}
10242impl<T> core::ops::Mul<&Energy<T>> for &InverseVoltage<T> where T: NumLike {
10244 type Output = Charge<T>;
10245 fn mul(self, rhs: &Energy<T>) -> Self::Output {
10246 Charge{C: self.per_V.clone() * rhs.J.clone()}
10247 }
10248}
10249
10250impl<T> core::ops::Mul<Torque<T>> for InverseVoltage<T> where T: NumLike {
10253 type Output = Charge<T>;
10254 fn mul(self, rhs: Torque<T>) -> Self::Output {
10255 Charge{C: self.per_V * rhs.Nm}
10256 }
10257}
10258impl<T> core::ops::Mul<Torque<T>> for &InverseVoltage<T> where T: NumLike {
10260 type Output = Charge<T>;
10261 fn mul(self, rhs: Torque<T>) -> Self::Output {
10262 Charge{C: self.per_V.clone() * rhs.Nm}
10263 }
10264}
10265impl<T> core::ops::Mul<&Torque<T>> for InverseVoltage<T> where T: NumLike {
10267 type Output = Charge<T>;
10268 fn mul(self, rhs: &Torque<T>) -> Self::Output {
10269 Charge{C: self.per_V * rhs.Nm.clone()}
10270 }
10271}
10272impl<T> core::ops::Mul<&Torque<T>> for &InverseVoltage<T> where T: NumLike {
10274 type Output = Charge<T>;
10275 fn mul(self, rhs: &Torque<T>) -> Self::Output {
10276 Charge{C: self.per_V.clone() * rhs.Nm.clone()}
10277 }
10278}
10279
10280impl<T> core::ops::Mul<Frequency<T>> for InverseVoltage<T> where T: NumLike {
10283 type Output = InverseMagneticFlux<T>;
10284 fn mul(self, rhs: Frequency<T>) -> Self::Output {
10285 InverseMagneticFlux{per_Wb: self.per_V * rhs.Hz}
10286 }
10287}
10288impl<T> core::ops::Mul<Frequency<T>> for &InverseVoltage<T> where T: NumLike {
10290 type Output = InverseMagneticFlux<T>;
10291 fn mul(self, rhs: Frequency<T>) -> Self::Output {
10292 InverseMagneticFlux{per_Wb: self.per_V.clone() * rhs.Hz}
10293 }
10294}
10295impl<T> core::ops::Mul<&Frequency<T>> for InverseVoltage<T> where T: NumLike {
10297 type Output = InverseMagneticFlux<T>;
10298 fn mul(self, rhs: &Frequency<T>) -> Self::Output {
10299 InverseMagneticFlux{per_Wb: self.per_V * rhs.Hz.clone()}
10300 }
10301}
10302impl<T> core::ops::Mul<&Frequency<T>> for &InverseVoltage<T> where T: NumLike {
10304 type Output = InverseMagneticFlux<T>;
10305 fn mul(self, rhs: &Frequency<T>) -> Self::Output {
10306 InverseMagneticFlux{per_Wb: self.per_V.clone() * rhs.Hz.clone()}
10307 }
10308}
10309
10310impl<T> core::ops::Div<InverseEnergy<T>> for InverseVoltage<T> where T: NumLike {
10313 type Output = Charge<T>;
10314 fn div(self, rhs: InverseEnergy<T>) -> Self::Output {
10315 Charge{C: self.per_V / rhs.per_J}
10316 }
10317}
10318impl<T> core::ops::Div<InverseEnergy<T>> for &InverseVoltage<T> where T: NumLike {
10320 type Output = Charge<T>;
10321 fn div(self, rhs: InverseEnergy<T>) -> Self::Output {
10322 Charge{C: self.per_V.clone() / rhs.per_J}
10323 }
10324}
10325impl<T> core::ops::Div<&InverseEnergy<T>> for InverseVoltage<T> where T: NumLike {
10327 type Output = Charge<T>;
10328 fn div(self, rhs: &InverseEnergy<T>) -> Self::Output {
10329 Charge{C: self.per_V / rhs.per_J.clone()}
10330 }
10331}
10332impl<T> core::ops::Div<&InverseEnergy<T>> for &InverseVoltage<T> where T: NumLike {
10334 type Output = Charge<T>;
10335 fn div(self, rhs: &InverseEnergy<T>) -> Self::Output {
10336 Charge{C: self.per_V.clone() / rhs.per_J.clone()}
10337 }
10338}
10339
10340impl<T> core::ops::Div<InverseTorque<T>> for InverseVoltage<T> where T: NumLike {
10343 type Output = Charge<T>;
10344 fn div(self, rhs: InverseTorque<T>) -> Self::Output {
10345 Charge{C: self.per_V / rhs.per_Nm}
10346 }
10347}
10348impl<T> core::ops::Div<InverseTorque<T>> for &InverseVoltage<T> where T: NumLike {
10350 type Output = Charge<T>;
10351 fn div(self, rhs: InverseTorque<T>) -> Self::Output {
10352 Charge{C: self.per_V.clone() / rhs.per_Nm}
10353 }
10354}
10355impl<T> core::ops::Div<&InverseTorque<T>> for InverseVoltage<T> where T: NumLike {
10357 type Output = Charge<T>;
10358 fn div(self, rhs: &InverseTorque<T>) -> Self::Output {
10359 Charge{C: self.per_V / rhs.per_Nm.clone()}
10360 }
10361}
10362impl<T> core::ops::Div<&InverseTorque<T>> for &InverseVoltage<T> where T: NumLike {
10364 type Output = Charge<T>;
10365 fn div(self, rhs: &InverseTorque<T>) -> Self::Output {
10366 Charge{C: self.per_V.clone() / rhs.per_Nm.clone()}
10367 }
10368}
10369
10370impl<T> core::ops::Div<InversePower<T>> for InverseVoltage<T> where T: NumLike {
10373 type Output = Current<T>;
10374 fn div(self, rhs: InversePower<T>) -> Self::Output {
10375 Current{A: self.per_V / rhs.per_W}
10376 }
10377}
10378impl<T> core::ops::Div<InversePower<T>> for &InverseVoltage<T> where T: NumLike {
10380 type Output = Current<T>;
10381 fn div(self, rhs: InversePower<T>) -> Self::Output {
10382 Current{A: self.per_V.clone() / rhs.per_W}
10383 }
10384}
10385impl<T> core::ops::Div<&InversePower<T>> for InverseVoltage<T> where T: NumLike {
10387 type Output = Current<T>;
10388 fn div(self, rhs: &InversePower<T>) -> Self::Output {
10389 Current{A: self.per_V / rhs.per_W.clone()}
10390 }
10391}
10392impl<T> core::ops::Div<&InversePower<T>> for &InverseVoltage<T> where T: NumLike {
10394 type Output = Current<T>;
10395 fn div(self, rhs: &InversePower<T>) -> Self::Output {
10396 Current{A: self.per_V.clone() / rhs.per_W.clone()}
10397 }
10398}
10399
10400impl<T> core::ops::Mul<Power<T>> for InverseVoltage<T> where T: NumLike {
10403 type Output = Current<T>;
10404 fn mul(self, rhs: Power<T>) -> Self::Output {
10405 Current{A: self.per_V * rhs.W}
10406 }
10407}
10408impl<T> core::ops::Mul<Power<T>> for &InverseVoltage<T> where T: NumLike {
10410 type Output = Current<T>;
10411 fn mul(self, rhs: Power<T>) -> Self::Output {
10412 Current{A: self.per_V.clone() * rhs.W}
10413 }
10414}
10415impl<T> core::ops::Mul<&Power<T>> for InverseVoltage<T> where T: NumLike {
10417 type Output = Current<T>;
10418 fn mul(self, rhs: &Power<T>) -> Self::Output {
10419 Current{A: self.per_V * rhs.W.clone()}
10420 }
10421}
10422impl<T> core::ops::Mul<&Power<T>> for &InverseVoltage<T> where T: NumLike {
10424 type Output = Current<T>;
10425 fn mul(self, rhs: &Power<T>) -> Self::Output {
10426 Current{A: self.per_V.clone() * rhs.W.clone()}
10427 }
10428}
10429
10430impl<T> core::ops::Div<InverseVoltage<T>> for f64 where T: NumLike+From<f64> {
10433 type Output = Voltage<T>;
10434 fn div(self, rhs: InverseVoltage<T>) -> Self::Output {
10435 Voltage{V: T::from(self) / rhs.per_V}
10436 }
10437}
10438impl<T> core::ops::Div<InverseVoltage<T>> for &f64 where T: NumLike+From<f64> {
10440 type Output = Voltage<T>;
10441 fn div(self, rhs: InverseVoltage<T>) -> Self::Output {
10442 Voltage{V: T::from(self.clone()) / rhs.per_V}
10443 }
10444}
10445impl<T> core::ops::Div<&InverseVoltage<T>> for f64 where T: NumLike+From<f64> {
10447 type Output = Voltage<T>;
10448 fn div(self, rhs: &InverseVoltage<T>) -> Self::Output {
10449 Voltage{V: T::from(self) / rhs.per_V.clone()}
10450 }
10451}
10452impl<T> core::ops::Div<&InverseVoltage<T>> for &f64 where T: NumLike+From<f64> {
10454 type Output = Voltage<T>;
10455 fn div(self, rhs: &InverseVoltage<T>) -> Self::Output {
10456 Voltage{V: T::from(self.clone()) / rhs.per_V.clone()}
10457 }
10458}
10459
10460impl<T> core::ops::Div<InverseVoltage<T>> for f32 where T: NumLike+From<f32> {
10463 type Output = Voltage<T>;
10464 fn div(self, rhs: InverseVoltage<T>) -> Self::Output {
10465 Voltage{V: T::from(self) / rhs.per_V}
10466 }
10467}
10468impl<T> core::ops::Div<InverseVoltage<T>> for &f32 where T: NumLike+From<f32> {
10470 type Output = Voltage<T>;
10471 fn div(self, rhs: InverseVoltage<T>) -> Self::Output {
10472 Voltage{V: T::from(self.clone()) / rhs.per_V}
10473 }
10474}
10475impl<T> core::ops::Div<&InverseVoltage<T>> for f32 where T: NumLike+From<f32> {
10477 type Output = Voltage<T>;
10478 fn div(self, rhs: &InverseVoltage<T>) -> Self::Output {
10479 Voltage{V: T::from(self) / rhs.per_V.clone()}
10480 }
10481}
10482impl<T> core::ops::Div<&InverseVoltage<T>> for &f32 where T: NumLike+From<f32> {
10484 type Output = Voltage<T>;
10485 fn div(self, rhs: &InverseVoltage<T>) -> Self::Output {
10486 Voltage{V: T::from(self.clone()) / rhs.per_V.clone()}
10487 }
10488}
10489
10490impl<T> core::ops::Div<InverseVoltage<T>> for i64 where T: NumLike+From<i64> {
10493 type Output = Voltage<T>;
10494 fn div(self, rhs: InverseVoltage<T>) -> Self::Output {
10495 Voltage{V: T::from(self) / rhs.per_V}
10496 }
10497}
10498impl<T> core::ops::Div<InverseVoltage<T>> for &i64 where T: NumLike+From<i64> {
10500 type Output = Voltage<T>;
10501 fn div(self, rhs: InverseVoltage<T>) -> Self::Output {
10502 Voltage{V: T::from(self.clone()) / rhs.per_V}
10503 }
10504}
10505impl<T> core::ops::Div<&InverseVoltage<T>> for i64 where T: NumLike+From<i64> {
10507 type Output = Voltage<T>;
10508 fn div(self, rhs: &InverseVoltage<T>) -> Self::Output {
10509 Voltage{V: T::from(self) / rhs.per_V.clone()}
10510 }
10511}
10512impl<T> core::ops::Div<&InverseVoltage<T>> for &i64 where T: NumLike+From<i64> {
10514 type Output = Voltage<T>;
10515 fn div(self, rhs: &InverseVoltage<T>) -> Self::Output {
10516 Voltage{V: T::from(self.clone()) / rhs.per_V.clone()}
10517 }
10518}
10519
10520impl<T> core::ops::Div<InverseVoltage<T>> for i32 where T: NumLike+From<i32> {
10523 type Output = Voltage<T>;
10524 fn div(self, rhs: InverseVoltage<T>) -> Self::Output {
10525 Voltage{V: T::from(self) / rhs.per_V}
10526 }
10527}
10528impl<T> core::ops::Div<InverseVoltage<T>> for &i32 where T: NumLike+From<i32> {
10530 type Output = Voltage<T>;
10531 fn div(self, rhs: InverseVoltage<T>) -> Self::Output {
10532 Voltage{V: T::from(self.clone()) / rhs.per_V}
10533 }
10534}
10535impl<T> core::ops::Div<&InverseVoltage<T>> for i32 where T: NumLike+From<i32> {
10537 type Output = Voltage<T>;
10538 fn div(self, rhs: &InverseVoltage<T>) -> Self::Output {
10539 Voltage{V: T::from(self) / rhs.per_V.clone()}
10540 }
10541}
10542impl<T> core::ops::Div<&InverseVoltage<T>> for &i32 where T: NumLike+From<i32> {
10544 type Output = Voltage<T>;
10545 fn div(self, rhs: &InverseVoltage<T>) -> Self::Output {
10546 Voltage{V: T::from(self.clone()) / rhs.per_V.clone()}
10547 }
10548}
10549
10550#[cfg(feature="num-bigfloat")]
10553impl<T> core::ops::Div<InverseVoltage<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
10554 type Output = Voltage<T>;
10555 fn div(self, rhs: InverseVoltage<T>) -> Self::Output {
10556 Voltage{V: T::from(self) / rhs.per_V}
10557 }
10558}
10559#[cfg(feature="num-bigfloat")]
10561impl<T> core::ops::Div<InverseVoltage<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
10562 type Output = Voltage<T>;
10563 fn div(self, rhs: InverseVoltage<T>) -> Self::Output {
10564 Voltage{V: T::from(self.clone()) / rhs.per_V}
10565 }
10566}
10567#[cfg(feature="num-bigfloat")]
10569impl<T> core::ops::Div<&InverseVoltage<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
10570 type Output = Voltage<T>;
10571 fn div(self, rhs: &InverseVoltage<T>) -> Self::Output {
10572 Voltage{V: T::from(self) / rhs.per_V.clone()}
10573 }
10574}
10575#[cfg(feature="num-bigfloat")]
10577impl<T> core::ops::Div<&InverseVoltage<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
10578 type Output = Voltage<T>;
10579 fn div(self, rhs: &InverseVoltage<T>) -> Self::Output {
10580 Voltage{V: T::from(self.clone()) / rhs.per_V.clone()}
10581 }
10582}
10583
10584#[cfg(feature="num-complex")]
10587impl<T> core::ops::Div<InverseVoltage<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
10588 type Output = Voltage<T>;
10589 fn div(self, rhs: InverseVoltage<T>) -> Self::Output {
10590 Voltage{V: T::from(self) / rhs.per_V}
10591 }
10592}
10593#[cfg(feature="num-complex")]
10595impl<T> core::ops::Div<InverseVoltage<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
10596 type Output = Voltage<T>;
10597 fn div(self, rhs: InverseVoltage<T>) -> Self::Output {
10598 Voltage{V: T::from(self.clone()) / rhs.per_V}
10599 }
10600}
10601#[cfg(feature="num-complex")]
10603impl<T> core::ops::Div<&InverseVoltage<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
10604 type Output = Voltage<T>;
10605 fn div(self, rhs: &InverseVoltage<T>) -> Self::Output {
10606 Voltage{V: T::from(self) / rhs.per_V.clone()}
10607 }
10608}
10609#[cfg(feature="num-complex")]
10611impl<T> core::ops::Div<&InverseVoltage<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
10612 type Output = Voltage<T>;
10613 fn div(self, rhs: &InverseVoltage<T>) -> Self::Output {
10614 Voltage{V: T::from(self.clone()) / rhs.per_V.clone()}
10615 }
10616}
10617
10618#[cfg(feature="num-complex")]
10621impl<T> core::ops::Div<InverseVoltage<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
10622 type Output = Voltage<T>;
10623 fn div(self, rhs: InverseVoltage<T>) -> Self::Output {
10624 Voltage{V: T::from(self) / rhs.per_V}
10625 }
10626}
10627#[cfg(feature="num-complex")]
10629impl<T> core::ops::Div<InverseVoltage<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
10630 type Output = Voltage<T>;
10631 fn div(self, rhs: InverseVoltage<T>) -> Self::Output {
10632 Voltage{V: T::from(self.clone()) / rhs.per_V}
10633 }
10634}
10635#[cfg(feature="num-complex")]
10637impl<T> core::ops::Div<&InverseVoltage<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
10638 type Output = Voltage<T>;
10639 fn div(self, rhs: &InverseVoltage<T>) -> Self::Output {
10640 Voltage{V: T::from(self) / rhs.per_V.clone()}
10641 }
10642}
10643#[cfg(feature="num-complex")]
10645impl<T> core::ops::Div<&InverseVoltage<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
10646 type Output = Voltage<T>;
10647 fn div(self, rhs: &InverseVoltage<T>) -> Self::Output {
10648 Voltage{V: T::from(self.clone()) / rhs.per_V.clone()}
10649 }
10650}
10651
10652#[derive(UnitStruct, Debug, Clone)]
10654#[cfg_attr(feature="serde", derive(Serialize, Deserialize))]
10655pub struct LuminousFlux<T: NumLike>{
10656 pub lm: T
10658}
10659
10660impl<T> LuminousFlux<T> where T: NumLike {
10661
10662 pub fn unit_name() -> &'static str { "lumens" }
10664
10665 pub fn unit_symbol() -> &'static str { "lm" }
10667
10668 pub fn from_lm(lm: T) -> Self { LuminousFlux{lm: lm} }
10673
10674 pub fn to_lm(&self) -> T { self.lm.clone() }
10676
10677 pub fn from_lumens(lumens: T) -> Self { LuminousFlux{lm: lumens} }
10682
10683 pub fn to_lumens(&self) -> T { self.lm.clone() }
10685
10686}
10687
10688impl<T> fmt::Display for LuminousFlux<T> where T: NumLike {
10689 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
10690 write!(f, "{} {}", &self.lm, Self::unit_symbol())
10691 }
10692}
10693
10694impl<T> LuminousFlux<T> where T: NumLike+From<f64> {
10695
10696 pub fn to_mlm(&self) -> T {
10700 return self.lm.clone() * T::from(1000.0_f64);
10701 }
10702
10703 pub fn from_mlm(mlm: T) -> Self {
10710 LuminousFlux{lm: mlm * T::from(0.001_f64)}
10711 }
10712
10713 pub fn to_ulm(&self) -> T {
10717 return self.lm.clone() * T::from(1000000.0_f64);
10718 }
10719
10720 pub fn from_ulm(ulm: T) -> Self {
10727 LuminousFlux{lm: ulm * T::from(1e-06_f64)}
10728 }
10729
10730 pub fn to_nlm(&self) -> T {
10734 return self.lm.clone() * T::from(1000000000.0_f64);
10735 }
10736
10737 pub fn from_nlm(nlm: T) -> Self {
10744 LuminousFlux{lm: nlm * T::from(1e-09_f64)}
10745 }
10746
10747 pub fn to_klm(&self) -> T {
10751 return self.lm.clone() * T::from(0.001_f64);
10752 }
10753
10754 pub fn from_klm(klm: T) -> Self {
10761 LuminousFlux{lm: klm * T::from(1000.0_f64)}
10762 }
10763
10764 pub fn to_Mlm(&self) -> T {
10768 return self.lm.clone() * T::from(1e-06_f64);
10769 }
10770
10771 pub fn from_Mlm(Mlm: T) -> Self {
10778 LuminousFlux{lm: Mlm * T::from(1000000.0_f64)}
10779 }
10780
10781 pub fn to_Glm(&self) -> T {
10785 return self.lm.clone() * T::from(1e-09_f64);
10786 }
10787
10788 pub fn from_Glm(Glm: T) -> Self {
10795 LuminousFlux{lm: Glm * T::from(1000000000.0_f64)}
10796 }
10797
10798}
10799
10800
10801#[cfg(feature="num-bigfloat")]
10803impl core::ops::Mul<LuminousFlux<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
10804 type Output = LuminousFlux<num_bigfloat::BigFloat>;
10805 fn mul(self, rhs: LuminousFlux<num_bigfloat::BigFloat>) -> Self::Output {
10806 LuminousFlux{lm: self * rhs.lm}
10807 }
10808}
10809#[cfg(feature="num-bigfloat")]
10811impl core::ops::Mul<LuminousFlux<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
10812 type Output = LuminousFlux<num_bigfloat::BigFloat>;
10813 fn mul(self, rhs: LuminousFlux<num_bigfloat::BigFloat>) -> Self::Output {
10814 LuminousFlux{lm: self.clone() * rhs.lm}
10815 }
10816}
10817#[cfg(feature="num-bigfloat")]
10819impl core::ops::Mul<&LuminousFlux<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
10820 type Output = LuminousFlux<num_bigfloat::BigFloat>;
10821 fn mul(self, rhs: &LuminousFlux<num_bigfloat::BigFloat>) -> Self::Output {
10822 LuminousFlux{lm: self * rhs.lm.clone()}
10823 }
10824}
10825#[cfg(feature="num-bigfloat")]
10827impl core::ops::Mul<&LuminousFlux<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
10828 type Output = LuminousFlux<num_bigfloat::BigFloat>;
10829 fn mul(self, rhs: &LuminousFlux<num_bigfloat::BigFloat>) -> Self::Output {
10830 LuminousFlux{lm: self.clone() * rhs.lm.clone()}
10831 }
10832}
10833
10834#[cfg(feature="num-complex")]
10836impl core::ops::Mul<LuminousFlux<num_complex::Complex32>> for num_complex::Complex32 {
10837 type Output = LuminousFlux<num_complex::Complex32>;
10838 fn mul(self, rhs: LuminousFlux<num_complex::Complex32>) -> Self::Output {
10839 LuminousFlux{lm: self * rhs.lm}
10840 }
10841}
10842#[cfg(feature="num-complex")]
10844impl core::ops::Mul<LuminousFlux<num_complex::Complex32>> for &num_complex::Complex32 {
10845 type Output = LuminousFlux<num_complex::Complex32>;
10846 fn mul(self, rhs: LuminousFlux<num_complex::Complex32>) -> Self::Output {
10847 LuminousFlux{lm: self.clone() * rhs.lm}
10848 }
10849}
10850#[cfg(feature="num-complex")]
10852impl core::ops::Mul<&LuminousFlux<num_complex::Complex32>> for num_complex::Complex32 {
10853 type Output = LuminousFlux<num_complex::Complex32>;
10854 fn mul(self, rhs: &LuminousFlux<num_complex::Complex32>) -> Self::Output {
10855 LuminousFlux{lm: self * rhs.lm.clone()}
10856 }
10857}
10858#[cfg(feature="num-complex")]
10860impl core::ops::Mul<&LuminousFlux<num_complex::Complex32>> for &num_complex::Complex32 {
10861 type Output = LuminousFlux<num_complex::Complex32>;
10862 fn mul(self, rhs: &LuminousFlux<num_complex::Complex32>) -> Self::Output {
10863 LuminousFlux{lm: self.clone() * rhs.lm.clone()}
10864 }
10865}
10866
10867#[cfg(feature="num-complex")]
10869impl core::ops::Mul<LuminousFlux<num_complex::Complex64>> for num_complex::Complex64 {
10870 type Output = LuminousFlux<num_complex::Complex64>;
10871 fn mul(self, rhs: LuminousFlux<num_complex::Complex64>) -> Self::Output {
10872 LuminousFlux{lm: self * rhs.lm}
10873 }
10874}
10875#[cfg(feature="num-complex")]
10877impl core::ops::Mul<LuminousFlux<num_complex::Complex64>> for &num_complex::Complex64 {
10878 type Output = LuminousFlux<num_complex::Complex64>;
10879 fn mul(self, rhs: LuminousFlux<num_complex::Complex64>) -> Self::Output {
10880 LuminousFlux{lm: self.clone() * rhs.lm}
10881 }
10882}
10883#[cfg(feature="num-complex")]
10885impl core::ops::Mul<&LuminousFlux<num_complex::Complex64>> for num_complex::Complex64 {
10886 type Output = LuminousFlux<num_complex::Complex64>;
10887 fn mul(self, rhs: &LuminousFlux<num_complex::Complex64>) -> Self::Output {
10888 LuminousFlux{lm: self * rhs.lm.clone()}
10889 }
10890}
10891#[cfg(feature="num-complex")]
10893impl core::ops::Mul<&LuminousFlux<num_complex::Complex64>> for &num_complex::Complex64 {
10894 type Output = LuminousFlux<num_complex::Complex64>;
10895 fn mul(self, rhs: &LuminousFlux<num_complex::Complex64>) -> Self::Output {
10896 LuminousFlux{lm: self.clone() * rhs.lm.clone()}
10897 }
10898}
10899
10900
10901
10902
10903impl<T> core::ops::Mul<InverseLuminosity<T>> for LuminousFlux<T> where T: NumLike {
10906 type Output = SolidAngle<T>;
10907 fn mul(self, rhs: InverseLuminosity<T>) -> Self::Output {
10908 SolidAngle{sr: self.lm * rhs.per_cd}
10909 }
10910}
10911impl<T> core::ops::Mul<InverseLuminosity<T>> for &LuminousFlux<T> where T: NumLike {
10913 type Output = SolidAngle<T>;
10914 fn mul(self, rhs: InverseLuminosity<T>) -> Self::Output {
10915 SolidAngle{sr: self.lm.clone() * rhs.per_cd}
10916 }
10917}
10918impl<T> core::ops::Mul<&InverseLuminosity<T>> for LuminousFlux<T> where T: NumLike {
10920 type Output = SolidAngle<T>;
10921 fn mul(self, rhs: &InverseLuminosity<T>) -> Self::Output {
10922 SolidAngle{sr: self.lm * rhs.per_cd.clone()}
10923 }
10924}
10925impl<T> core::ops::Mul<&InverseLuminosity<T>> for &LuminousFlux<T> where T: NumLike {
10927 type Output = SolidAngle<T>;
10928 fn mul(self, rhs: &InverseLuminosity<T>) -> Self::Output {
10929 SolidAngle{sr: self.lm.clone() * rhs.per_cd.clone()}
10930 }
10931}
10932
10933impl<T> core::ops::Div<Luminosity<T>> for LuminousFlux<T> where T: NumLike {
10936 type Output = SolidAngle<T>;
10937 fn div(self, rhs: Luminosity<T>) -> Self::Output {
10938 SolidAngle{sr: self.lm / rhs.cd}
10939 }
10940}
10941impl<T> core::ops::Div<Luminosity<T>> for &LuminousFlux<T> where T: NumLike {
10943 type Output = SolidAngle<T>;
10944 fn div(self, rhs: Luminosity<T>) -> Self::Output {
10945 SolidAngle{sr: self.lm.clone() / rhs.cd}
10946 }
10947}
10948impl<T> core::ops::Div<&Luminosity<T>> for LuminousFlux<T> where T: NumLike {
10950 type Output = SolidAngle<T>;
10951 fn div(self, rhs: &Luminosity<T>) -> Self::Output {
10952 SolidAngle{sr: self.lm / rhs.cd.clone()}
10953 }
10954}
10955impl<T> core::ops::Div<&Luminosity<T>> for &LuminousFlux<T> where T: NumLike {
10957 type Output = SolidAngle<T>;
10958 fn div(self, rhs: &Luminosity<T>) -> Self::Output {
10959 SolidAngle{sr: self.lm.clone() / rhs.cd.clone()}
10960 }
10961}
10962
10963impl<T> core::ops::Mul<AreaPerLumen<T>> for LuminousFlux<T> where T: NumLike {
10966 type Output = Area<T>;
10967 fn mul(self, rhs: AreaPerLumen<T>) -> Self::Output {
10968 Area{m2: self.lm * rhs.m2_per_lm}
10969 }
10970}
10971impl<T> core::ops::Mul<AreaPerLumen<T>> for &LuminousFlux<T> where T: NumLike {
10973 type Output = Area<T>;
10974 fn mul(self, rhs: AreaPerLumen<T>) -> Self::Output {
10975 Area{m2: self.lm.clone() * rhs.m2_per_lm}
10976 }
10977}
10978impl<T> core::ops::Mul<&AreaPerLumen<T>> for LuminousFlux<T> where T: NumLike {
10980 type Output = Area<T>;
10981 fn mul(self, rhs: &AreaPerLumen<T>) -> Self::Output {
10982 Area{m2: self.lm * rhs.m2_per_lm.clone()}
10983 }
10984}
10985impl<T> core::ops::Mul<&AreaPerLumen<T>> for &LuminousFlux<T> where T: NumLike {
10987 type Output = Area<T>;
10988 fn mul(self, rhs: &AreaPerLumen<T>) -> Self::Output {
10989 Area{m2: self.lm.clone() * rhs.m2_per_lm.clone()}
10990 }
10991}
10992
10993impl<T> core::ops::Div<Illuminance<T>> for LuminousFlux<T> where T: NumLike {
10996 type Output = Area<T>;
10997 fn div(self, rhs: Illuminance<T>) -> Self::Output {
10998 Area{m2: self.lm / rhs.lux}
10999 }
11000}
11001impl<T> core::ops::Div<Illuminance<T>> for &LuminousFlux<T> where T: NumLike {
11003 type Output = Area<T>;
11004 fn div(self, rhs: Illuminance<T>) -> Self::Output {
11005 Area{m2: self.lm.clone() / rhs.lux}
11006 }
11007}
11008impl<T> core::ops::Div<&Illuminance<T>> for LuminousFlux<T> where T: NumLike {
11010 type Output = Area<T>;
11011 fn div(self, rhs: &Illuminance<T>) -> Self::Output {
11012 Area{m2: self.lm / rhs.lux.clone()}
11013 }
11014}
11015impl<T> core::ops::Div<&Illuminance<T>> for &LuminousFlux<T> where T: NumLike {
11017 type Output = Area<T>;
11018 fn div(self, rhs: &Illuminance<T>) -> Self::Output {
11019 Area{m2: self.lm.clone() / rhs.lux.clone()}
11020 }
11021}
11022
11023impl<T> core::ops::Div<Area<T>> for LuminousFlux<T> where T: NumLike {
11026 type Output = Illuminance<T>;
11027 fn div(self, rhs: Area<T>) -> Self::Output {
11028 Illuminance{lux: self.lm / rhs.m2}
11029 }
11030}
11031impl<T> core::ops::Div<Area<T>> for &LuminousFlux<T> where T: NumLike {
11033 type Output = Illuminance<T>;
11034 fn div(self, rhs: Area<T>) -> Self::Output {
11035 Illuminance{lux: self.lm.clone() / rhs.m2}
11036 }
11037}
11038impl<T> core::ops::Div<&Area<T>> for LuminousFlux<T> where T: NumLike {
11040 type Output = Illuminance<T>;
11041 fn div(self, rhs: &Area<T>) -> Self::Output {
11042 Illuminance{lux: self.lm / rhs.m2.clone()}
11043 }
11044}
11045impl<T> core::ops::Div<&Area<T>> for &LuminousFlux<T> where T: NumLike {
11047 type Output = Illuminance<T>;
11048 fn div(self, rhs: &Area<T>) -> Self::Output {
11049 Illuminance{lux: self.lm.clone() / rhs.m2.clone()}
11050 }
11051}
11052
11053impl<T> core::ops::Mul<InverseArea<T>> for LuminousFlux<T> where T: NumLike {
11056 type Output = Illuminance<T>;
11057 fn mul(self, rhs: InverseArea<T>) -> Self::Output {
11058 Illuminance{lux: self.lm * rhs.per_m2}
11059 }
11060}
11061impl<T> core::ops::Mul<InverseArea<T>> for &LuminousFlux<T> where T: NumLike {
11063 type Output = Illuminance<T>;
11064 fn mul(self, rhs: InverseArea<T>) -> Self::Output {
11065 Illuminance{lux: self.lm.clone() * rhs.per_m2}
11066 }
11067}
11068impl<T> core::ops::Mul<&InverseArea<T>> for LuminousFlux<T> where T: NumLike {
11070 type Output = Illuminance<T>;
11071 fn mul(self, rhs: &InverseArea<T>) -> Self::Output {
11072 Illuminance{lux: self.lm * rhs.per_m2.clone()}
11073 }
11074}
11075impl<T> core::ops::Mul<&InverseArea<T>> for &LuminousFlux<T> where T: NumLike {
11077 type Output = Illuminance<T>;
11078 fn mul(self, rhs: &InverseArea<T>) -> Self::Output {
11079 Illuminance{lux: self.lm.clone() * rhs.per_m2.clone()}
11080 }
11081}
11082
11083impl<T> core::ops::Mul<InverseSolidAngle<T>> for LuminousFlux<T> where T: NumLike {
11086 type Output = Luminosity<T>;
11087 fn mul(self, rhs: InverseSolidAngle<T>) -> Self::Output {
11088 Luminosity{cd: self.lm * rhs.per_sr}
11089 }
11090}
11091impl<T> core::ops::Mul<InverseSolidAngle<T>> for &LuminousFlux<T> where T: NumLike {
11093 type Output = Luminosity<T>;
11094 fn mul(self, rhs: InverseSolidAngle<T>) -> Self::Output {
11095 Luminosity{cd: self.lm.clone() * rhs.per_sr}
11096 }
11097}
11098impl<T> core::ops::Mul<&InverseSolidAngle<T>> for LuminousFlux<T> where T: NumLike {
11100 type Output = Luminosity<T>;
11101 fn mul(self, rhs: &InverseSolidAngle<T>) -> Self::Output {
11102 Luminosity{cd: self.lm * rhs.per_sr.clone()}
11103 }
11104}
11105impl<T> core::ops::Mul<&InverseSolidAngle<T>> for &LuminousFlux<T> where T: NumLike {
11107 type Output = Luminosity<T>;
11108 fn mul(self, rhs: &InverseSolidAngle<T>) -> Self::Output {
11109 Luminosity{cd: self.lm.clone() * rhs.per_sr.clone()}
11110 }
11111}
11112
11113impl<T> core::ops::Div<SolidAngle<T>> for LuminousFlux<T> where T: NumLike {
11116 type Output = Luminosity<T>;
11117 fn div(self, rhs: SolidAngle<T>) -> Self::Output {
11118 Luminosity{cd: self.lm / rhs.sr}
11119 }
11120}
11121impl<T> core::ops::Div<SolidAngle<T>> for &LuminousFlux<T> where T: NumLike {
11123 type Output = Luminosity<T>;
11124 fn div(self, rhs: SolidAngle<T>) -> Self::Output {
11125 Luminosity{cd: self.lm.clone() / rhs.sr}
11126 }
11127}
11128impl<T> core::ops::Div<&SolidAngle<T>> for LuminousFlux<T> where T: NumLike {
11130 type Output = Luminosity<T>;
11131 fn div(self, rhs: &SolidAngle<T>) -> Self::Output {
11132 Luminosity{cd: self.lm / rhs.sr.clone()}
11133 }
11134}
11135impl<T> core::ops::Div<&SolidAngle<T>> for &LuminousFlux<T> where T: NumLike {
11137 type Output = Luminosity<T>;
11138 fn div(self, rhs: &SolidAngle<T>) -> Self::Output {
11139 Luminosity{cd: self.lm.clone() / rhs.sr.clone()}
11140 }
11141}
11142
11143impl<T> core::ops::Div<LuminousFlux<T>> for f64 where T: NumLike+From<f64> {
11146 type Output = InverseLuminousFlux<T>;
11147 fn div(self, rhs: LuminousFlux<T>) -> Self::Output {
11148 InverseLuminousFlux{per_lm: T::from(self) / rhs.lm}
11149 }
11150}
11151impl<T> core::ops::Div<LuminousFlux<T>> for &f64 where T: NumLike+From<f64> {
11153 type Output = InverseLuminousFlux<T>;
11154 fn div(self, rhs: LuminousFlux<T>) -> Self::Output {
11155 InverseLuminousFlux{per_lm: T::from(self.clone()) / rhs.lm}
11156 }
11157}
11158impl<T> core::ops::Div<&LuminousFlux<T>> for f64 where T: NumLike+From<f64> {
11160 type Output = InverseLuminousFlux<T>;
11161 fn div(self, rhs: &LuminousFlux<T>) -> Self::Output {
11162 InverseLuminousFlux{per_lm: T::from(self) / rhs.lm.clone()}
11163 }
11164}
11165impl<T> core::ops::Div<&LuminousFlux<T>> for &f64 where T: NumLike+From<f64> {
11167 type Output = InverseLuminousFlux<T>;
11168 fn div(self, rhs: &LuminousFlux<T>) -> Self::Output {
11169 InverseLuminousFlux{per_lm: T::from(self.clone()) / rhs.lm.clone()}
11170 }
11171}
11172
11173impl<T> core::ops::Div<LuminousFlux<T>> for f32 where T: NumLike+From<f32> {
11176 type Output = InverseLuminousFlux<T>;
11177 fn div(self, rhs: LuminousFlux<T>) -> Self::Output {
11178 InverseLuminousFlux{per_lm: T::from(self) / rhs.lm}
11179 }
11180}
11181impl<T> core::ops::Div<LuminousFlux<T>> for &f32 where T: NumLike+From<f32> {
11183 type Output = InverseLuminousFlux<T>;
11184 fn div(self, rhs: LuminousFlux<T>) -> Self::Output {
11185 InverseLuminousFlux{per_lm: T::from(self.clone()) / rhs.lm}
11186 }
11187}
11188impl<T> core::ops::Div<&LuminousFlux<T>> for f32 where T: NumLike+From<f32> {
11190 type Output = InverseLuminousFlux<T>;
11191 fn div(self, rhs: &LuminousFlux<T>) -> Self::Output {
11192 InverseLuminousFlux{per_lm: T::from(self) / rhs.lm.clone()}
11193 }
11194}
11195impl<T> core::ops::Div<&LuminousFlux<T>> for &f32 where T: NumLike+From<f32> {
11197 type Output = InverseLuminousFlux<T>;
11198 fn div(self, rhs: &LuminousFlux<T>) -> Self::Output {
11199 InverseLuminousFlux{per_lm: T::from(self.clone()) / rhs.lm.clone()}
11200 }
11201}
11202
11203impl<T> core::ops::Div<LuminousFlux<T>> for i64 where T: NumLike+From<i64> {
11206 type Output = InverseLuminousFlux<T>;
11207 fn div(self, rhs: LuminousFlux<T>) -> Self::Output {
11208 InverseLuminousFlux{per_lm: T::from(self) / rhs.lm}
11209 }
11210}
11211impl<T> core::ops::Div<LuminousFlux<T>> for &i64 where T: NumLike+From<i64> {
11213 type Output = InverseLuminousFlux<T>;
11214 fn div(self, rhs: LuminousFlux<T>) -> Self::Output {
11215 InverseLuminousFlux{per_lm: T::from(self.clone()) / rhs.lm}
11216 }
11217}
11218impl<T> core::ops::Div<&LuminousFlux<T>> for i64 where T: NumLike+From<i64> {
11220 type Output = InverseLuminousFlux<T>;
11221 fn div(self, rhs: &LuminousFlux<T>) -> Self::Output {
11222 InverseLuminousFlux{per_lm: T::from(self) / rhs.lm.clone()}
11223 }
11224}
11225impl<T> core::ops::Div<&LuminousFlux<T>> for &i64 where T: NumLike+From<i64> {
11227 type Output = InverseLuminousFlux<T>;
11228 fn div(self, rhs: &LuminousFlux<T>) -> Self::Output {
11229 InverseLuminousFlux{per_lm: T::from(self.clone()) / rhs.lm.clone()}
11230 }
11231}
11232
11233impl<T> core::ops::Div<LuminousFlux<T>> for i32 where T: NumLike+From<i32> {
11236 type Output = InverseLuminousFlux<T>;
11237 fn div(self, rhs: LuminousFlux<T>) -> Self::Output {
11238 InverseLuminousFlux{per_lm: T::from(self) / rhs.lm}
11239 }
11240}
11241impl<T> core::ops::Div<LuminousFlux<T>> for &i32 where T: NumLike+From<i32> {
11243 type Output = InverseLuminousFlux<T>;
11244 fn div(self, rhs: LuminousFlux<T>) -> Self::Output {
11245 InverseLuminousFlux{per_lm: T::from(self.clone()) / rhs.lm}
11246 }
11247}
11248impl<T> core::ops::Div<&LuminousFlux<T>> for i32 where T: NumLike+From<i32> {
11250 type Output = InverseLuminousFlux<T>;
11251 fn div(self, rhs: &LuminousFlux<T>) -> Self::Output {
11252 InverseLuminousFlux{per_lm: T::from(self) / rhs.lm.clone()}
11253 }
11254}
11255impl<T> core::ops::Div<&LuminousFlux<T>> for &i32 where T: NumLike+From<i32> {
11257 type Output = InverseLuminousFlux<T>;
11258 fn div(self, rhs: &LuminousFlux<T>) -> Self::Output {
11259 InverseLuminousFlux{per_lm: T::from(self.clone()) / rhs.lm.clone()}
11260 }
11261}
11262
11263#[cfg(feature="num-bigfloat")]
11266impl<T> core::ops::Div<LuminousFlux<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
11267 type Output = InverseLuminousFlux<T>;
11268 fn div(self, rhs: LuminousFlux<T>) -> Self::Output {
11269 InverseLuminousFlux{per_lm: T::from(self) / rhs.lm}
11270 }
11271}
11272#[cfg(feature="num-bigfloat")]
11274impl<T> core::ops::Div<LuminousFlux<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
11275 type Output = InverseLuminousFlux<T>;
11276 fn div(self, rhs: LuminousFlux<T>) -> Self::Output {
11277 InverseLuminousFlux{per_lm: T::from(self.clone()) / rhs.lm}
11278 }
11279}
11280#[cfg(feature="num-bigfloat")]
11282impl<T> core::ops::Div<&LuminousFlux<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
11283 type Output = InverseLuminousFlux<T>;
11284 fn div(self, rhs: &LuminousFlux<T>) -> Self::Output {
11285 InverseLuminousFlux{per_lm: T::from(self) / rhs.lm.clone()}
11286 }
11287}
11288#[cfg(feature="num-bigfloat")]
11290impl<T> core::ops::Div<&LuminousFlux<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
11291 type Output = InverseLuminousFlux<T>;
11292 fn div(self, rhs: &LuminousFlux<T>) -> Self::Output {
11293 InverseLuminousFlux{per_lm: T::from(self.clone()) / rhs.lm.clone()}
11294 }
11295}
11296
11297#[cfg(feature="num-complex")]
11300impl<T> core::ops::Div<LuminousFlux<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
11301 type Output = InverseLuminousFlux<T>;
11302 fn div(self, rhs: LuminousFlux<T>) -> Self::Output {
11303 InverseLuminousFlux{per_lm: T::from(self) / rhs.lm}
11304 }
11305}
11306#[cfg(feature="num-complex")]
11308impl<T> core::ops::Div<LuminousFlux<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
11309 type Output = InverseLuminousFlux<T>;
11310 fn div(self, rhs: LuminousFlux<T>) -> Self::Output {
11311 InverseLuminousFlux{per_lm: T::from(self.clone()) / rhs.lm}
11312 }
11313}
11314#[cfg(feature="num-complex")]
11316impl<T> core::ops::Div<&LuminousFlux<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
11317 type Output = InverseLuminousFlux<T>;
11318 fn div(self, rhs: &LuminousFlux<T>) -> Self::Output {
11319 InverseLuminousFlux{per_lm: T::from(self) / rhs.lm.clone()}
11320 }
11321}
11322#[cfg(feature="num-complex")]
11324impl<T> core::ops::Div<&LuminousFlux<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
11325 type Output = InverseLuminousFlux<T>;
11326 fn div(self, rhs: &LuminousFlux<T>) -> Self::Output {
11327 InverseLuminousFlux{per_lm: T::from(self.clone()) / rhs.lm.clone()}
11328 }
11329}
11330
11331#[cfg(feature="num-complex")]
11334impl<T> core::ops::Div<LuminousFlux<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
11335 type Output = InverseLuminousFlux<T>;
11336 fn div(self, rhs: LuminousFlux<T>) -> Self::Output {
11337 InverseLuminousFlux{per_lm: T::from(self) / rhs.lm}
11338 }
11339}
11340#[cfg(feature="num-complex")]
11342impl<T> core::ops::Div<LuminousFlux<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
11343 type Output = InverseLuminousFlux<T>;
11344 fn div(self, rhs: LuminousFlux<T>) -> Self::Output {
11345 InverseLuminousFlux{per_lm: T::from(self.clone()) / rhs.lm}
11346 }
11347}
11348#[cfg(feature="num-complex")]
11350impl<T> core::ops::Div<&LuminousFlux<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
11351 type Output = InverseLuminousFlux<T>;
11352 fn div(self, rhs: &LuminousFlux<T>) -> Self::Output {
11353 InverseLuminousFlux{per_lm: T::from(self) / rhs.lm.clone()}
11354 }
11355}
11356#[cfg(feature="num-complex")]
11358impl<T> core::ops::Div<&LuminousFlux<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
11359 type Output = InverseLuminousFlux<T>;
11360 fn div(self, rhs: &LuminousFlux<T>) -> Self::Output {
11361 InverseLuminousFlux{per_lm: T::from(self.clone()) / rhs.lm.clone()}
11362 }
11363}
11364
11365#[derive(UnitStruct, Debug, Clone)]
11367#[cfg_attr(feature="serde", derive(Serialize, Deserialize))]
11368pub struct MagneticFlux<T: NumLike>{
11369 pub Wb: T
11371}
11372
11373impl<T> MagneticFlux<T> where T: NumLike {
11374
11375 pub fn unit_name() -> &'static str { "webers" }
11377
11378 pub fn unit_symbol() -> &'static str { "Wb" }
11380
11381 pub fn from_Wb(Wb: T) -> Self { MagneticFlux{Wb: Wb} }
11386
11387 pub fn to_Wb(&self) -> T { self.Wb.clone() }
11389
11390 pub fn from_webers(webers: T) -> Self { MagneticFlux{Wb: webers} }
11395
11396 pub fn to_webers(&self) -> T { self.Wb.clone() }
11398
11399}
11400
11401impl<T> fmt::Display for MagneticFlux<T> where T: NumLike {
11402 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
11403 write!(f, "{} {}", &self.Wb, Self::unit_symbol())
11404 }
11405}
11406
11407impl<T> MagneticFlux<T> where T: NumLike+From<f64> {
11408
11409 pub fn to_mWb(&self) -> T {
11413 return self.Wb.clone() * T::from(1000.0_f64);
11414 }
11415
11416 pub fn from_mWb(mWb: T) -> Self {
11423 MagneticFlux{Wb: mWb * T::from(0.001_f64)}
11424 }
11425
11426 pub fn to_uWb(&self) -> T {
11430 return self.Wb.clone() * T::from(1000000.0_f64);
11431 }
11432
11433 pub fn from_uWb(uWb: T) -> Self {
11440 MagneticFlux{Wb: uWb * T::from(1e-06_f64)}
11441 }
11442
11443 pub fn to_nWb(&self) -> T {
11447 return self.Wb.clone() * T::from(1000000000.0_f64);
11448 }
11449
11450 pub fn from_nWb(nWb: T) -> Self {
11457 MagneticFlux{Wb: nWb * T::from(1e-09_f64)}
11458 }
11459
11460 pub fn to_kWb(&self) -> T {
11464 return self.Wb.clone() * T::from(0.001_f64);
11465 }
11466
11467 pub fn from_kWb(kWb: T) -> Self {
11474 MagneticFlux{Wb: kWb * T::from(1000.0_f64)}
11475 }
11476
11477 pub fn to_MWb(&self) -> T {
11481 return self.Wb.clone() * T::from(1e-06_f64);
11482 }
11483
11484 pub fn from_MWb(MWb: T) -> Self {
11491 MagneticFlux{Wb: MWb * T::from(1000000.0_f64)}
11492 }
11493
11494 pub fn to_GWb(&self) -> T {
11498 return self.Wb.clone() * T::from(1e-09_f64);
11499 }
11500
11501 pub fn from_GWb(GWb: T) -> Self {
11508 MagneticFlux{Wb: GWb * T::from(1000000000.0_f64)}
11509 }
11510
11511}
11512
11513
11514#[cfg(feature="num-bigfloat")]
11516impl core::ops::Mul<MagneticFlux<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
11517 type Output = MagneticFlux<num_bigfloat::BigFloat>;
11518 fn mul(self, rhs: MagneticFlux<num_bigfloat::BigFloat>) -> Self::Output {
11519 MagneticFlux{Wb: self * rhs.Wb}
11520 }
11521}
11522#[cfg(feature="num-bigfloat")]
11524impl core::ops::Mul<MagneticFlux<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
11525 type Output = MagneticFlux<num_bigfloat::BigFloat>;
11526 fn mul(self, rhs: MagneticFlux<num_bigfloat::BigFloat>) -> Self::Output {
11527 MagneticFlux{Wb: self.clone() * rhs.Wb}
11528 }
11529}
11530#[cfg(feature="num-bigfloat")]
11532impl core::ops::Mul<&MagneticFlux<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
11533 type Output = MagneticFlux<num_bigfloat::BigFloat>;
11534 fn mul(self, rhs: &MagneticFlux<num_bigfloat::BigFloat>) -> Self::Output {
11535 MagneticFlux{Wb: self * rhs.Wb.clone()}
11536 }
11537}
11538#[cfg(feature="num-bigfloat")]
11540impl core::ops::Mul<&MagneticFlux<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
11541 type Output = MagneticFlux<num_bigfloat::BigFloat>;
11542 fn mul(self, rhs: &MagneticFlux<num_bigfloat::BigFloat>) -> Self::Output {
11543 MagneticFlux{Wb: self.clone() * rhs.Wb.clone()}
11544 }
11545}
11546
11547#[cfg(feature="num-complex")]
11549impl core::ops::Mul<MagneticFlux<num_complex::Complex32>> for num_complex::Complex32 {
11550 type Output = MagneticFlux<num_complex::Complex32>;
11551 fn mul(self, rhs: MagneticFlux<num_complex::Complex32>) -> Self::Output {
11552 MagneticFlux{Wb: self * rhs.Wb}
11553 }
11554}
11555#[cfg(feature="num-complex")]
11557impl core::ops::Mul<MagneticFlux<num_complex::Complex32>> for &num_complex::Complex32 {
11558 type Output = MagneticFlux<num_complex::Complex32>;
11559 fn mul(self, rhs: MagneticFlux<num_complex::Complex32>) -> Self::Output {
11560 MagneticFlux{Wb: self.clone() * rhs.Wb}
11561 }
11562}
11563#[cfg(feature="num-complex")]
11565impl core::ops::Mul<&MagneticFlux<num_complex::Complex32>> for num_complex::Complex32 {
11566 type Output = MagneticFlux<num_complex::Complex32>;
11567 fn mul(self, rhs: &MagneticFlux<num_complex::Complex32>) -> Self::Output {
11568 MagneticFlux{Wb: self * rhs.Wb.clone()}
11569 }
11570}
11571#[cfg(feature="num-complex")]
11573impl core::ops::Mul<&MagneticFlux<num_complex::Complex32>> for &num_complex::Complex32 {
11574 type Output = MagneticFlux<num_complex::Complex32>;
11575 fn mul(self, rhs: &MagneticFlux<num_complex::Complex32>) -> Self::Output {
11576 MagneticFlux{Wb: self.clone() * rhs.Wb.clone()}
11577 }
11578}
11579
11580#[cfg(feature="num-complex")]
11582impl core::ops::Mul<MagneticFlux<num_complex::Complex64>> for num_complex::Complex64 {
11583 type Output = MagneticFlux<num_complex::Complex64>;
11584 fn mul(self, rhs: MagneticFlux<num_complex::Complex64>) -> Self::Output {
11585 MagneticFlux{Wb: self * rhs.Wb}
11586 }
11587}
11588#[cfg(feature="num-complex")]
11590impl core::ops::Mul<MagneticFlux<num_complex::Complex64>> for &num_complex::Complex64 {
11591 type Output = MagneticFlux<num_complex::Complex64>;
11592 fn mul(self, rhs: MagneticFlux<num_complex::Complex64>) -> Self::Output {
11593 MagneticFlux{Wb: self.clone() * rhs.Wb}
11594 }
11595}
11596#[cfg(feature="num-complex")]
11598impl core::ops::Mul<&MagneticFlux<num_complex::Complex64>> for num_complex::Complex64 {
11599 type Output = MagneticFlux<num_complex::Complex64>;
11600 fn mul(self, rhs: &MagneticFlux<num_complex::Complex64>) -> Self::Output {
11601 MagneticFlux{Wb: self * rhs.Wb.clone()}
11602 }
11603}
11604#[cfg(feature="num-complex")]
11606impl core::ops::Mul<&MagneticFlux<num_complex::Complex64>> for &num_complex::Complex64 {
11607 type Output = MagneticFlux<num_complex::Complex64>;
11608 fn mul(self, rhs: &MagneticFlux<num_complex::Complex64>) -> Self::Output {
11609 MagneticFlux{Wb: self.clone() * rhs.Wb.clone()}
11610 }
11611}
11612
11613
11614
11615#[cfg(feature = "uom")]
11617impl<T> Into<uom::si::f32::MagneticFlux> for MagneticFlux<T> where T: NumLike+Into<f32> {
11618 fn into(self) -> uom::si::f32::MagneticFlux {
11619 uom::si::f32::MagneticFlux::new::<uom::si::magnetic_flux::weber>(self.Wb.into())
11620 }
11621}
11622
11623#[cfg(feature = "uom")]
11625impl<T> From<uom::si::f32::MagneticFlux> for MagneticFlux<T> where T: NumLike+From<f32> {
11626 fn from(src: uom::si::f32::MagneticFlux) -> Self {
11627 MagneticFlux{Wb: T::from(src.value)}
11628 }
11629}
11630
11631#[cfg(feature = "uom")]
11633impl<T> Into<uom::si::f64::MagneticFlux> for MagneticFlux<T> where T: NumLike+Into<f64> {
11634 fn into(self) -> uom::si::f64::MagneticFlux {
11635 uom::si::f64::MagneticFlux::new::<uom::si::magnetic_flux::weber>(self.Wb.into())
11636 }
11637}
11638
11639#[cfg(feature = "uom")]
11641impl<T> From<uom::si::f64::MagneticFlux> for MagneticFlux<T> where T: NumLike+From<f64> {
11642 fn from(src: uom::si::f64::MagneticFlux) -> Self {
11643 MagneticFlux{Wb: T::from(src.value)}
11644 }
11645}
11646
11647
11648impl<T> core::ops::Mul<Current<T>> for MagneticFlux<T> where T: NumLike {
11651 type Output = Energy<T>;
11652 fn mul(self, rhs: Current<T>) -> Self::Output {
11653 Energy{J: self.Wb * rhs.A}
11654 }
11655}
11656impl<T> core::ops::Mul<Current<T>> for &MagneticFlux<T> where T: NumLike {
11658 type Output = Energy<T>;
11659 fn mul(self, rhs: Current<T>) -> Self::Output {
11660 Energy{J: self.Wb.clone() * rhs.A}
11661 }
11662}
11663impl<T> core::ops::Mul<&Current<T>> for MagneticFlux<T> where T: NumLike {
11665 type Output = Energy<T>;
11666 fn mul(self, rhs: &Current<T>) -> Self::Output {
11667 Energy{J: self.Wb * rhs.A.clone()}
11668 }
11669}
11670impl<T> core::ops::Mul<&Current<T>> for &MagneticFlux<T> where T: NumLike {
11672 type Output = Energy<T>;
11673 fn mul(self, rhs: &Current<T>) -> Self::Output {
11674 Energy{J: self.Wb.clone() * rhs.A.clone()}
11675 }
11676}
11677
11678impl<T> core::ops::Div<Current<T>> for MagneticFlux<T> where T: NumLike {
11681 type Output = Inductance<T>;
11682 fn div(self, rhs: Current<T>) -> Self::Output {
11683 Inductance{H: self.Wb / rhs.A}
11684 }
11685}
11686impl<T> core::ops::Div<Current<T>> for &MagneticFlux<T> where T: NumLike {
11688 type Output = Inductance<T>;
11689 fn div(self, rhs: Current<T>) -> Self::Output {
11690 Inductance{H: self.Wb.clone() / rhs.A}
11691 }
11692}
11693impl<T> core::ops::Div<&Current<T>> for MagneticFlux<T> where T: NumLike {
11695 type Output = Inductance<T>;
11696 fn div(self, rhs: &Current<T>) -> Self::Output {
11697 Inductance{H: self.Wb / rhs.A.clone()}
11698 }
11699}
11700impl<T> core::ops::Div<&Current<T>> for &MagneticFlux<T> where T: NumLike {
11702 type Output = Inductance<T>;
11703 fn div(self, rhs: &Current<T>) -> Self::Output {
11704 Inductance{H: self.Wb.clone() / rhs.A.clone()}
11705 }
11706}
11707
11708impl<T> core::ops::Mul<InverseCurrent<T>> for MagneticFlux<T> where T: NumLike {
11711 type Output = Inductance<T>;
11712 fn mul(self, rhs: InverseCurrent<T>) -> Self::Output {
11713 Inductance{H: self.Wb * rhs.per_A}
11714 }
11715}
11716impl<T> core::ops::Mul<InverseCurrent<T>> for &MagneticFlux<T> where T: NumLike {
11718 type Output = Inductance<T>;
11719 fn mul(self, rhs: InverseCurrent<T>) -> Self::Output {
11720 Inductance{H: self.Wb.clone() * rhs.per_A}
11721 }
11722}
11723impl<T> core::ops::Mul<&InverseCurrent<T>> for MagneticFlux<T> where T: NumLike {
11725 type Output = Inductance<T>;
11726 fn mul(self, rhs: &InverseCurrent<T>) -> Self::Output {
11727 Inductance{H: self.Wb * rhs.per_A.clone()}
11728 }
11729}
11730impl<T> core::ops::Mul<&InverseCurrent<T>> for &MagneticFlux<T> where T: NumLike {
11732 type Output = Inductance<T>;
11733 fn mul(self, rhs: &InverseCurrent<T>) -> Self::Output {
11734 Inductance{H: self.Wb.clone() * rhs.per_A.clone()}
11735 }
11736}
11737
11738impl<T> core::ops::Div<InverseCurrent<T>> for MagneticFlux<T> where T: NumLike {
11741 type Output = Energy<T>;
11742 fn div(self, rhs: InverseCurrent<T>) -> Self::Output {
11743 Energy{J: self.Wb / rhs.per_A}
11744 }
11745}
11746impl<T> core::ops::Div<InverseCurrent<T>> for &MagneticFlux<T> where T: NumLike {
11748 type Output = Energy<T>;
11749 fn div(self, rhs: InverseCurrent<T>) -> Self::Output {
11750 Energy{J: self.Wb.clone() / rhs.per_A}
11751 }
11752}
11753impl<T> core::ops::Div<&InverseCurrent<T>> for MagneticFlux<T> where T: NumLike {
11755 type Output = Energy<T>;
11756 fn div(self, rhs: &InverseCurrent<T>) -> Self::Output {
11757 Energy{J: self.Wb / rhs.per_A.clone()}
11758 }
11759}
11760impl<T> core::ops::Div<&InverseCurrent<T>> for &MagneticFlux<T> where T: NumLike {
11762 type Output = Energy<T>;
11763 fn div(self, rhs: &InverseCurrent<T>) -> Self::Output {
11764 Energy{J: self.Wb.clone() / rhs.per_A.clone()}
11765 }
11766}
11767
11768impl<T> core::ops::Div<Time<T>> for MagneticFlux<T> where T: NumLike {
11771 type Output = Voltage<T>;
11772 fn div(self, rhs: Time<T>) -> Self::Output {
11773 Voltage{V: self.Wb / rhs.s}
11774 }
11775}
11776impl<T> core::ops::Div<Time<T>> for &MagneticFlux<T> where T: NumLike {
11778 type Output = Voltage<T>;
11779 fn div(self, rhs: Time<T>) -> Self::Output {
11780 Voltage{V: self.Wb.clone() / rhs.s}
11781 }
11782}
11783impl<T> core::ops::Div<&Time<T>> for MagneticFlux<T> where T: NumLike {
11785 type Output = Voltage<T>;
11786 fn div(self, rhs: &Time<T>) -> Self::Output {
11787 Voltage{V: self.Wb / rhs.s.clone()}
11788 }
11789}
11790impl<T> core::ops::Div<&Time<T>> for &MagneticFlux<T> where T: NumLike {
11792 type Output = Voltage<T>;
11793 fn div(self, rhs: &Time<T>) -> Self::Output {
11794 Voltage{V: self.Wb.clone() / rhs.s.clone()}
11795 }
11796}
11797
11798impl<T> core::ops::Div<Charge<T>> for MagneticFlux<T> where T: NumLike {
11801 type Output = Resistance<T>;
11802 fn div(self, rhs: Charge<T>) -> Self::Output {
11803 Resistance{Ohm: self.Wb / rhs.C}
11804 }
11805}
11806impl<T> core::ops::Div<Charge<T>> for &MagneticFlux<T> where T: NumLike {
11808 type Output = Resistance<T>;
11809 fn div(self, rhs: Charge<T>) -> Self::Output {
11810 Resistance{Ohm: self.Wb.clone() / rhs.C}
11811 }
11812}
11813impl<T> core::ops::Div<&Charge<T>> for MagneticFlux<T> where T: NumLike {
11815 type Output = Resistance<T>;
11816 fn div(self, rhs: &Charge<T>) -> Self::Output {
11817 Resistance{Ohm: self.Wb / rhs.C.clone()}
11818 }
11819}
11820impl<T> core::ops::Div<&Charge<T>> for &MagneticFlux<T> where T: NumLike {
11822 type Output = Resistance<T>;
11823 fn div(self, rhs: &Charge<T>) -> Self::Output {
11824 Resistance{Ohm: self.Wb.clone() / rhs.C.clone()}
11825 }
11826}
11827
11828impl<T> core::ops::Mul<Conductance<T>> for MagneticFlux<T> where T: NumLike {
11831 type Output = Charge<T>;
11832 fn mul(self, rhs: Conductance<T>) -> Self::Output {
11833 Charge{C: self.Wb * rhs.S}
11834 }
11835}
11836impl<T> core::ops::Mul<Conductance<T>> for &MagneticFlux<T> where T: NumLike {
11838 type Output = Charge<T>;
11839 fn mul(self, rhs: Conductance<T>) -> Self::Output {
11840 Charge{C: self.Wb.clone() * rhs.S}
11841 }
11842}
11843impl<T> core::ops::Mul<&Conductance<T>> for MagneticFlux<T> where T: NumLike {
11845 type Output = Charge<T>;
11846 fn mul(self, rhs: &Conductance<T>) -> Self::Output {
11847 Charge{C: self.Wb * rhs.S.clone()}
11848 }
11849}
11850impl<T> core::ops::Mul<&Conductance<T>> for &MagneticFlux<T> where T: NumLike {
11852 type Output = Charge<T>;
11853 fn mul(self, rhs: &Conductance<T>) -> Self::Output {
11854 Charge{C: self.Wb.clone() * rhs.S.clone()}
11855 }
11856}
11857
11858impl<T> core::ops::Div<Inductance<T>> for MagneticFlux<T> where T: NumLike {
11861 type Output = Current<T>;
11862 fn div(self, rhs: Inductance<T>) -> Self::Output {
11863 Current{A: self.Wb / rhs.H}
11864 }
11865}
11866impl<T> core::ops::Div<Inductance<T>> for &MagneticFlux<T> where T: NumLike {
11868 type Output = Current<T>;
11869 fn div(self, rhs: Inductance<T>) -> Self::Output {
11870 Current{A: self.Wb.clone() / rhs.H}
11871 }
11872}
11873impl<T> core::ops::Div<&Inductance<T>> for MagneticFlux<T> where T: NumLike {
11875 type Output = Current<T>;
11876 fn div(self, rhs: &Inductance<T>) -> Self::Output {
11877 Current{A: self.Wb / rhs.H.clone()}
11878 }
11879}
11880impl<T> core::ops::Div<&Inductance<T>> for &MagneticFlux<T> where T: NumLike {
11882 type Output = Current<T>;
11883 fn div(self, rhs: &Inductance<T>) -> Self::Output {
11884 Current{A: self.Wb.clone() / rhs.H.clone()}
11885 }
11886}
11887
11888impl<T> core::ops::Mul<InverseCharge<T>> for MagneticFlux<T> where T: NumLike {
11891 type Output = Resistance<T>;
11892 fn mul(self, rhs: InverseCharge<T>) -> Self::Output {
11893 Resistance{Ohm: self.Wb * rhs.per_C}
11894 }
11895}
11896impl<T> core::ops::Mul<InverseCharge<T>> for &MagneticFlux<T> where T: NumLike {
11898 type Output = Resistance<T>;
11899 fn mul(self, rhs: InverseCharge<T>) -> Self::Output {
11900 Resistance{Ohm: self.Wb.clone() * rhs.per_C}
11901 }
11902}
11903impl<T> core::ops::Mul<&InverseCharge<T>> for MagneticFlux<T> where T: NumLike {
11905 type Output = Resistance<T>;
11906 fn mul(self, rhs: &InverseCharge<T>) -> Self::Output {
11907 Resistance{Ohm: self.Wb * rhs.per_C.clone()}
11908 }
11909}
11910impl<T> core::ops::Mul<&InverseCharge<T>> for &MagneticFlux<T> where T: NumLike {
11912 type Output = Resistance<T>;
11913 fn mul(self, rhs: &InverseCharge<T>) -> Self::Output {
11914 Resistance{Ohm: self.Wb.clone() * rhs.per_C.clone()}
11915 }
11916}
11917
11918impl<T> core::ops::Mul<InverseInductance<T>> for MagneticFlux<T> where T: NumLike {
11921 type Output = Current<T>;
11922 fn mul(self, rhs: InverseInductance<T>) -> Self::Output {
11923 Current{A: self.Wb * rhs.per_H}
11924 }
11925}
11926impl<T> core::ops::Mul<InverseInductance<T>> for &MagneticFlux<T> where T: NumLike {
11928 type Output = Current<T>;
11929 fn mul(self, rhs: InverseInductance<T>) -> Self::Output {
11930 Current{A: self.Wb.clone() * rhs.per_H}
11931 }
11932}
11933impl<T> core::ops::Mul<&InverseInductance<T>> for MagneticFlux<T> where T: NumLike {
11935 type Output = Current<T>;
11936 fn mul(self, rhs: &InverseInductance<T>) -> Self::Output {
11937 Current{A: self.Wb * rhs.per_H.clone()}
11938 }
11939}
11940impl<T> core::ops::Mul<&InverseInductance<T>> for &MagneticFlux<T> where T: NumLike {
11942 type Output = Current<T>;
11943 fn mul(self, rhs: &InverseInductance<T>) -> Self::Output {
11944 Current{A: self.Wb.clone() * rhs.per_H.clone()}
11945 }
11946}
11947
11948impl<T> core::ops::Mul<InverseMagneticFluxDensity<T>> for MagneticFlux<T> where T: NumLike {
11951 type Output = Area<T>;
11952 fn mul(self, rhs: InverseMagneticFluxDensity<T>) -> Self::Output {
11953 Area{m2: self.Wb * rhs.m2_per_Wb}
11954 }
11955}
11956impl<T> core::ops::Mul<InverseMagneticFluxDensity<T>> for &MagneticFlux<T> where T: NumLike {
11958 type Output = Area<T>;
11959 fn mul(self, rhs: InverseMagneticFluxDensity<T>) -> Self::Output {
11960 Area{m2: self.Wb.clone() * rhs.m2_per_Wb}
11961 }
11962}
11963impl<T> core::ops::Mul<&InverseMagneticFluxDensity<T>> for MagneticFlux<T> where T: NumLike {
11965 type Output = Area<T>;
11966 fn mul(self, rhs: &InverseMagneticFluxDensity<T>) -> Self::Output {
11967 Area{m2: self.Wb * rhs.m2_per_Wb.clone()}
11968 }
11969}
11970impl<T> core::ops::Mul<&InverseMagneticFluxDensity<T>> for &MagneticFlux<T> where T: NumLike {
11972 type Output = Area<T>;
11973 fn mul(self, rhs: &InverseMagneticFluxDensity<T>) -> Self::Output {
11974 Area{m2: self.Wb.clone() * rhs.m2_per_Wb.clone()}
11975 }
11976}
11977
11978impl<T> core::ops::Mul<InverseVoltage<T>> for MagneticFlux<T> where T: NumLike {
11981 type Output = Time<T>;
11982 fn mul(self, rhs: InverseVoltage<T>) -> Self::Output {
11983 Time{s: self.Wb * rhs.per_V}
11984 }
11985}
11986impl<T> core::ops::Mul<InverseVoltage<T>> for &MagneticFlux<T> where T: NumLike {
11988 type Output = Time<T>;
11989 fn mul(self, rhs: InverseVoltage<T>) -> Self::Output {
11990 Time{s: self.Wb.clone() * rhs.per_V}
11991 }
11992}
11993impl<T> core::ops::Mul<&InverseVoltage<T>> for MagneticFlux<T> where T: NumLike {
11995 type Output = Time<T>;
11996 fn mul(self, rhs: &InverseVoltage<T>) -> Self::Output {
11997 Time{s: self.Wb * rhs.per_V.clone()}
11998 }
11999}
12000impl<T> core::ops::Mul<&InverseVoltage<T>> for &MagneticFlux<T> where T: NumLike {
12002 type Output = Time<T>;
12003 fn mul(self, rhs: &InverseVoltage<T>) -> Self::Output {
12004 Time{s: self.Wb.clone() * rhs.per_V.clone()}
12005 }
12006}
12007
12008impl<T> core::ops::Div<MagneticFluxDensity<T>> for MagneticFlux<T> where T: NumLike {
12011 type Output = Area<T>;
12012 fn div(self, rhs: MagneticFluxDensity<T>) -> Self::Output {
12013 Area{m2: self.Wb / rhs.T}
12014 }
12015}
12016impl<T> core::ops::Div<MagneticFluxDensity<T>> for &MagneticFlux<T> where T: NumLike {
12018 type Output = Area<T>;
12019 fn div(self, rhs: MagneticFluxDensity<T>) -> Self::Output {
12020 Area{m2: self.Wb.clone() / rhs.T}
12021 }
12022}
12023impl<T> core::ops::Div<&MagneticFluxDensity<T>> for MagneticFlux<T> where T: NumLike {
12025 type Output = Area<T>;
12026 fn div(self, rhs: &MagneticFluxDensity<T>) -> Self::Output {
12027 Area{m2: self.Wb / rhs.T.clone()}
12028 }
12029}
12030impl<T> core::ops::Div<&MagneticFluxDensity<T>> for &MagneticFlux<T> where T: NumLike {
12032 type Output = Area<T>;
12033 fn div(self, rhs: &MagneticFluxDensity<T>) -> Self::Output {
12034 Area{m2: self.Wb.clone() / rhs.T.clone()}
12035 }
12036}
12037
12038impl<T> core::ops::Div<Resistance<T>> for MagneticFlux<T> where T: NumLike {
12041 type Output = Charge<T>;
12042 fn div(self, rhs: Resistance<T>) -> Self::Output {
12043 Charge{C: self.Wb / rhs.Ohm}
12044 }
12045}
12046impl<T> core::ops::Div<Resistance<T>> for &MagneticFlux<T> where T: NumLike {
12048 type Output = Charge<T>;
12049 fn div(self, rhs: Resistance<T>) -> Self::Output {
12050 Charge{C: self.Wb.clone() / rhs.Ohm}
12051 }
12052}
12053impl<T> core::ops::Div<&Resistance<T>> for MagneticFlux<T> where T: NumLike {
12055 type Output = Charge<T>;
12056 fn div(self, rhs: &Resistance<T>) -> Self::Output {
12057 Charge{C: self.Wb / rhs.Ohm.clone()}
12058 }
12059}
12060impl<T> core::ops::Div<&Resistance<T>> for &MagneticFlux<T> where T: NumLike {
12062 type Output = Charge<T>;
12063 fn div(self, rhs: &Resistance<T>) -> Self::Output {
12064 Charge{C: self.Wb.clone() / rhs.Ohm.clone()}
12065 }
12066}
12067
12068impl<T> core::ops::Div<Voltage<T>> for MagneticFlux<T> where T: NumLike {
12071 type Output = Time<T>;
12072 fn div(self, rhs: Voltage<T>) -> Self::Output {
12073 Time{s: self.Wb / rhs.V}
12074 }
12075}
12076impl<T> core::ops::Div<Voltage<T>> for &MagneticFlux<T> where T: NumLike {
12078 type Output = Time<T>;
12079 fn div(self, rhs: Voltage<T>) -> Self::Output {
12080 Time{s: self.Wb.clone() / rhs.V}
12081 }
12082}
12083impl<T> core::ops::Div<&Voltage<T>> for MagneticFlux<T> where T: NumLike {
12085 type Output = Time<T>;
12086 fn div(self, rhs: &Voltage<T>) -> Self::Output {
12087 Time{s: self.Wb / rhs.V.clone()}
12088 }
12089}
12090impl<T> core::ops::Div<&Voltage<T>> for &MagneticFlux<T> where T: NumLike {
12092 type Output = Time<T>;
12093 fn div(self, rhs: &Voltage<T>) -> Self::Output {
12094 Time{s: self.Wb.clone() / rhs.V.clone()}
12095 }
12096}
12097
12098impl<T> core::ops::Div<Area<T>> for MagneticFlux<T> where T: NumLike {
12101 type Output = MagneticFluxDensity<T>;
12102 fn div(self, rhs: Area<T>) -> Self::Output {
12103 MagneticFluxDensity{T: self.Wb / rhs.m2}
12104 }
12105}
12106impl<T> core::ops::Div<Area<T>> for &MagneticFlux<T> where T: NumLike {
12108 type Output = MagneticFluxDensity<T>;
12109 fn div(self, rhs: Area<T>) -> Self::Output {
12110 MagneticFluxDensity{T: self.Wb.clone() / rhs.m2}
12111 }
12112}
12113impl<T> core::ops::Div<&Area<T>> for MagneticFlux<T> where T: NumLike {
12115 type Output = MagneticFluxDensity<T>;
12116 fn div(self, rhs: &Area<T>) -> Self::Output {
12117 MagneticFluxDensity{T: self.Wb / rhs.m2.clone()}
12118 }
12119}
12120impl<T> core::ops::Div<&Area<T>> for &MagneticFlux<T> where T: NumLike {
12122 type Output = MagneticFluxDensity<T>;
12123 fn div(self, rhs: &Area<T>) -> Self::Output {
12124 MagneticFluxDensity{T: self.Wb.clone() / rhs.m2.clone()}
12125 }
12126}
12127
12128impl<T> core::ops::Mul<InverseArea<T>> for MagneticFlux<T> where T: NumLike {
12131 type Output = MagneticFluxDensity<T>;
12132 fn mul(self, rhs: InverseArea<T>) -> Self::Output {
12133 MagneticFluxDensity{T: self.Wb * rhs.per_m2}
12134 }
12135}
12136impl<T> core::ops::Mul<InverseArea<T>> for &MagneticFlux<T> where T: NumLike {
12138 type Output = MagneticFluxDensity<T>;
12139 fn mul(self, rhs: InverseArea<T>) -> Self::Output {
12140 MagneticFluxDensity{T: self.Wb.clone() * rhs.per_m2}
12141 }
12142}
12143impl<T> core::ops::Mul<&InverseArea<T>> for MagneticFlux<T> where T: NumLike {
12145 type Output = MagneticFluxDensity<T>;
12146 fn mul(self, rhs: &InverseArea<T>) -> Self::Output {
12147 MagneticFluxDensity{T: self.Wb * rhs.per_m2.clone()}
12148 }
12149}
12150impl<T> core::ops::Mul<&InverseArea<T>> for &MagneticFlux<T> where T: NumLike {
12152 type Output = MagneticFluxDensity<T>;
12153 fn mul(self, rhs: &InverseArea<T>) -> Self::Output {
12154 MagneticFluxDensity{T: self.Wb.clone() * rhs.per_m2.clone()}
12155 }
12156}
12157
12158impl<T> core::ops::Div<Energy<T>> for MagneticFlux<T> where T: NumLike {
12161 type Output = InverseCurrent<T>;
12162 fn div(self, rhs: Energy<T>) -> Self::Output {
12163 InverseCurrent{per_A: self.Wb / rhs.J}
12164 }
12165}
12166impl<T> core::ops::Div<Energy<T>> for &MagneticFlux<T> where T: NumLike {
12168 type Output = InverseCurrent<T>;
12169 fn div(self, rhs: Energy<T>) -> Self::Output {
12170 InverseCurrent{per_A: self.Wb.clone() / rhs.J}
12171 }
12172}
12173impl<T> core::ops::Div<&Energy<T>> for MagneticFlux<T> where T: NumLike {
12175 type Output = InverseCurrent<T>;
12176 fn div(self, rhs: &Energy<T>) -> Self::Output {
12177 InverseCurrent{per_A: self.Wb / rhs.J.clone()}
12178 }
12179}
12180impl<T> core::ops::Div<&Energy<T>> for &MagneticFlux<T> where T: NumLike {
12182 type Output = InverseCurrent<T>;
12183 fn div(self, rhs: &Energy<T>) -> Self::Output {
12184 InverseCurrent{per_A: self.Wb.clone() / rhs.J.clone()}
12185 }
12186}
12187
12188impl<T> core::ops::Div<Torque<T>> for MagneticFlux<T> where T: NumLike {
12191 type Output = InverseCurrent<T>;
12192 fn div(self, rhs: Torque<T>) -> Self::Output {
12193 InverseCurrent{per_A: self.Wb / rhs.Nm}
12194 }
12195}
12196impl<T> core::ops::Div<Torque<T>> for &MagneticFlux<T> where T: NumLike {
12198 type Output = InverseCurrent<T>;
12199 fn div(self, rhs: Torque<T>) -> Self::Output {
12200 InverseCurrent{per_A: self.Wb.clone() / rhs.Nm}
12201 }
12202}
12203impl<T> core::ops::Div<&Torque<T>> for MagneticFlux<T> where T: NumLike {
12205 type Output = InverseCurrent<T>;
12206 fn div(self, rhs: &Torque<T>) -> Self::Output {
12207 InverseCurrent{per_A: self.Wb / rhs.Nm.clone()}
12208 }
12209}
12210impl<T> core::ops::Div<&Torque<T>> for &MagneticFlux<T> where T: NumLike {
12212 type Output = InverseCurrent<T>;
12213 fn div(self, rhs: &Torque<T>) -> Self::Output {
12214 InverseCurrent{per_A: self.Wb.clone() / rhs.Nm.clone()}
12215 }
12216}
12217
12218impl<T> core::ops::Mul<Frequency<T>> for MagneticFlux<T> where T: NumLike {
12221 type Output = Voltage<T>;
12222 fn mul(self, rhs: Frequency<T>) -> Self::Output {
12223 Voltage{V: self.Wb * rhs.Hz}
12224 }
12225}
12226impl<T> core::ops::Mul<Frequency<T>> for &MagneticFlux<T> where T: NumLike {
12228 type Output = Voltage<T>;
12229 fn mul(self, rhs: Frequency<T>) -> Self::Output {
12230 Voltage{V: self.Wb.clone() * rhs.Hz}
12231 }
12232}
12233impl<T> core::ops::Mul<&Frequency<T>> for MagneticFlux<T> where T: NumLike {
12235 type Output = Voltage<T>;
12236 fn mul(self, rhs: &Frequency<T>) -> Self::Output {
12237 Voltage{V: self.Wb * rhs.Hz.clone()}
12238 }
12239}
12240impl<T> core::ops::Mul<&Frequency<T>> for &MagneticFlux<T> where T: NumLike {
12242 type Output = Voltage<T>;
12243 fn mul(self, rhs: &Frequency<T>) -> Self::Output {
12244 Voltage{V: self.Wb.clone() * rhs.Hz.clone()}
12245 }
12246}
12247
12248impl<T> core::ops::Mul<InverseEnergy<T>> for MagneticFlux<T> where T: NumLike {
12251 type Output = InverseCurrent<T>;
12252 fn mul(self, rhs: InverseEnergy<T>) -> Self::Output {
12253 InverseCurrent{per_A: self.Wb * rhs.per_J}
12254 }
12255}
12256impl<T> core::ops::Mul<InverseEnergy<T>> for &MagneticFlux<T> where T: NumLike {
12258 type Output = InverseCurrent<T>;
12259 fn mul(self, rhs: InverseEnergy<T>) -> Self::Output {
12260 InverseCurrent{per_A: self.Wb.clone() * rhs.per_J}
12261 }
12262}
12263impl<T> core::ops::Mul<&InverseEnergy<T>> for MagneticFlux<T> where T: NumLike {
12265 type Output = InverseCurrent<T>;
12266 fn mul(self, rhs: &InverseEnergy<T>) -> Self::Output {
12267 InverseCurrent{per_A: self.Wb * rhs.per_J.clone()}
12268 }
12269}
12270impl<T> core::ops::Mul<&InverseEnergy<T>> for &MagneticFlux<T> where T: NumLike {
12272 type Output = InverseCurrent<T>;
12273 fn mul(self, rhs: &InverseEnergy<T>) -> Self::Output {
12274 InverseCurrent{per_A: self.Wb.clone() * rhs.per_J.clone()}
12275 }
12276}
12277
12278impl<T> core::ops::Mul<InverseTorque<T>> for MagneticFlux<T> where T: NumLike {
12281 type Output = InverseCurrent<T>;
12282 fn mul(self, rhs: InverseTorque<T>) -> Self::Output {
12283 InverseCurrent{per_A: self.Wb * rhs.per_Nm}
12284 }
12285}
12286impl<T> core::ops::Mul<InverseTorque<T>> for &MagneticFlux<T> where T: NumLike {
12288 type Output = InverseCurrent<T>;
12289 fn mul(self, rhs: InverseTorque<T>) -> Self::Output {
12290 InverseCurrent{per_A: self.Wb.clone() * rhs.per_Nm}
12291 }
12292}
12293impl<T> core::ops::Mul<&InverseTorque<T>> for MagneticFlux<T> where T: NumLike {
12295 type Output = InverseCurrent<T>;
12296 fn mul(self, rhs: &InverseTorque<T>) -> Self::Output {
12297 InverseCurrent{per_A: self.Wb * rhs.per_Nm.clone()}
12298 }
12299}
12300impl<T> core::ops::Mul<&InverseTorque<T>> for &MagneticFlux<T> where T: NumLike {
12302 type Output = InverseCurrent<T>;
12303 fn mul(self, rhs: &InverseTorque<T>) -> Self::Output {
12304 InverseCurrent{per_A: self.Wb.clone() * rhs.per_Nm.clone()}
12305 }
12306}
12307
12308impl<T> core::ops::Div<MagneticFlux<T>> for f64 where T: NumLike+From<f64> {
12311 type Output = InverseMagneticFlux<T>;
12312 fn div(self, rhs: MagneticFlux<T>) -> Self::Output {
12313 InverseMagneticFlux{per_Wb: T::from(self) / rhs.Wb}
12314 }
12315}
12316impl<T> core::ops::Div<MagneticFlux<T>> for &f64 where T: NumLike+From<f64> {
12318 type Output = InverseMagneticFlux<T>;
12319 fn div(self, rhs: MagneticFlux<T>) -> Self::Output {
12320 InverseMagneticFlux{per_Wb: T::from(self.clone()) / rhs.Wb}
12321 }
12322}
12323impl<T> core::ops::Div<&MagneticFlux<T>> for f64 where T: NumLike+From<f64> {
12325 type Output = InverseMagneticFlux<T>;
12326 fn div(self, rhs: &MagneticFlux<T>) -> Self::Output {
12327 InverseMagneticFlux{per_Wb: T::from(self) / rhs.Wb.clone()}
12328 }
12329}
12330impl<T> core::ops::Div<&MagneticFlux<T>> for &f64 where T: NumLike+From<f64> {
12332 type Output = InverseMagneticFlux<T>;
12333 fn div(self, rhs: &MagneticFlux<T>) -> Self::Output {
12334 InverseMagneticFlux{per_Wb: T::from(self.clone()) / rhs.Wb.clone()}
12335 }
12336}
12337
12338impl<T> core::ops::Div<MagneticFlux<T>> for f32 where T: NumLike+From<f32> {
12341 type Output = InverseMagneticFlux<T>;
12342 fn div(self, rhs: MagneticFlux<T>) -> Self::Output {
12343 InverseMagneticFlux{per_Wb: T::from(self) / rhs.Wb}
12344 }
12345}
12346impl<T> core::ops::Div<MagneticFlux<T>> for &f32 where T: NumLike+From<f32> {
12348 type Output = InverseMagneticFlux<T>;
12349 fn div(self, rhs: MagneticFlux<T>) -> Self::Output {
12350 InverseMagneticFlux{per_Wb: T::from(self.clone()) / rhs.Wb}
12351 }
12352}
12353impl<T> core::ops::Div<&MagneticFlux<T>> for f32 where T: NumLike+From<f32> {
12355 type Output = InverseMagneticFlux<T>;
12356 fn div(self, rhs: &MagneticFlux<T>) -> Self::Output {
12357 InverseMagneticFlux{per_Wb: T::from(self) / rhs.Wb.clone()}
12358 }
12359}
12360impl<T> core::ops::Div<&MagneticFlux<T>> for &f32 where T: NumLike+From<f32> {
12362 type Output = InverseMagneticFlux<T>;
12363 fn div(self, rhs: &MagneticFlux<T>) -> Self::Output {
12364 InverseMagneticFlux{per_Wb: T::from(self.clone()) / rhs.Wb.clone()}
12365 }
12366}
12367
12368impl<T> core::ops::Div<MagneticFlux<T>> for i64 where T: NumLike+From<i64> {
12371 type Output = InverseMagneticFlux<T>;
12372 fn div(self, rhs: MagneticFlux<T>) -> Self::Output {
12373 InverseMagneticFlux{per_Wb: T::from(self) / rhs.Wb}
12374 }
12375}
12376impl<T> core::ops::Div<MagneticFlux<T>> for &i64 where T: NumLike+From<i64> {
12378 type Output = InverseMagneticFlux<T>;
12379 fn div(self, rhs: MagneticFlux<T>) -> Self::Output {
12380 InverseMagneticFlux{per_Wb: T::from(self.clone()) / rhs.Wb}
12381 }
12382}
12383impl<T> core::ops::Div<&MagneticFlux<T>> for i64 where T: NumLike+From<i64> {
12385 type Output = InverseMagneticFlux<T>;
12386 fn div(self, rhs: &MagneticFlux<T>) -> Self::Output {
12387 InverseMagneticFlux{per_Wb: T::from(self) / rhs.Wb.clone()}
12388 }
12389}
12390impl<T> core::ops::Div<&MagneticFlux<T>> for &i64 where T: NumLike+From<i64> {
12392 type Output = InverseMagneticFlux<T>;
12393 fn div(self, rhs: &MagneticFlux<T>) -> Self::Output {
12394 InverseMagneticFlux{per_Wb: T::from(self.clone()) / rhs.Wb.clone()}
12395 }
12396}
12397
12398impl<T> core::ops::Div<MagneticFlux<T>> for i32 where T: NumLike+From<i32> {
12401 type Output = InverseMagneticFlux<T>;
12402 fn div(self, rhs: MagneticFlux<T>) -> Self::Output {
12403 InverseMagneticFlux{per_Wb: T::from(self) / rhs.Wb}
12404 }
12405}
12406impl<T> core::ops::Div<MagneticFlux<T>> for &i32 where T: NumLike+From<i32> {
12408 type Output = InverseMagneticFlux<T>;
12409 fn div(self, rhs: MagneticFlux<T>) -> Self::Output {
12410 InverseMagneticFlux{per_Wb: T::from(self.clone()) / rhs.Wb}
12411 }
12412}
12413impl<T> core::ops::Div<&MagneticFlux<T>> for i32 where T: NumLike+From<i32> {
12415 type Output = InverseMagneticFlux<T>;
12416 fn div(self, rhs: &MagneticFlux<T>) -> Self::Output {
12417 InverseMagneticFlux{per_Wb: T::from(self) / rhs.Wb.clone()}
12418 }
12419}
12420impl<T> core::ops::Div<&MagneticFlux<T>> for &i32 where T: NumLike+From<i32> {
12422 type Output = InverseMagneticFlux<T>;
12423 fn div(self, rhs: &MagneticFlux<T>) -> Self::Output {
12424 InverseMagneticFlux{per_Wb: T::from(self.clone()) / rhs.Wb.clone()}
12425 }
12426}
12427
12428#[cfg(feature="num-bigfloat")]
12431impl<T> core::ops::Div<MagneticFlux<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
12432 type Output = InverseMagneticFlux<T>;
12433 fn div(self, rhs: MagneticFlux<T>) -> Self::Output {
12434 InverseMagneticFlux{per_Wb: T::from(self) / rhs.Wb}
12435 }
12436}
12437#[cfg(feature="num-bigfloat")]
12439impl<T> core::ops::Div<MagneticFlux<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
12440 type Output = InverseMagneticFlux<T>;
12441 fn div(self, rhs: MagneticFlux<T>) -> Self::Output {
12442 InverseMagneticFlux{per_Wb: T::from(self.clone()) / rhs.Wb}
12443 }
12444}
12445#[cfg(feature="num-bigfloat")]
12447impl<T> core::ops::Div<&MagneticFlux<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
12448 type Output = InverseMagneticFlux<T>;
12449 fn div(self, rhs: &MagneticFlux<T>) -> Self::Output {
12450 InverseMagneticFlux{per_Wb: T::from(self) / rhs.Wb.clone()}
12451 }
12452}
12453#[cfg(feature="num-bigfloat")]
12455impl<T> core::ops::Div<&MagneticFlux<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
12456 type Output = InverseMagneticFlux<T>;
12457 fn div(self, rhs: &MagneticFlux<T>) -> Self::Output {
12458 InverseMagneticFlux{per_Wb: T::from(self.clone()) / rhs.Wb.clone()}
12459 }
12460}
12461
12462#[cfg(feature="num-complex")]
12465impl<T> core::ops::Div<MagneticFlux<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
12466 type Output = InverseMagneticFlux<T>;
12467 fn div(self, rhs: MagneticFlux<T>) -> Self::Output {
12468 InverseMagneticFlux{per_Wb: T::from(self) / rhs.Wb}
12469 }
12470}
12471#[cfg(feature="num-complex")]
12473impl<T> core::ops::Div<MagneticFlux<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
12474 type Output = InverseMagneticFlux<T>;
12475 fn div(self, rhs: MagneticFlux<T>) -> Self::Output {
12476 InverseMagneticFlux{per_Wb: T::from(self.clone()) / rhs.Wb}
12477 }
12478}
12479#[cfg(feature="num-complex")]
12481impl<T> core::ops::Div<&MagneticFlux<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
12482 type Output = InverseMagneticFlux<T>;
12483 fn div(self, rhs: &MagneticFlux<T>) -> Self::Output {
12484 InverseMagneticFlux{per_Wb: T::from(self) / rhs.Wb.clone()}
12485 }
12486}
12487#[cfg(feature="num-complex")]
12489impl<T> core::ops::Div<&MagneticFlux<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
12490 type Output = InverseMagneticFlux<T>;
12491 fn div(self, rhs: &MagneticFlux<T>) -> Self::Output {
12492 InverseMagneticFlux{per_Wb: T::from(self.clone()) / rhs.Wb.clone()}
12493 }
12494}
12495
12496#[cfg(feature="num-complex")]
12499impl<T> core::ops::Div<MagneticFlux<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
12500 type Output = InverseMagneticFlux<T>;
12501 fn div(self, rhs: MagneticFlux<T>) -> Self::Output {
12502 InverseMagneticFlux{per_Wb: T::from(self) / rhs.Wb}
12503 }
12504}
12505#[cfg(feature="num-complex")]
12507impl<T> core::ops::Div<MagneticFlux<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
12508 type Output = InverseMagneticFlux<T>;
12509 fn div(self, rhs: MagneticFlux<T>) -> Self::Output {
12510 InverseMagneticFlux{per_Wb: T::from(self.clone()) / rhs.Wb}
12511 }
12512}
12513#[cfg(feature="num-complex")]
12515impl<T> core::ops::Div<&MagneticFlux<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
12516 type Output = InverseMagneticFlux<T>;
12517 fn div(self, rhs: &MagneticFlux<T>) -> Self::Output {
12518 InverseMagneticFlux{per_Wb: T::from(self) / rhs.Wb.clone()}
12519 }
12520}
12521#[cfg(feature="num-complex")]
12523impl<T> core::ops::Div<&MagneticFlux<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
12524 type Output = InverseMagneticFlux<T>;
12525 fn div(self, rhs: &MagneticFlux<T>) -> Self::Output {
12526 InverseMagneticFlux{per_Wb: T::from(self.clone()) / rhs.Wb.clone()}
12527 }
12528}
12529
12530#[derive(UnitStruct, Debug, Clone)]
12532#[cfg_attr(feature="serde", derive(Serialize, Deserialize))]
12533pub struct MagneticFluxDensity<T: NumLike>{
12534 pub T: T
12536}
12537
12538impl<T> MagneticFluxDensity<T> where T: NumLike {
12539
12540 pub fn unit_name() -> &'static str { "teslas" }
12542
12543 pub fn unit_symbol() -> &'static str { "T" }
12545
12546 pub fn from_T(T: T) -> Self { MagneticFluxDensity{T: T} }
12551
12552 pub fn to_T(&self) -> T { self.T.clone() }
12554
12555 pub fn from_teslas(teslas: T) -> Self { MagneticFluxDensity{T: teslas} }
12560
12561 pub fn to_teslas(&self) -> T { self.T.clone() }
12563
12564}
12565
12566impl<T> fmt::Display for MagneticFluxDensity<T> where T: NumLike {
12567 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
12568 write!(f, "{} {}", &self.T, Self::unit_symbol())
12569 }
12570}
12571
12572impl<T> MagneticFluxDensity<T> where T: NumLike+From<f64> {
12573
12574 pub fn to_mT(&self) -> T {
12578 return self.T.clone() * T::from(1000.0_f64);
12579 }
12580
12581 pub fn from_mT(mT: T) -> Self {
12588 MagneticFluxDensity{T: mT * T::from(0.001_f64)}
12589 }
12590
12591 pub fn to_uT(&self) -> T {
12595 return self.T.clone() * T::from(1000000.0_f64);
12596 }
12597
12598 pub fn from_uT(uT: T) -> Self {
12605 MagneticFluxDensity{T: uT * T::from(1e-06_f64)}
12606 }
12607
12608 pub fn to_nT(&self) -> T {
12612 return self.T.clone() * T::from(1000000000.0_f64);
12613 }
12614
12615 pub fn from_nT(nT: T) -> Self {
12622 MagneticFluxDensity{T: nT * T::from(1e-09_f64)}
12623 }
12624
12625 pub fn to_kT(&self) -> T {
12629 return self.T.clone() * T::from(0.001_f64);
12630 }
12631
12632 pub fn from_kT(kT: T) -> Self {
12639 MagneticFluxDensity{T: kT * T::from(1000.0_f64)}
12640 }
12641
12642 pub fn to_MT(&self) -> T {
12646 return self.T.clone() * T::from(1e-06_f64);
12647 }
12648
12649 pub fn from_MT(MT: T) -> Self {
12656 MagneticFluxDensity{T: MT * T::from(1000000.0_f64)}
12657 }
12658
12659 pub fn to_GT(&self) -> T {
12663 return self.T.clone() * T::from(1e-09_f64);
12664 }
12665
12666 pub fn from_GT(GT: T) -> Self {
12673 MagneticFluxDensity{T: GT * T::from(1000000000.0_f64)}
12674 }
12675
12676}
12677
12678
12679#[cfg(feature="num-bigfloat")]
12681impl core::ops::Mul<MagneticFluxDensity<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
12682 type Output = MagneticFluxDensity<num_bigfloat::BigFloat>;
12683 fn mul(self, rhs: MagneticFluxDensity<num_bigfloat::BigFloat>) -> Self::Output {
12684 MagneticFluxDensity{T: self * rhs.T}
12685 }
12686}
12687#[cfg(feature="num-bigfloat")]
12689impl core::ops::Mul<MagneticFluxDensity<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
12690 type Output = MagneticFluxDensity<num_bigfloat::BigFloat>;
12691 fn mul(self, rhs: MagneticFluxDensity<num_bigfloat::BigFloat>) -> Self::Output {
12692 MagneticFluxDensity{T: self.clone() * rhs.T}
12693 }
12694}
12695#[cfg(feature="num-bigfloat")]
12697impl core::ops::Mul<&MagneticFluxDensity<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
12698 type Output = MagneticFluxDensity<num_bigfloat::BigFloat>;
12699 fn mul(self, rhs: &MagneticFluxDensity<num_bigfloat::BigFloat>) -> Self::Output {
12700 MagneticFluxDensity{T: self * rhs.T.clone()}
12701 }
12702}
12703#[cfg(feature="num-bigfloat")]
12705impl core::ops::Mul<&MagneticFluxDensity<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
12706 type Output = MagneticFluxDensity<num_bigfloat::BigFloat>;
12707 fn mul(self, rhs: &MagneticFluxDensity<num_bigfloat::BigFloat>) -> Self::Output {
12708 MagneticFluxDensity{T: self.clone() * rhs.T.clone()}
12709 }
12710}
12711
12712#[cfg(feature="num-complex")]
12714impl core::ops::Mul<MagneticFluxDensity<num_complex::Complex32>> for num_complex::Complex32 {
12715 type Output = MagneticFluxDensity<num_complex::Complex32>;
12716 fn mul(self, rhs: MagneticFluxDensity<num_complex::Complex32>) -> Self::Output {
12717 MagneticFluxDensity{T: self * rhs.T}
12718 }
12719}
12720#[cfg(feature="num-complex")]
12722impl core::ops::Mul<MagneticFluxDensity<num_complex::Complex32>> for &num_complex::Complex32 {
12723 type Output = MagneticFluxDensity<num_complex::Complex32>;
12724 fn mul(self, rhs: MagneticFluxDensity<num_complex::Complex32>) -> Self::Output {
12725 MagneticFluxDensity{T: self.clone() * rhs.T}
12726 }
12727}
12728#[cfg(feature="num-complex")]
12730impl core::ops::Mul<&MagneticFluxDensity<num_complex::Complex32>> for num_complex::Complex32 {
12731 type Output = MagneticFluxDensity<num_complex::Complex32>;
12732 fn mul(self, rhs: &MagneticFluxDensity<num_complex::Complex32>) -> Self::Output {
12733 MagneticFluxDensity{T: self * rhs.T.clone()}
12734 }
12735}
12736#[cfg(feature="num-complex")]
12738impl core::ops::Mul<&MagneticFluxDensity<num_complex::Complex32>> for &num_complex::Complex32 {
12739 type Output = MagneticFluxDensity<num_complex::Complex32>;
12740 fn mul(self, rhs: &MagneticFluxDensity<num_complex::Complex32>) -> Self::Output {
12741 MagneticFluxDensity{T: self.clone() * rhs.T.clone()}
12742 }
12743}
12744
12745#[cfg(feature="num-complex")]
12747impl core::ops::Mul<MagneticFluxDensity<num_complex::Complex64>> for num_complex::Complex64 {
12748 type Output = MagneticFluxDensity<num_complex::Complex64>;
12749 fn mul(self, rhs: MagneticFluxDensity<num_complex::Complex64>) -> Self::Output {
12750 MagneticFluxDensity{T: self * rhs.T}
12751 }
12752}
12753#[cfg(feature="num-complex")]
12755impl core::ops::Mul<MagneticFluxDensity<num_complex::Complex64>> for &num_complex::Complex64 {
12756 type Output = MagneticFluxDensity<num_complex::Complex64>;
12757 fn mul(self, rhs: MagneticFluxDensity<num_complex::Complex64>) -> Self::Output {
12758 MagneticFluxDensity{T: self.clone() * rhs.T}
12759 }
12760}
12761#[cfg(feature="num-complex")]
12763impl core::ops::Mul<&MagneticFluxDensity<num_complex::Complex64>> for num_complex::Complex64 {
12764 type Output = MagneticFluxDensity<num_complex::Complex64>;
12765 fn mul(self, rhs: &MagneticFluxDensity<num_complex::Complex64>) -> Self::Output {
12766 MagneticFluxDensity{T: self * rhs.T.clone()}
12767 }
12768}
12769#[cfg(feature="num-complex")]
12771impl core::ops::Mul<&MagneticFluxDensity<num_complex::Complex64>> for &num_complex::Complex64 {
12772 type Output = MagneticFluxDensity<num_complex::Complex64>;
12773 fn mul(self, rhs: &MagneticFluxDensity<num_complex::Complex64>) -> Self::Output {
12774 MagneticFluxDensity{T: self.clone() * rhs.T.clone()}
12775 }
12776}
12777
12778
12779
12780#[cfg(feature = "uom")]
12782impl<T> Into<uom::si::f32::MagneticFluxDensity> for MagneticFluxDensity<T> where T: NumLike+Into<f32> {
12783 fn into(self) -> uom::si::f32::MagneticFluxDensity {
12784 uom::si::f32::MagneticFluxDensity::new::<uom::si::magnetic_flux_density::tesla>(self.T.into())
12785 }
12786}
12787
12788#[cfg(feature = "uom")]
12790impl<T> From<uom::si::f32::MagneticFluxDensity> for MagneticFluxDensity<T> where T: NumLike+From<f32> {
12791 fn from(src: uom::si::f32::MagneticFluxDensity) -> Self {
12792 MagneticFluxDensity{T: T::from(src.value)}
12793 }
12794}
12795
12796#[cfg(feature = "uom")]
12798impl<T> Into<uom::si::f64::MagneticFluxDensity> for MagneticFluxDensity<T> where T: NumLike+Into<f64> {
12799 fn into(self) -> uom::si::f64::MagneticFluxDensity {
12800 uom::si::f64::MagneticFluxDensity::new::<uom::si::magnetic_flux_density::tesla>(self.T.into())
12801 }
12802}
12803
12804#[cfg(feature = "uom")]
12806impl<T> From<uom::si::f64::MagneticFluxDensity> for MagneticFluxDensity<T> where T: NumLike+From<f64> {
12807 fn from(src: uom::si::f64::MagneticFluxDensity) -> Self {
12808 MagneticFluxDensity{T: T::from(src.value)}
12809 }
12810}
12811
12812
12813impl<T> core::ops::Mul<InverseMagneticFlux<T>> for MagneticFluxDensity<T> where T: NumLike {
12816 type Output = InverseArea<T>;
12817 fn mul(self, rhs: InverseMagneticFlux<T>) -> Self::Output {
12818 InverseArea{per_m2: self.T * rhs.per_Wb}
12819 }
12820}
12821impl<T> core::ops::Mul<InverseMagneticFlux<T>> for &MagneticFluxDensity<T> where T: NumLike {
12823 type Output = InverseArea<T>;
12824 fn mul(self, rhs: InverseMagneticFlux<T>) -> Self::Output {
12825 InverseArea{per_m2: self.T.clone() * rhs.per_Wb}
12826 }
12827}
12828impl<T> core::ops::Mul<&InverseMagneticFlux<T>> for MagneticFluxDensity<T> where T: NumLike {
12830 type Output = InverseArea<T>;
12831 fn mul(self, rhs: &InverseMagneticFlux<T>) -> Self::Output {
12832 InverseArea{per_m2: self.T * rhs.per_Wb.clone()}
12833 }
12834}
12835impl<T> core::ops::Mul<&InverseMagneticFlux<T>> for &MagneticFluxDensity<T> where T: NumLike {
12837 type Output = InverseArea<T>;
12838 fn mul(self, rhs: &InverseMagneticFlux<T>) -> Self::Output {
12839 InverseArea{per_m2: self.T.clone() * rhs.per_Wb.clone()}
12840 }
12841}
12842
12843impl<T> core::ops::Div<MagneticFlux<T>> for MagneticFluxDensity<T> where T: NumLike {
12846 type Output = InverseArea<T>;
12847 fn div(self, rhs: MagneticFlux<T>) -> Self::Output {
12848 InverseArea{per_m2: self.T / rhs.Wb}
12849 }
12850}
12851impl<T> core::ops::Div<MagneticFlux<T>> for &MagneticFluxDensity<T> where T: NumLike {
12853 type Output = InverseArea<T>;
12854 fn div(self, rhs: MagneticFlux<T>) -> Self::Output {
12855 InverseArea{per_m2: self.T.clone() / rhs.Wb}
12856 }
12857}
12858impl<T> core::ops::Div<&MagneticFlux<T>> for MagneticFluxDensity<T> where T: NumLike {
12860 type Output = InverseArea<T>;
12861 fn div(self, rhs: &MagneticFlux<T>) -> Self::Output {
12862 InverseArea{per_m2: self.T / rhs.Wb.clone()}
12863 }
12864}
12865impl<T> core::ops::Div<&MagneticFlux<T>> for &MagneticFluxDensity<T> where T: NumLike {
12867 type Output = InverseArea<T>;
12868 fn div(self, rhs: &MagneticFlux<T>) -> Self::Output {
12869 InverseArea{per_m2: self.T.clone() / rhs.Wb.clone()}
12870 }
12871}
12872
12873impl<T> core::ops::Mul<Area<T>> for MagneticFluxDensity<T> where T: NumLike {
12876 type Output = MagneticFlux<T>;
12877 fn mul(self, rhs: Area<T>) -> Self::Output {
12878 MagneticFlux{Wb: self.T * rhs.m2}
12879 }
12880}
12881impl<T> core::ops::Mul<Area<T>> for &MagneticFluxDensity<T> where T: NumLike {
12883 type Output = MagneticFlux<T>;
12884 fn mul(self, rhs: Area<T>) -> Self::Output {
12885 MagneticFlux{Wb: self.T.clone() * rhs.m2}
12886 }
12887}
12888impl<T> core::ops::Mul<&Area<T>> for MagneticFluxDensity<T> where T: NumLike {
12890 type Output = MagneticFlux<T>;
12891 fn mul(self, rhs: &Area<T>) -> Self::Output {
12892 MagneticFlux{Wb: self.T * rhs.m2.clone()}
12893 }
12894}
12895impl<T> core::ops::Mul<&Area<T>> for &MagneticFluxDensity<T> where T: NumLike {
12897 type Output = MagneticFlux<T>;
12898 fn mul(self, rhs: &Area<T>) -> Self::Output {
12899 MagneticFlux{Wb: self.T.clone() * rhs.m2.clone()}
12900 }
12901}
12902
12903impl<T> core::ops::Div<InverseArea<T>> for MagneticFluxDensity<T> where T: NumLike {
12906 type Output = MagneticFlux<T>;
12907 fn div(self, rhs: InverseArea<T>) -> Self::Output {
12908 MagneticFlux{Wb: self.T / rhs.per_m2}
12909 }
12910}
12911impl<T> core::ops::Div<InverseArea<T>> for &MagneticFluxDensity<T> where T: NumLike {
12913 type Output = MagneticFlux<T>;
12914 fn div(self, rhs: InverseArea<T>) -> Self::Output {
12915 MagneticFlux{Wb: self.T.clone() / rhs.per_m2}
12916 }
12917}
12918impl<T> core::ops::Div<&InverseArea<T>> for MagneticFluxDensity<T> where T: NumLike {
12920 type Output = MagneticFlux<T>;
12921 fn div(self, rhs: &InverseArea<T>) -> Self::Output {
12922 MagneticFlux{Wb: self.T / rhs.per_m2.clone()}
12923 }
12924}
12925impl<T> core::ops::Div<&InverseArea<T>> for &MagneticFluxDensity<T> where T: NumLike {
12927 type Output = MagneticFlux<T>;
12928 fn div(self, rhs: &InverseArea<T>) -> Self::Output {
12929 MagneticFlux{Wb: self.T.clone() / rhs.per_m2.clone()}
12930 }
12931}
12932
12933impl<T> core::ops::Div<MagneticFluxDensity<T>> for f64 where T: NumLike+From<f64> {
12936 type Output = InverseMagneticFluxDensity<T>;
12937 fn div(self, rhs: MagneticFluxDensity<T>) -> Self::Output {
12938 InverseMagneticFluxDensity{m2_per_Wb: T::from(self) / rhs.T}
12939 }
12940}
12941impl<T> core::ops::Div<MagneticFluxDensity<T>> for &f64 where T: NumLike+From<f64> {
12943 type Output = InverseMagneticFluxDensity<T>;
12944 fn div(self, rhs: MagneticFluxDensity<T>) -> Self::Output {
12945 InverseMagneticFluxDensity{m2_per_Wb: T::from(self.clone()) / rhs.T}
12946 }
12947}
12948impl<T> core::ops::Div<&MagneticFluxDensity<T>> for f64 where T: NumLike+From<f64> {
12950 type Output = InverseMagneticFluxDensity<T>;
12951 fn div(self, rhs: &MagneticFluxDensity<T>) -> Self::Output {
12952 InverseMagneticFluxDensity{m2_per_Wb: T::from(self) / rhs.T.clone()}
12953 }
12954}
12955impl<T> core::ops::Div<&MagneticFluxDensity<T>> for &f64 where T: NumLike+From<f64> {
12957 type Output = InverseMagneticFluxDensity<T>;
12958 fn div(self, rhs: &MagneticFluxDensity<T>) -> Self::Output {
12959 InverseMagneticFluxDensity{m2_per_Wb: T::from(self.clone()) / rhs.T.clone()}
12960 }
12961}
12962
12963impl<T> core::ops::Div<MagneticFluxDensity<T>> for f32 where T: NumLike+From<f32> {
12966 type Output = InverseMagneticFluxDensity<T>;
12967 fn div(self, rhs: MagneticFluxDensity<T>) -> Self::Output {
12968 InverseMagneticFluxDensity{m2_per_Wb: T::from(self) / rhs.T}
12969 }
12970}
12971impl<T> core::ops::Div<MagneticFluxDensity<T>> for &f32 where T: NumLike+From<f32> {
12973 type Output = InverseMagneticFluxDensity<T>;
12974 fn div(self, rhs: MagneticFluxDensity<T>) -> Self::Output {
12975 InverseMagneticFluxDensity{m2_per_Wb: T::from(self.clone()) / rhs.T}
12976 }
12977}
12978impl<T> core::ops::Div<&MagneticFluxDensity<T>> for f32 where T: NumLike+From<f32> {
12980 type Output = InverseMagneticFluxDensity<T>;
12981 fn div(self, rhs: &MagneticFluxDensity<T>) -> Self::Output {
12982 InverseMagneticFluxDensity{m2_per_Wb: T::from(self) / rhs.T.clone()}
12983 }
12984}
12985impl<T> core::ops::Div<&MagneticFluxDensity<T>> for &f32 where T: NumLike+From<f32> {
12987 type Output = InverseMagneticFluxDensity<T>;
12988 fn div(self, rhs: &MagneticFluxDensity<T>) -> Self::Output {
12989 InverseMagneticFluxDensity{m2_per_Wb: T::from(self.clone()) / rhs.T.clone()}
12990 }
12991}
12992
12993impl<T> core::ops::Div<MagneticFluxDensity<T>> for i64 where T: NumLike+From<i64> {
12996 type Output = InverseMagneticFluxDensity<T>;
12997 fn div(self, rhs: MagneticFluxDensity<T>) -> Self::Output {
12998 InverseMagneticFluxDensity{m2_per_Wb: T::from(self) / rhs.T}
12999 }
13000}
13001impl<T> core::ops::Div<MagneticFluxDensity<T>> for &i64 where T: NumLike+From<i64> {
13003 type Output = InverseMagneticFluxDensity<T>;
13004 fn div(self, rhs: MagneticFluxDensity<T>) -> Self::Output {
13005 InverseMagneticFluxDensity{m2_per_Wb: T::from(self.clone()) / rhs.T}
13006 }
13007}
13008impl<T> core::ops::Div<&MagneticFluxDensity<T>> for i64 where T: NumLike+From<i64> {
13010 type Output = InverseMagneticFluxDensity<T>;
13011 fn div(self, rhs: &MagneticFluxDensity<T>) -> Self::Output {
13012 InverseMagneticFluxDensity{m2_per_Wb: T::from(self) / rhs.T.clone()}
13013 }
13014}
13015impl<T> core::ops::Div<&MagneticFluxDensity<T>> for &i64 where T: NumLike+From<i64> {
13017 type Output = InverseMagneticFluxDensity<T>;
13018 fn div(self, rhs: &MagneticFluxDensity<T>) -> Self::Output {
13019 InverseMagneticFluxDensity{m2_per_Wb: T::from(self.clone()) / rhs.T.clone()}
13020 }
13021}
13022
13023impl<T> core::ops::Div<MagneticFluxDensity<T>> for i32 where T: NumLike+From<i32> {
13026 type Output = InverseMagneticFluxDensity<T>;
13027 fn div(self, rhs: MagneticFluxDensity<T>) -> Self::Output {
13028 InverseMagneticFluxDensity{m2_per_Wb: T::from(self) / rhs.T}
13029 }
13030}
13031impl<T> core::ops::Div<MagneticFluxDensity<T>> for &i32 where T: NumLike+From<i32> {
13033 type Output = InverseMagneticFluxDensity<T>;
13034 fn div(self, rhs: MagneticFluxDensity<T>) -> Self::Output {
13035 InverseMagneticFluxDensity{m2_per_Wb: T::from(self.clone()) / rhs.T}
13036 }
13037}
13038impl<T> core::ops::Div<&MagneticFluxDensity<T>> for i32 where T: NumLike+From<i32> {
13040 type Output = InverseMagneticFluxDensity<T>;
13041 fn div(self, rhs: &MagneticFluxDensity<T>) -> Self::Output {
13042 InverseMagneticFluxDensity{m2_per_Wb: T::from(self) / rhs.T.clone()}
13043 }
13044}
13045impl<T> core::ops::Div<&MagneticFluxDensity<T>> for &i32 where T: NumLike+From<i32> {
13047 type Output = InverseMagneticFluxDensity<T>;
13048 fn div(self, rhs: &MagneticFluxDensity<T>) -> Self::Output {
13049 InverseMagneticFluxDensity{m2_per_Wb: T::from(self.clone()) / rhs.T.clone()}
13050 }
13051}
13052
13053#[cfg(feature="num-bigfloat")]
13056impl<T> core::ops::Div<MagneticFluxDensity<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
13057 type Output = InverseMagneticFluxDensity<T>;
13058 fn div(self, rhs: MagneticFluxDensity<T>) -> Self::Output {
13059 InverseMagneticFluxDensity{m2_per_Wb: T::from(self) / rhs.T}
13060 }
13061}
13062#[cfg(feature="num-bigfloat")]
13064impl<T> core::ops::Div<MagneticFluxDensity<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
13065 type Output = InverseMagneticFluxDensity<T>;
13066 fn div(self, rhs: MagneticFluxDensity<T>) -> Self::Output {
13067 InverseMagneticFluxDensity{m2_per_Wb: T::from(self.clone()) / rhs.T}
13068 }
13069}
13070#[cfg(feature="num-bigfloat")]
13072impl<T> core::ops::Div<&MagneticFluxDensity<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
13073 type Output = InverseMagneticFluxDensity<T>;
13074 fn div(self, rhs: &MagneticFluxDensity<T>) -> Self::Output {
13075 InverseMagneticFluxDensity{m2_per_Wb: T::from(self) / rhs.T.clone()}
13076 }
13077}
13078#[cfg(feature="num-bigfloat")]
13080impl<T> core::ops::Div<&MagneticFluxDensity<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
13081 type Output = InverseMagneticFluxDensity<T>;
13082 fn div(self, rhs: &MagneticFluxDensity<T>) -> Self::Output {
13083 InverseMagneticFluxDensity{m2_per_Wb: T::from(self.clone()) / rhs.T.clone()}
13084 }
13085}
13086
13087#[cfg(feature="num-complex")]
13090impl<T> core::ops::Div<MagneticFluxDensity<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
13091 type Output = InverseMagneticFluxDensity<T>;
13092 fn div(self, rhs: MagneticFluxDensity<T>) -> Self::Output {
13093 InverseMagneticFluxDensity{m2_per_Wb: T::from(self) / rhs.T}
13094 }
13095}
13096#[cfg(feature="num-complex")]
13098impl<T> core::ops::Div<MagneticFluxDensity<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
13099 type Output = InverseMagneticFluxDensity<T>;
13100 fn div(self, rhs: MagneticFluxDensity<T>) -> Self::Output {
13101 InverseMagneticFluxDensity{m2_per_Wb: T::from(self.clone()) / rhs.T}
13102 }
13103}
13104#[cfg(feature="num-complex")]
13106impl<T> core::ops::Div<&MagneticFluxDensity<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
13107 type Output = InverseMagneticFluxDensity<T>;
13108 fn div(self, rhs: &MagneticFluxDensity<T>) -> Self::Output {
13109 InverseMagneticFluxDensity{m2_per_Wb: T::from(self) / rhs.T.clone()}
13110 }
13111}
13112#[cfg(feature="num-complex")]
13114impl<T> core::ops::Div<&MagneticFluxDensity<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
13115 type Output = InverseMagneticFluxDensity<T>;
13116 fn div(self, rhs: &MagneticFluxDensity<T>) -> Self::Output {
13117 InverseMagneticFluxDensity{m2_per_Wb: T::from(self.clone()) / rhs.T.clone()}
13118 }
13119}
13120
13121#[cfg(feature="num-complex")]
13124impl<T> core::ops::Div<MagneticFluxDensity<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
13125 type Output = InverseMagneticFluxDensity<T>;
13126 fn div(self, rhs: MagneticFluxDensity<T>) -> Self::Output {
13127 InverseMagneticFluxDensity{m2_per_Wb: T::from(self) / rhs.T}
13128 }
13129}
13130#[cfg(feature="num-complex")]
13132impl<T> core::ops::Div<MagneticFluxDensity<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
13133 type Output = InverseMagneticFluxDensity<T>;
13134 fn div(self, rhs: MagneticFluxDensity<T>) -> Self::Output {
13135 InverseMagneticFluxDensity{m2_per_Wb: T::from(self.clone()) / rhs.T}
13136 }
13137}
13138#[cfg(feature="num-complex")]
13140impl<T> core::ops::Div<&MagneticFluxDensity<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
13141 type Output = InverseMagneticFluxDensity<T>;
13142 fn div(self, rhs: &MagneticFluxDensity<T>) -> Self::Output {
13143 InverseMagneticFluxDensity{m2_per_Wb: T::from(self) / rhs.T.clone()}
13144 }
13145}
13146#[cfg(feature="num-complex")]
13148impl<T> core::ops::Div<&MagneticFluxDensity<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
13149 type Output = InverseMagneticFluxDensity<T>;
13150 fn div(self, rhs: &MagneticFluxDensity<T>) -> Self::Output {
13151 InverseMagneticFluxDensity{m2_per_Wb: T::from(self.clone()) / rhs.T.clone()}
13152 }
13153}
13154
13155#[derive(UnitStruct, Debug, Clone)]
13157#[cfg_attr(feature="serde", derive(Serialize, Deserialize))]
13158pub struct Resistance<T: NumLike>{
13159 pub Ohm: T
13161}
13162
13163impl<T> Resistance<T> where T: NumLike {
13164
13165 pub fn unit_name() -> &'static str { "ohms" }
13167
13168 pub fn unit_symbol() -> &'static str { "Ohm" }
13170
13171 pub fn from_Ohm(Ohm: T) -> Self { Resistance{Ohm: Ohm} }
13176
13177 pub fn to_Ohm(&self) -> T { self.Ohm.clone() }
13179
13180 pub fn from_ohms(ohms: T) -> Self { Resistance{Ohm: ohms} }
13185
13186 pub fn to_ohms(&self) -> T { self.Ohm.clone() }
13188
13189}
13190
13191impl<T> fmt::Display for Resistance<T> where T: NumLike {
13192 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
13193 write!(f, "{} {}", &self.Ohm, Self::unit_symbol())
13194 }
13195}
13196
13197impl<T> Resistance<T> where T: NumLike+From<f64> {
13198
13199 pub fn to_mOhm(&self) -> T {
13203 return self.Ohm.clone() * T::from(1000.0_f64);
13204 }
13205
13206 pub fn from_mOhm(mOhm: T) -> Self {
13213 Resistance{Ohm: mOhm * T::from(0.001_f64)}
13214 }
13215
13216 pub fn to_uOhm(&self) -> T {
13220 return self.Ohm.clone() * T::from(1000000.0_f64);
13221 }
13222
13223 pub fn from_uOhm(uOhm: T) -> Self {
13230 Resistance{Ohm: uOhm * T::from(1e-06_f64)}
13231 }
13232
13233 pub fn to_nOhm(&self) -> T {
13237 return self.Ohm.clone() * T::from(1000000000.0_f64);
13238 }
13239
13240 pub fn from_nOhm(nOhm: T) -> Self {
13247 Resistance{Ohm: nOhm * T::from(1e-09_f64)}
13248 }
13249
13250 pub fn to_kOhm(&self) -> T {
13254 return self.Ohm.clone() * T::from(0.001_f64);
13255 }
13256
13257 pub fn from_kOhm(kOhm: T) -> Self {
13264 Resistance{Ohm: kOhm * T::from(1000.0_f64)}
13265 }
13266
13267 pub fn to_MOhm(&self) -> T {
13271 return self.Ohm.clone() * T::from(1e-06_f64);
13272 }
13273
13274 pub fn from_MOhm(MOhm: T) -> Self {
13281 Resistance{Ohm: MOhm * T::from(1000000.0_f64)}
13282 }
13283
13284 pub fn to_GOhm(&self) -> T {
13288 return self.Ohm.clone() * T::from(1e-09_f64);
13289 }
13290
13291 pub fn from_GOhm(GOhm: T) -> Self {
13298 Resistance{Ohm: GOhm * T::from(1000000000.0_f64)}
13299 }
13300
13301}
13302
13303
13304#[cfg(feature="num-bigfloat")]
13306impl core::ops::Mul<Resistance<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
13307 type Output = Resistance<num_bigfloat::BigFloat>;
13308 fn mul(self, rhs: Resistance<num_bigfloat::BigFloat>) -> Self::Output {
13309 Resistance{Ohm: self * rhs.Ohm}
13310 }
13311}
13312#[cfg(feature="num-bigfloat")]
13314impl core::ops::Mul<Resistance<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
13315 type Output = Resistance<num_bigfloat::BigFloat>;
13316 fn mul(self, rhs: Resistance<num_bigfloat::BigFloat>) -> Self::Output {
13317 Resistance{Ohm: self.clone() * rhs.Ohm}
13318 }
13319}
13320#[cfg(feature="num-bigfloat")]
13322impl core::ops::Mul<&Resistance<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
13323 type Output = Resistance<num_bigfloat::BigFloat>;
13324 fn mul(self, rhs: &Resistance<num_bigfloat::BigFloat>) -> Self::Output {
13325 Resistance{Ohm: self * rhs.Ohm.clone()}
13326 }
13327}
13328#[cfg(feature="num-bigfloat")]
13330impl core::ops::Mul<&Resistance<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
13331 type Output = Resistance<num_bigfloat::BigFloat>;
13332 fn mul(self, rhs: &Resistance<num_bigfloat::BigFloat>) -> Self::Output {
13333 Resistance{Ohm: self.clone() * rhs.Ohm.clone()}
13334 }
13335}
13336
13337#[cfg(feature="num-complex")]
13339impl core::ops::Mul<Resistance<num_complex::Complex32>> for num_complex::Complex32 {
13340 type Output = Resistance<num_complex::Complex32>;
13341 fn mul(self, rhs: Resistance<num_complex::Complex32>) -> Self::Output {
13342 Resistance{Ohm: self * rhs.Ohm}
13343 }
13344}
13345#[cfg(feature="num-complex")]
13347impl core::ops::Mul<Resistance<num_complex::Complex32>> for &num_complex::Complex32 {
13348 type Output = Resistance<num_complex::Complex32>;
13349 fn mul(self, rhs: Resistance<num_complex::Complex32>) -> Self::Output {
13350 Resistance{Ohm: self.clone() * rhs.Ohm}
13351 }
13352}
13353#[cfg(feature="num-complex")]
13355impl core::ops::Mul<&Resistance<num_complex::Complex32>> for num_complex::Complex32 {
13356 type Output = Resistance<num_complex::Complex32>;
13357 fn mul(self, rhs: &Resistance<num_complex::Complex32>) -> Self::Output {
13358 Resistance{Ohm: self * rhs.Ohm.clone()}
13359 }
13360}
13361#[cfg(feature="num-complex")]
13363impl core::ops::Mul<&Resistance<num_complex::Complex32>> for &num_complex::Complex32 {
13364 type Output = Resistance<num_complex::Complex32>;
13365 fn mul(self, rhs: &Resistance<num_complex::Complex32>) -> Self::Output {
13366 Resistance{Ohm: self.clone() * rhs.Ohm.clone()}
13367 }
13368}
13369
13370#[cfg(feature="num-complex")]
13372impl core::ops::Mul<Resistance<num_complex::Complex64>> for num_complex::Complex64 {
13373 type Output = Resistance<num_complex::Complex64>;
13374 fn mul(self, rhs: Resistance<num_complex::Complex64>) -> Self::Output {
13375 Resistance{Ohm: self * rhs.Ohm}
13376 }
13377}
13378#[cfg(feature="num-complex")]
13380impl core::ops::Mul<Resistance<num_complex::Complex64>> for &num_complex::Complex64 {
13381 type Output = Resistance<num_complex::Complex64>;
13382 fn mul(self, rhs: Resistance<num_complex::Complex64>) -> Self::Output {
13383 Resistance{Ohm: self.clone() * rhs.Ohm}
13384 }
13385}
13386#[cfg(feature="num-complex")]
13388impl core::ops::Mul<&Resistance<num_complex::Complex64>> for num_complex::Complex64 {
13389 type Output = Resistance<num_complex::Complex64>;
13390 fn mul(self, rhs: &Resistance<num_complex::Complex64>) -> Self::Output {
13391 Resistance{Ohm: self * rhs.Ohm.clone()}
13392 }
13393}
13394#[cfg(feature="num-complex")]
13396impl core::ops::Mul<&Resistance<num_complex::Complex64>> for &num_complex::Complex64 {
13397 type Output = Resistance<num_complex::Complex64>;
13398 fn mul(self, rhs: &Resistance<num_complex::Complex64>) -> Self::Output {
13399 Resistance{Ohm: self.clone() * rhs.Ohm.clone()}
13400 }
13401}
13402
13403
13404
13405#[cfg(feature = "uom")]
13407impl<T> Into<uom::si::f32::ElectricalResistance> for Resistance<T> where T: NumLike+Into<f32> {
13408 fn into(self) -> uom::si::f32::ElectricalResistance {
13409 uom::si::f32::ElectricalResistance::new::<uom::si::electrical_resistance::ohm>(self.Ohm.into())
13410 }
13411}
13412
13413#[cfg(feature = "uom")]
13415impl<T> From<uom::si::f32::ElectricalResistance> for Resistance<T> where T: NumLike+From<f32> {
13416 fn from(src: uom::si::f32::ElectricalResistance) -> Self {
13417 Resistance{Ohm: T::from(src.value)}
13418 }
13419}
13420
13421#[cfg(feature = "uom")]
13423impl<T> Into<uom::si::f64::ElectricalResistance> for Resistance<T> where T: NumLike+Into<f64> {
13424 fn into(self) -> uom::si::f64::ElectricalResistance {
13425 uom::si::f64::ElectricalResistance::new::<uom::si::electrical_resistance::ohm>(self.Ohm.into())
13426 }
13427}
13428
13429#[cfg(feature = "uom")]
13431impl<T> From<uom::si::f64::ElectricalResistance> for Resistance<T> where T: NumLike+From<f64> {
13432 fn from(src: uom::si::f64::ElectricalResistance) -> Self {
13433 Resistance{Ohm: T::from(src.value)}
13434 }
13435}
13436
13437
13438impl<T> core::ops::Mul<Current<T>> for Resistance<T> where T: NumLike {
13441 type Output = Voltage<T>;
13442 fn mul(self, rhs: Current<T>) -> Self::Output {
13443 Voltage{V: self.Ohm * rhs.A}
13444 }
13445}
13446impl<T> core::ops::Mul<Current<T>> for &Resistance<T> where T: NumLike {
13448 type Output = Voltage<T>;
13449 fn mul(self, rhs: Current<T>) -> Self::Output {
13450 Voltage{V: self.Ohm.clone() * rhs.A}
13451 }
13452}
13453impl<T> core::ops::Mul<&Current<T>> for Resistance<T> where T: NumLike {
13455 type Output = Voltage<T>;
13456 fn mul(self, rhs: &Current<T>) -> Self::Output {
13457 Voltage{V: self.Ohm * rhs.A.clone()}
13458 }
13459}
13460impl<T> core::ops::Mul<&Current<T>> for &Resistance<T> where T: NumLike {
13462 type Output = Voltage<T>;
13463 fn mul(self, rhs: &Current<T>) -> Self::Output {
13464 Voltage{V: self.Ohm.clone() * rhs.A.clone()}
13465 }
13466}
13467
13468impl<T> core::ops::Div<InverseCurrent<T>> for Resistance<T> where T: NumLike {
13471 type Output = Voltage<T>;
13472 fn div(self, rhs: InverseCurrent<T>) -> Self::Output {
13473 Voltage{V: self.Ohm / rhs.per_A}
13474 }
13475}
13476impl<T> core::ops::Div<InverseCurrent<T>> for &Resistance<T> where T: NumLike {
13478 type Output = Voltage<T>;
13479 fn div(self, rhs: InverseCurrent<T>) -> Self::Output {
13480 Voltage{V: self.Ohm.clone() / rhs.per_A}
13481 }
13482}
13483impl<T> core::ops::Div<&InverseCurrent<T>> for Resistance<T> where T: NumLike {
13485 type Output = Voltage<T>;
13486 fn div(self, rhs: &InverseCurrent<T>) -> Self::Output {
13487 Voltage{V: self.Ohm / rhs.per_A.clone()}
13488 }
13489}
13490impl<T> core::ops::Div<&InverseCurrent<T>> for &Resistance<T> where T: NumLike {
13492 type Output = Voltage<T>;
13493 fn div(self, rhs: &InverseCurrent<T>) -> Self::Output {
13494 Voltage{V: self.Ohm.clone() / rhs.per_A.clone()}
13495 }
13496}
13497
13498impl<T> core::ops::Mul<Time<T>> for Resistance<T> where T: NumLike {
13501 type Output = Inductance<T>;
13502 fn mul(self, rhs: Time<T>) -> Self::Output {
13503 Inductance{H: self.Ohm * rhs.s}
13504 }
13505}
13506impl<T> core::ops::Mul<Time<T>> for &Resistance<T> where T: NumLike {
13508 type Output = Inductance<T>;
13509 fn mul(self, rhs: Time<T>) -> Self::Output {
13510 Inductance{H: self.Ohm.clone() * rhs.s}
13511 }
13512}
13513impl<T> core::ops::Mul<&Time<T>> for Resistance<T> where T: NumLike {
13515 type Output = Inductance<T>;
13516 fn mul(self, rhs: &Time<T>) -> Self::Output {
13517 Inductance{H: self.Ohm * rhs.s.clone()}
13518 }
13519}
13520impl<T> core::ops::Mul<&Time<T>> for &Resistance<T> where T: NumLike {
13522 type Output = Inductance<T>;
13523 fn mul(self, rhs: &Time<T>) -> Self::Output {
13524 Inductance{H: self.Ohm.clone() * rhs.s.clone()}
13525 }
13526}
13527
13528impl<T> core::ops::Div<Time<T>> for Resistance<T> where T: NumLike {
13531 type Output = Elastance<T>;
13532 fn div(self, rhs: Time<T>) -> Self::Output {
13533 Elastance{per_F: self.Ohm / rhs.s}
13534 }
13535}
13536impl<T> core::ops::Div<Time<T>> for &Resistance<T> where T: NumLike {
13538 type Output = Elastance<T>;
13539 fn div(self, rhs: Time<T>) -> Self::Output {
13540 Elastance{per_F: self.Ohm.clone() / rhs.s}
13541 }
13542}
13543impl<T> core::ops::Div<&Time<T>> for Resistance<T> where T: NumLike {
13545 type Output = Elastance<T>;
13546 fn div(self, rhs: &Time<T>) -> Self::Output {
13547 Elastance{per_F: self.Ohm / rhs.s.clone()}
13548 }
13549}
13550impl<T> core::ops::Div<&Time<T>> for &Resistance<T> where T: NumLike {
13552 type Output = Elastance<T>;
13553 fn div(self, rhs: &Time<T>) -> Self::Output {
13554 Elastance{per_F: self.Ohm.clone() / rhs.s.clone()}
13555 }
13556}
13557
13558impl<T> core::ops::Mul<Capacitance<T>> for Resistance<T> where T: NumLike {
13561 type Output = Time<T>;
13562 fn mul(self, rhs: Capacitance<T>) -> Self::Output {
13563 Time{s: self.Ohm * rhs.F}
13564 }
13565}
13566impl<T> core::ops::Mul<Capacitance<T>> for &Resistance<T> where T: NumLike {
13568 type Output = Time<T>;
13569 fn mul(self, rhs: Capacitance<T>) -> Self::Output {
13570 Time{s: self.Ohm.clone() * rhs.F}
13571 }
13572}
13573impl<T> core::ops::Mul<&Capacitance<T>> for Resistance<T> where T: NumLike {
13575 type Output = Time<T>;
13576 fn mul(self, rhs: &Capacitance<T>) -> Self::Output {
13577 Time{s: self.Ohm * rhs.F.clone()}
13578 }
13579}
13580impl<T> core::ops::Mul<&Capacitance<T>> for &Resistance<T> where T: NumLike {
13582 type Output = Time<T>;
13583 fn mul(self, rhs: &Capacitance<T>) -> Self::Output {
13584 Time{s: self.Ohm.clone() * rhs.F.clone()}
13585 }
13586}
13587
13588impl<T> core::ops::Mul<Charge<T>> for Resistance<T> where T: NumLike {
13591 type Output = MagneticFlux<T>;
13592 fn mul(self, rhs: Charge<T>) -> Self::Output {
13593 MagneticFlux{Wb: self.Ohm * rhs.C}
13594 }
13595}
13596impl<T> core::ops::Mul<Charge<T>> for &Resistance<T> where T: NumLike {
13598 type Output = MagneticFlux<T>;
13599 fn mul(self, rhs: Charge<T>) -> Self::Output {
13600 MagneticFlux{Wb: self.Ohm.clone() * rhs.C}
13601 }
13602}
13603impl<T> core::ops::Mul<&Charge<T>> for Resistance<T> where T: NumLike {
13605 type Output = MagneticFlux<T>;
13606 fn mul(self, rhs: &Charge<T>) -> Self::Output {
13607 MagneticFlux{Wb: self.Ohm * rhs.C.clone()}
13608 }
13609}
13610impl<T> core::ops::Mul<&Charge<T>> for &Resistance<T> where T: NumLike {
13612 type Output = MagneticFlux<T>;
13613 fn mul(self, rhs: &Charge<T>) -> Self::Output {
13614 MagneticFlux{Wb: self.Ohm.clone() * rhs.C.clone()}
13615 }
13616}
13617
13618impl<T> core::ops::Div<Elastance<T>> for Resistance<T> where T: NumLike {
13621 type Output = Time<T>;
13622 fn div(self, rhs: Elastance<T>) -> Self::Output {
13623 Time{s: self.Ohm / rhs.per_F}
13624 }
13625}
13626impl<T> core::ops::Div<Elastance<T>> for &Resistance<T> where T: NumLike {
13628 type Output = Time<T>;
13629 fn div(self, rhs: Elastance<T>) -> Self::Output {
13630 Time{s: self.Ohm.clone() / rhs.per_F}
13631 }
13632}
13633impl<T> core::ops::Div<&Elastance<T>> for Resistance<T> where T: NumLike {
13635 type Output = Time<T>;
13636 fn div(self, rhs: &Elastance<T>) -> Self::Output {
13637 Time{s: self.Ohm / rhs.per_F.clone()}
13638 }
13639}
13640impl<T> core::ops::Div<&Elastance<T>> for &Resistance<T> where T: NumLike {
13642 type Output = Time<T>;
13643 fn div(self, rhs: &Elastance<T>) -> Self::Output {
13644 Time{s: self.Ohm.clone() / rhs.per_F.clone()}
13645 }
13646}
13647
13648impl<T> core::ops::Div<Inductance<T>> for Resistance<T> where T: NumLike {
13651 type Output = Frequency<T>;
13652 fn div(self, rhs: Inductance<T>) -> Self::Output {
13653 Frequency{Hz: self.Ohm / rhs.H}
13654 }
13655}
13656impl<T> core::ops::Div<Inductance<T>> for &Resistance<T> where T: NumLike {
13658 type Output = Frequency<T>;
13659 fn div(self, rhs: Inductance<T>) -> Self::Output {
13660 Frequency{Hz: self.Ohm.clone() / rhs.H}
13661 }
13662}
13663impl<T> core::ops::Div<&Inductance<T>> for Resistance<T> where T: NumLike {
13665 type Output = Frequency<T>;
13666 fn div(self, rhs: &Inductance<T>) -> Self::Output {
13667 Frequency{Hz: self.Ohm / rhs.H.clone()}
13668 }
13669}
13670impl<T> core::ops::Div<&Inductance<T>> for &Resistance<T> where T: NumLike {
13672 type Output = Frequency<T>;
13673 fn div(self, rhs: &Inductance<T>) -> Self::Output {
13674 Frequency{Hz: self.Ohm.clone() / rhs.H.clone()}
13675 }
13676}
13677
13678impl<T> core::ops::Div<InverseCharge<T>> for Resistance<T> where T: NumLike {
13681 type Output = MagneticFlux<T>;
13682 fn div(self, rhs: InverseCharge<T>) -> Self::Output {
13683 MagneticFlux{Wb: self.Ohm / rhs.per_C}
13684 }
13685}
13686impl<T> core::ops::Div<InverseCharge<T>> for &Resistance<T> where T: NumLike {
13688 type Output = MagneticFlux<T>;
13689 fn div(self, rhs: InverseCharge<T>) -> Self::Output {
13690 MagneticFlux{Wb: self.Ohm.clone() / rhs.per_C}
13691 }
13692}
13693impl<T> core::ops::Div<&InverseCharge<T>> for Resistance<T> where T: NumLike {
13695 type Output = MagneticFlux<T>;
13696 fn div(self, rhs: &InverseCharge<T>) -> Self::Output {
13697 MagneticFlux{Wb: self.Ohm / rhs.per_C.clone()}
13698 }
13699}
13700impl<T> core::ops::Div<&InverseCharge<T>> for &Resistance<T> where T: NumLike {
13702 type Output = MagneticFlux<T>;
13703 fn div(self, rhs: &InverseCharge<T>) -> Self::Output {
13704 MagneticFlux{Wb: self.Ohm.clone() / rhs.per_C.clone()}
13705 }
13706}
13707
13708impl<T> core::ops::Mul<InverseInductance<T>> for Resistance<T> where T: NumLike {
13711 type Output = Frequency<T>;
13712 fn mul(self, rhs: InverseInductance<T>) -> Self::Output {
13713 Frequency{Hz: self.Ohm * rhs.per_H}
13714 }
13715}
13716impl<T> core::ops::Mul<InverseInductance<T>> for &Resistance<T> where T: NumLike {
13718 type Output = Frequency<T>;
13719 fn mul(self, rhs: InverseInductance<T>) -> Self::Output {
13720 Frequency{Hz: self.Ohm.clone() * rhs.per_H}
13721 }
13722}
13723impl<T> core::ops::Mul<&InverseInductance<T>> for Resistance<T> where T: NumLike {
13725 type Output = Frequency<T>;
13726 fn mul(self, rhs: &InverseInductance<T>) -> Self::Output {
13727 Frequency{Hz: self.Ohm * rhs.per_H.clone()}
13728 }
13729}
13730impl<T> core::ops::Mul<&InverseInductance<T>> for &Resistance<T> where T: NumLike {
13732 type Output = Frequency<T>;
13733 fn mul(self, rhs: &InverseInductance<T>) -> Self::Output {
13734 Frequency{Hz: self.Ohm.clone() * rhs.per_H.clone()}
13735 }
13736}
13737
13738impl<T> core::ops::Mul<InverseMagneticFlux<T>> for Resistance<T> where T: NumLike {
13741 type Output = InverseCharge<T>;
13742 fn mul(self, rhs: InverseMagneticFlux<T>) -> Self::Output {
13743 InverseCharge{per_C: self.Ohm * rhs.per_Wb}
13744 }
13745}
13746impl<T> core::ops::Mul<InverseMagneticFlux<T>> for &Resistance<T> where T: NumLike {
13748 type Output = InverseCharge<T>;
13749 fn mul(self, rhs: InverseMagneticFlux<T>) -> Self::Output {
13750 InverseCharge{per_C: self.Ohm.clone() * rhs.per_Wb}
13751 }
13752}
13753impl<T> core::ops::Mul<&InverseMagneticFlux<T>> for Resistance<T> where T: NumLike {
13755 type Output = InverseCharge<T>;
13756 fn mul(self, rhs: &InverseMagneticFlux<T>) -> Self::Output {
13757 InverseCharge{per_C: self.Ohm * rhs.per_Wb.clone()}
13758 }
13759}
13760impl<T> core::ops::Mul<&InverseMagneticFlux<T>> for &Resistance<T> where T: NumLike {
13762 type Output = InverseCharge<T>;
13763 fn mul(self, rhs: &InverseMagneticFlux<T>) -> Self::Output {
13764 InverseCharge{per_C: self.Ohm.clone() * rhs.per_Wb.clone()}
13765 }
13766}
13767
13768impl<T> core::ops::Mul<InverseVoltage<T>> for Resistance<T> where T: NumLike {
13771 type Output = InverseCurrent<T>;
13772 fn mul(self, rhs: InverseVoltage<T>) -> Self::Output {
13773 InverseCurrent{per_A: self.Ohm * rhs.per_V}
13774 }
13775}
13776impl<T> core::ops::Mul<InverseVoltage<T>> for &Resistance<T> where T: NumLike {
13778 type Output = InverseCurrent<T>;
13779 fn mul(self, rhs: InverseVoltage<T>) -> Self::Output {
13780 InverseCurrent{per_A: self.Ohm.clone() * rhs.per_V}
13781 }
13782}
13783impl<T> core::ops::Mul<&InverseVoltage<T>> for Resistance<T> where T: NumLike {
13785 type Output = InverseCurrent<T>;
13786 fn mul(self, rhs: &InverseVoltage<T>) -> Self::Output {
13787 InverseCurrent{per_A: self.Ohm * rhs.per_V.clone()}
13788 }
13789}
13790impl<T> core::ops::Mul<&InverseVoltage<T>> for &Resistance<T> where T: NumLike {
13792 type Output = InverseCurrent<T>;
13793 fn mul(self, rhs: &InverseVoltage<T>) -> Self::Output {
13794 InverseCurrent{per_A: self.Ohm.clone() * rhs.per_V.clone()}
13795 }
13796}
13797
13798impl<T> core::ops::Div<MagneticFlux<T>> for Resistance<T> where T: NumLike {
13801 type Output = InverseCharge<T>;
13802 fn div(self, rhs: MagneticFlux<T>) -> Self::Output {
13803 InverseCharge{per_C: self.Ohm / rhs.Wb}
13804 }
13805}
13806impl<T> core::ops::Div<MagneticFlux<T>> for &Resistance<T> where T: NumLike {
13808 type Output = InverseCharge<T>;
13809 fn div(self, rhs: MagneticFlux<T>) -> Self::Output {
13810 InverseCharge{per_C: self.Ohm.clone() / rhs.Wb}
13811 }
13812}
13813impl<T> core::ops::Div<&MagneticFlux<T>> for Resistance<T> where T: NumLike {
13815 type Output = InverseCharge<T>;
13816 fn div(self, rhs: &MagneticFlux<T>) -> Self::Output {
13817 InverseCharge{per_C: self.Ohm / rhs.Wb.clone()}
13818 }
13819}
13820impl<T> core::ops::Div<&MagneticFlux<T>> for &Resistance<T> where T: NumLike {
13822 type Output = InverseCharge<T>;
13823 fn div(self, rhs: &MagneticFlux<T>) -> Self::Output {
13824 InverseCharge{per_C: self.Ohm.clone() / rhs.Wb.clone()}
13825 }
13826}
13827
13828impl<T> core::ops::Div<Voltage<T>> for Resistance<T> where T: NumLike {
13831 type Output = InverseCurrent<T>;
13832 fn div(self, rhs: Voltage<T>) -> Self::Output {
13833 InverseCurrent{per_A: self.Ohm / rhs.V}
13834 }
13835}
13836impl<T> core::ops::Div<Voltage<T>> for &Resistance<T> where T: NumLike {
13838 type Output = InverseCurrent<T>;
13839 fn div(self, rhs: Voltage<T>) -> Self::Output {
13840 InverseCurrent{per_A: self.Ohm.clone() / rhs.V}
13841 }
13842}
13843impl<T> core::ops::Div<&Voltage<T>> for Resistance<T> where T: NumLike {
13845 type Output = InverseCurrent<T>;
13846 fn div(self, rhs: &Voltage<T>) -> Self::Output {
13847 InverseCurrent{per_A: self.Ohm / rhs.V.clone()}
13848 }
13849}
13850impl<T> core::ops::Div<&Voltage<T>> for &Resistance<T> where T: NumLike {
13852 type Output = InverseCurrent<T>;
13853 fn div(self, rhs: &Voltage<T>) -> Self::Output {
13854 InverseCurrent{per_A: self.Ohm.clone() / rhs.V.clone()}
13855 }
13856}
13857
13858impl<T> core::ops::Mul<Frequency<T>> for Resistance<T> where T: NumLike {
13861 type Output = Elastance<T>;
13862 fn mul(self, rhs: Frequency<T>) -> Self::Output {
13863 Elastance{per_F: self.Ohm * rhs.Hz}
13864 }
13865}
13866impl<T> core::ops::Mul<Frequency<T>> for &Resistance<T> where T: NumLike {
13868 type Output = Elastance<T>;
13869 fn mul(self, rhs: Frequency<T>) -> Self::Output {
13870 Elastance{per_F: self.Ohm.clone() * rhs.Hz}
13871 }
13872}
13873impl<T> core::ops::Mul<&Frequency<T>> for Resistance<T> where T: NumLike {
13875 type Output = Elastance<T>;
13876 fn mul(self, rhs: &Frequency<T>) -> Self::Output {
13877 Elastance{per_F: self.Ohm * rhs.Hz.clone()}
13878 }
13879}
13880impl<T> core::ops::Mul<&Frequency<T>> for &Resistance<T> where T: NumLike {
13882 type Output = Elastance<T>;
13883 fn mul(self, rhs: &Frequency<T>) -> Self::Output {
13884 Elastance{per_F: self.Ohm.clone() * rhs.Hz.clone()}
13885 }
13886}
13887
13888impl<T> core::ops::Div<Frequency<T>> for Resistance<T> where T: NumLike {
13891 type Output = Inductance<T>;
13892 fn div(self, rhs: Frequency<T>) -> Self::Output {
13893 Inductance{H: self.Ohm / rhs.Hz}
13894 }
13895}
13896impl<T> core::ops::Div<Frequency<T>> for &Resistance<T> where T: NumLike {
13898 type Output = Inductance<T>;
13899 fn div(self, rhs: Frequency<T>) -> Self::Output {
13900 Inductance{H: self.Ohm.clone() / rhs.Hz}
13901 }
13902}
13903impl<T> core::ops::Div<&Frequency<T>> for Resistance<T> where T: NumLike {
13905 type Output = Inductance<T>;
13906 fn div(self, rhs: &Frequency<T>) -> Self::Output {
13907 Inductance{H: self.Ohm / rhs.Hz.clone()}
13908 }
13909}
13910impl<T> core::ops::Div<&Frequency<T>> for &Resistance<T> where T: NumLike {
13912 type Output = Inductance<T>;
13913 fn div(self, rhs: &Frequency<T>) -> Self::Output {
13914 Inductance{H: self.Ohm.clone() / rhs.Hz.clone()}
13915 }
13916}
13917
13918impl<T> core::ops::Div<Resistance<T>> for f64 where T: NumLike+From<f64> {
13921 type Output = Conductance<T>;
13922 fn div(self, rhs: Resistance<T>) -> Self::Output {
13923 Conductance{S: T::from(self) / rhs.Ohm}
13924 }
13925}
13926impl<T> core::ops::Div<Resistance<T>> for &f64 where T: NumLike+From<f64> {
13928 type Output = Conductance<T>;
13929 fn div(self, rhs: Resistance<T>) -> Self::Output {
13930 Conductance{S: T::from(self.clone()) / rhs.Ohm}
13931 }
13932}
13933impl<T> core::ops::Div<&Resistance<T>> for f64 where T: NumLike+From<f64> {
13935 type Output = Conductance<T>;
13936 fn div(self, rhs: &Resistance<T>) -> Self::Output {
13937 Conductance{S: T::from(self) / rhs.Ohm.clone()}
13938 }
13939}
13940impl<T> core::ops::Div<&Resistance<T>> for &f64 where T: NumLike+From<f64> {
13942 type Output = Conductance<T>;
13943 fn div(self, rhs: &Resistance<T>) -> Self::Output {
13944 Conductance{S: T::from(self.clone()) / rhs.Ohm.clone()}
13945 }
13946}
13947
13948impl<T> core::ops::Div<Resistance<T>> for f32 where T: NumLike+From<f32> {
13951 type Output = Conductance<T>;
13952 fn div(self, rhs: Resistance<T>) -> Self::Output {
13953 Conductance{S: T::from(self) / rhs.Ohm}
13954 }
13955}
13956impl<T> core::ops::Div<Resistance<T>> for &f32 where T: NumLike+From<f32> {
13958 type Output = Conductance<T>;
13959 fn div(self, rhs: Resistance<T>) -> Self::Output {
13960 Conductance{S: T::from(self.clone()) / rhs.Ohm}
13961 }
13962}
13963impl<T> core::ops::Div<&Resistance<T>> for f32 where T: NumLike+From<f32> {
13965 type Output = Conductance<T>;
13966 fn div(self, rhs: &Resistance<T>) -> Self::Output {
13967 Conductance{S: T::from(self) / rhs.Ohm.clone()}
13968 }
13969}
13970impl<T> core::ops::Div<&Resistance<T>> for &f32 where T: NumLike+From<f32> {
13972 type Output = Conductance<T>;
13973 fn div(self, rhs: &Resistance<T>) -> Self::Output {
13974 Conductance{S: T::from(self.clone()) / rhs.Ohm.clone()}
13975 }
13976}
13977
13978impl<T> core::ops::Div<Resistance<T>> for i64 where T: NumLike+From<i64> {
13981 type Output = Conductance<T>;
13982 fn div(self, rhs: Resistance<T>) -> Self::Output {
13983 Conductance{S: T::from(self) / rhs.Ohm}
13984 }
13985}
13986impl<T> core::ops::Div<Resistance<T>> for &i64 where T: NumLike+From<i64> {
13988 type Output = Conductance<T>;
13989 fn div(self, rhs: Resistance<T>) -> Self::Output {
13990 Conductance{S: T::from(self.clone()) / rhs.Ohm}
13991 }
13992}
13993impl<T> core::ops::Div<&Resistance<T>> for i64 where T: NumLike+From<i64> {
13995 type Output = Conductance<T>;
13996 fn div(self, rhs: &Resistance<T>) -> Self::Output {
13997 Conductance{S: T::from(self) / rhs.Ohm.clone()}
13998 }
13999}
14000impl<T> core::ops::Div<&Resistance<T>> for &i64 where T: NumLike+From<i64> {
14002 type Output = Conductance<T>;
14003 fn div(self, rhs: &Resistance<T>) -> Self::Output {
14004 Conductance{S: T::from(self.clone()) / rhs.Ohm.clone()}
14005 }
14006}
14007
14008impl<T> core::ops::Div<Resistance<T>> for i32 where T: NumLike+From<i32> {
14011 type Output = Conductance<T>;
14012 fn div(self, rhs: Resistance<T>) -> Self::Output {
14013 Conductance{S: T::from(self) / rhs.Ohm}
14014 }
14015}
14016impl<T> core::ops::Div<Resistance<T>> for &i32 where T: NumLike+From<i32> {
14018 type Output = Conductance<T>;
14019 fn div(self, rhs: Resistance<T>) -> Self::Output {
14020 Conductance{S: T::from(self.clone()) / rhs.Ohm}
14021 }
14022}
14023impl<T> core::ops::Div<&Resistance<T>> for i32 where T: NumLike+From<i32> {
14025 type Output = Conductance<T>;
14026 fn div(self, rhs: &Resistance<T>) -> Self::Output {
14027 Conductance{S: T::from(self) / rhs.Ohm.clone()}
14028 }
14029}
14030impl<T> core::ops::Div<&Resistance<T>> for &i32 where T: NumLike+From<i32> {
14032 type Output = Conductance<T>;
14033 fn div(self, rhs: &Resistance<T>) -> Self::Output {
14034 Conductance{S: T::from(self.clone()) / rhs.Ohm.clone()}
14035 }
14036}
14037
14038#[cfg(feature="num-bigfloat")]
14041impl<T> core::ops::Div<Resistance<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
14042 type Output = Conductance<T>;
14043 fn div(self, rhs: Resistance<T>) -> Self::Output {
14044 Conductance{S: T::from(self) / rhs.Ohm}
14045 }
14046}
14047#[cfg(feature="num-bigfloat")]
14049impl<T> core::ops::Div<Resistance<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
14050 type Output = Conductance<T>;
14051 fn div(self, rhs: Resistance<T>) -> Self::Output {
14052 Conductance{S: T::from(self.clone()) / rhs.Ohm}
14053 }
14054}
14055#[cfg(feature="num-bigfloat")]
14057impl<T> core::ops::Div<&Resistance<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
14058 type Output = Conductance<T>;
14059 fn div(self, rhs: &Resistance<T>) -> Self::Output {
14060 Conductance{S: T::from(self) / rhs.Ohm.clone()}
14061 }
14062}
14063#[cfg(feature="num-bigfloat")]
14065impl<T> core::ops::Div<&Resistance<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
14066 type Output = Conductance<T>;
14067 fn div(self, rhs: &Resistance<T>) -> Self::Output {
14068 Conductance{S: T::from(self.clone()) / rhs.Ohm.clone()}
14069 }
14070}
14071
14072#[cfg(feature="num-complex")]
14075impl<T> core::ops::Div<Resistance<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
14076 type Output = Conductance<T>;
14077 fn div(self, rhs: Resistance<T>) -> Self::Output {
14078 Conductance{S: T::from(self) / rhs.Ohm}
14079 }
14080}
14081#[cfg(feature="num-complex")]
14083impl<T> core::ops::Div<Resistance<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
14084 type Output = Conductance<T>;
14085 fn div(self, rhs: Resistance<T>) -> Self::Output {
14086 Conductance{S: T::from(self.clone()) / rhs.Ohm}
14087 }
14088}
14089#[cfg(feature="num-complex")]
14091impl<T> core::ops::Div<&Resistance<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
14092 type Output = Conductance<T>;
14093 fn div(self, rhs: &Resistance<T>) -> Self::Output {
14094 Conductance{S: T::from(self) / rhs.Ohm.clone()}
14095 }
14096}
14097#[cfg(feature="num-complex")]
14099impl<T> core::ops::Div<&Resistance<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
14100 type Output = Conductance<T>;
14101 fn div(self, rhs: &Resistance<T>) -> Self::Output {
14102 Conductance{S: T::from(self.clone()) / rhs.Ohm.clone()}
14103 }
14104}
14105
14106#[cfg(feature="num-complex")]
14109impl<T> core::ops::Div<Resistance<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
14110 type Output = Conductance<T>;
14111 fn div(self, rhs: Resistance<T>) -> Self::Output {
14112 Conductance{S: T::from(self) / rhs.Ohm}
14113 }
14114}
14115#[cfg(feature="num-complex")]
14117impl<T> core::ops::Div<Resistance<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
14118 type Output = Conductance<T>;
14119 fn div(self, rhs: Resistance<T>) -> Self::Output {
14120 Conductance{S: T::from(self.clone()) / rhs.Ohm}
14121 }
14122}
14123#[cfg(feature="num-complex")]
14125impl<T> core::ops::Div<&Resistance<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
14126 type Output = Conductance<T>;
14127 fn div(self, rhs: &Resistance<T>) -> Self::Output {
14128 Conductance{S: T::from(self) / rhs.Ohm.clone()}
14129 }
14130}
14131#[cfg(feature="num-complex")]
14133impl<T> core::ops::Div<&Resistance<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
14134 type Output = Conductance<T>;
14135 fn div(self, rhs: &Resistance<T>) -> Self::Output {
14136 Conductance{S: T::from(self.clone()) / rhs.Ohm.clone()}
14137 }
14138}
14139
14140#[derive(UnitStruct, Debug, Clone)]
14142#[cfg_attr(feature="serde", derive(Serialize, Deserialize))]
14143pub struct Voltage<T: NumLike>{
14144 pub V: T
14146}
14147
14148impl<T> Voltage<T> where T: NumLike {
14149
14150 pub fn unit_name() -> &'static str { "volts" }
14152
14153 pub fn unit_symbol() -> &'static str { "V" }
14155
14156 pub fn from_V(V: T) -> Self { Voltage{V: V} }
14161
14162 pub fn to_V(&self) -> T { self.V.clone() }
14164
14165 pub fn from_volts(volts: T) -> Self { Voltage{V: volts} }
14170
14171 pub fn to_volts(&self) -> T { self.V.clone() }
14173
14174}
14175
14176impl<T> fmt::Display for Voltage<T> where T: NumLike {
14177 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
14178 write!(f, "{} {}", &self.V, Self::unit_symbol())
14179 }
14180}
14181
14182impl<T> Voltage<T> where T: NumLike+From<f64> {
14183
14184 pub fn to_mV(&self) -> T {
14188 return self.V.clone() * T::from(1000.0_f64);
14189 }
14190
14191 pub fn from_mV(mV: T) -> Self {
14198 Voltage{V: mV * T::from(0.001_f64)}
14199 }
14200
14201 pub fn to_uV(&self) -> T {
14205 return self.V.clone() * T::from(1000000.0_f64);
14206 }
14207
14208 pub fn from_uV(uV: T) -> Self {
14215 Voltage{V: uV * T::from(1e-06_f64)}
14216 }
14217
14218 pub fn to_nV(&self) -> T {
14222 return self.V.clone() * T::from(1000000000.0_f64);
14223 }
14224
14225 pub fn from_nV(nV: T) -> Self {
14232 Voltage{V: nV * T::from(1e-09_f64)}
14233 }
14234
14235 pub fn to_kV(&self) -> T {
14239 return self.V.clone() * T::from(0.001_f64);
14240 }
14241
14242 pub fn from_kV(kV: T) -> Self {
14249 Voltage{V: kV * T::from(1000.0_f64)}
14250 }
14251
14252 pub fn to_MV(&self) -> T {
14256 return self.V.clone() * T::from(1e-06_f64);
14257 }
14258
14259 pub fn from_MV(MV: T) -> Self {
14266 Voltage{V: MV * T::from(1000000.0_f64)}
14267 }
14268
14269 pub fn to_GV(&self) -> T {
14273 return self.V.clone() * T::from(1e-09_f64);
14274 }
14275
14276 pub fn from_GV(GV: T) -> Self {
14283 Voltage{V: GV * T::from(1000000000.0_f64)}
14284 }
14285
14286}
14287
14288
14289#[cfg(feature="num-bigfloat")]
14291impl core::ops::Mul<Voltage<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
14292 type Output = Voltage<num_bigfloat::BigFloat>;
14293 fn mul(self, rhs: Voltage<num_bigfloat::BigFloat>) -> Self::Output {
14294 Voltage{V: self * rhs.V}
14295 }
14296}
14297#[cfg(feature="num-bigfloat")]
14299impl core::ops::Mul<Voltage<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
14300 type Output = Voltage<num_bigfloat::BigFloat>;
14301 fn mul(self, rhs: Voltage<num_bigfloat::BigFloat>) -> Self::Output {
14302 Voltage{V: self.clone() * rhs.V}
14303 }
14304}
14305#[cfg(feature="num-bigfloat")]
14307impl core::ops::Mul<&Voltage<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
14308 type Output = Voltage<num_bigfloat::BigFloat>;
14309 fn mul(self, rhs: &Voltage<num_bigfloat::BigFloat>) -> Self::Output {
14310 Voltage{V: self * rhs.V.clone()}
14311 }
14312}
14313#[cfg(feature="num-bigfloat")]
14315impl core::ops::Mul<&Voltage<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
14316 type Output = Voltage<num_bigfloat::BigFloat>;
14317 fn mul(self, rhs: &Voltage<num_bigfloat::BigFloat>) -> Self::Output {
14318 Voltage{V: self.clone() * rhs.V.clone()}
14319 }
14320}
14321
14322#[cfg(feature="num-complex")]
14324impl core::ops::Mul<Voltage<num_complex::Complex32>> for num_complex::Complex32 {
14325 type Output = Voltage<num_complex::Complex32>;
14326 fn mul(self, rhs: Voltage<num_complex::Complex32>) -> Self::Output {
14327 Voltage{V: self * rhs.V}
14328 }
14329}
14330#[cfg(feature="num-complex")]
14332impl core::ops::Mul<Voltage<num_complex::Complex32>> for &num_complex::Complex32 {
14333 type Output = Voltage<num_complex::Complex32>;
14334 fn mul(self, rhs: Voltage<num_complex::Complex32>) -> Self::Output {
14335 Voltage{V: self.clone() * rhs.V}
14336 }
14337}
14338#[cfg(feature="num-complex")]
14340impl core::ops::Mul<&Voltage<num_complex::Complex32>> for num_complex::Complex32 {
14341 type Output = Voltage<num_complex::Complex32>;
14342 fn mul(self, rhs: &Voltage<num_complex::Complex32>) -> Self::Output {
14343 Voltage{V: self * rhs.V.clone()}
14344 }
14345}
14346#[cfg(feature="num-complex")]
14348impl core::ops::Mul<&Voltage<num_complex::Complex32>> for &num_complex::Complex32 {
14349 type Output = Voltage<num_complex::Complex32>;
14350 fn mul(self, rhs: &Voltage<num_complex::Complex32>) -> Self::Output {
14351 Voltage{V: self.clone() * rhs.V.clone()}
14352 }
14353}
14354
14355#[cfg(feature="num-complex")]
14357impl core::ops::Mul<Voltage<num_complex::Complex64>> for num_complex::Complex64 {
14358 type Output = Voltage<num_complex::Complex64>;
14359 fn mul(self, rhs: Voltage<num_complex::Complex64>) -> Self::Output {
14360 Voltage{V: self * rhs.V}
14361 }
14362}
14363#[cfg(feature="num-complex")]
14365impl core::ops::Mul<Voltage<num_complex::Complex64>> for &num_complex::Complex64 {
14366 type Output = Voltage<num_complex::Complex64>;
14367 fn mul(self, rhs: Voltage<num_complex::Complex64>) -> Self::Output {
14368 Voltage{V: self.clone() * rhs.V}
14369 }
14370}
14371#[cfg(feature="num-complex")]
14373impl core::ops::Mul<&Voltage<num_complex::Complex64>> for num_complex::Complex64 {
14374 type Output = Voltage<num_complex::Complex64>;
14375 fn mul(self, rhs: &Voltage<num_complex::Complex64>) -> Self::Output {
14376 Voltage{V: self * rhs.V.clone()}
14377 }
14378}
14379#[cfg(feature="num-complex")]
14381impl core::ops::Mul<&Voltage<num_complex::Complex64>> for &num_complex::Complex64 {
14382 type Output = Voltage<num_complex::Complex64>;
14383 fn mul(self, rhs: &Voltage<num_complex::Complex64>) -> Self::Output {
14384 Voltage{V: self.clone() * rhs.V.clone()}
14385 }
14386}
14387
14388
14389
14390#[cfg(feature = "uom")]
14392impl<T> Into<uom::si::f32::ElectricPotential> for Voltage<T> where T: NumLike+Into<f32> {
14393 fn into(self) -> uom::si::f32::ElectricPotential {
14394 uom::si::f32::ElectricPotential::new::<uom::si::electric_potential::volt>(self.V.into())
14395 }
14396}
14397
14398#[cfg(feature = "uom")]
14400impl<T> From<uom::si::f32::ElectricPotential> for Voltage<T> where T: NumLike+From<f32> {
14401 fn from(src: uom::si::f32::ElectricPotential) -> Self {
14402 Voltage{V: T::from(src.value)}
14403 }
14404}
14405
14406#[cfg(feature = "uom")]
14408impl<T> Into<uom::si::f64::ElectricPotential> for Voltage<T> where T: NumLike+Into<f64> {
14409 fn into(self) -> uom::si::f64::ElectricPotential {
14410 uom::si::f64::ElectricPotential::new::<uom::si::electric_potential::volt>(self.V.into())
14411 }
14412}
14413
14414#[cfg(feature = "uom")]
14416impl<T> From<uom::si::f64::ElectricPotential> for Voltage<T> where T: NumLike+From<f64> {
14417 fn from(src: uom::si::f64::ElectricPotential) -> Self {
14418 Voltage{V: T::from(src.value)}
14419 }
14420}
14421
14422
14423impl<T> core::ops::Mul<Current<T>> for Voltage<T> where T: NumLike {
14426 type Output = Power<T>;
14427 fn mul(self, rhs: Current<T>) -> Self::Output {
14428 Power{W: self.V * rhs.A}
14429 }
14430}
14431impl<T> core::ops::Mul<Current<T>> for &Voltage<T> where T: NumLike {
14433 type Output = Power<T>;
14434 fn mul(self, rhs: Current<T>) -> Self::Output {
14435 Power{W: self.V.clone() * rhs.A}
14436 }
14437}
14438impl<T> core::ops::Mul<&Current<T>> for Voltage<T> where T: NumLike {
14440 type Output = Power<T>;
14441 fn mul(self, rhs: &Current<T>) -> Self::Output {
14442 Power{W: self.V * rhs.A.clone()}
14443 }
14444}
14445impl<T> core::ops::Mul<&Current<T>> for &Voltage<T> where T: NumLike {
14447 type Output = Power<T>;
14448 fn mul(self, rhs: &Current<T>) -> Self::Output {
14449 Power{W: self.V.clone() * rhs.A.clone()}
14450 }
14451}
14452
14453impl<T> core::ops::Div<Current<T>> for Voltage<T> where T: NumLike {
14456 type Output = Resistance<T>;
14457 fn div(self, rhs: Current<T>) -> Self::Output {
14458 Resistance{Ohm: self.V / rhs.A}
14459 }
14460}
14461impl<T> core::ops::Div<Current<T>> for &Voltage<T> where T: NumLike {
14463 type Output = Resistance<T>;
14464 fn div(self, rhs: Current<T>) -> Self::Output {
14465 Resistance{Ohm: self.V.clone() / rhs.A}
14466 }
14467}
14468impl<T> core::ops::Div<&Current<T>> for Voltage<T> where T: NumLike {
14470 type Output = Resistance<T>;
14471 fn div(self, rhs: &Current<T>) -> Self::Output {
14472 Resistance{Ohm: self.V / rhs.A.clone()}
14473 }
14474}
14475impl<T> core::ops::Div<&Current<T>> for &Voltage<T> where T: NumLike {
14477 type Output = Resistance<T>;
14478 fn div(self, rhs: &Current<T>) -> Self::Output {
14479 Resistance{Ohm: self.V.clone() / rhs.A.clone()}
14480 }
14481}
14482
14483impl<T> core::ops::Mul<InverseCurrent<T>> for Voltage<T> where T: NumLike {
14486 type Output = Resistance<T>;
14487 fn mul(self, rhs: InverseCurrent<T>) -> Self::Output {
14488 Resistance{Ohm: self.V * rhs.per_A}
14489 }
14490}
14491impl<T> core::ops::Mul<InverseCurrent<T>> for &Voltage<T> where T: NumLike {
14493 type Output = Resistance<T>;
14494 fn mul(self, rhs: InverseCurrent<T>) -> Self::Output {
14495 Resistance{Ohm: self.V.clone() * rhs.per_A}
14496 }
14497}
14498impl<T> core::ops::Mul<&InverseCurrent<T>> for Voltage<T> where T: NumLike {
14500 type Output = Resistance<T>;
14501 fn mul(self, rhs: &InverseCurrent<T>) -> Self::Output {
14502 Resistance{Ohm: self.V * rhs.per_A.clone()}
14503 }
14504}
14505impl<T> core::ops::Mul<&InverseCurrent<T>> for &Voltage<T> where T: NumLike {
14507 type Output = Resistance<T>;
14508 fn mul(self, rhs: &InverseCurrent<T>) -> Self::Output {
14509 Resistance{Ohm: self.V.clone() * rhs.per_A.clone()}
14510 }
14511}
14512
14513impl<T> core::ops::Div<InverseCurrent<T>> for Voltage<T> where T: NumLike {
14516 type Output = Power<T>;
14517 fn div(self, rhs: InverseCurrent<T>) -> Self::Output {
14518 Power{W: self.V / rhs.per_A}
14519 }
14520}
14521impl<T> core::ops::Div<InverseCurrent<T>> for &Voltage<T> where T: NumLike {
14523 type Output = Power<T>;
14524 fn div(self, rhs: InverseCurrent<T>) -> Self::Output {
14525 Power{W: self.V.clone() / rhs.per_A}
14526 }
14527}
14528impl<T> core::ops::Div<&InverseCurrent<T>> for Voltage<T> where T: NumLike {
14530 type Output = Power<T>;
14531 fn div(self, rhs: &InverseCurrent<T>) -> Self::Output {
14532 Power{W: self.V / rhs.per_A.clone()}
14533 }
14534}
14535impl<T> core::ops::Div<&InverseCurrent<T>> for &Voltage<T> where T: NumLike {
14537 type Output = Power<T>;
14538 fn div(self, rhs: &InverseCurrent<T>) -> Self::Output {
14539 Power{W: self.V.clone() / rhs.per_A.clone()}
14540 }
14541}
14542
14543impl<T> core::ops::Mul<Time<T>> for Voltage<T> where T: NumLike {
14546 type Output = MagneticFlux<T>;
14547 fn mul(self, rhs: Time<T>) -> Self::Output {
14548 MagneticFlux{Wb: self.V * rhs.s}
14549 }
14550}
14551impl<T> core::ops::Mul<Time<T>> for &Voltage<T> where T: NumLike {
14553 type Output = MagneticFlux<T>;
14554 fn mul(self, rhs: Time<T>) -> Self::Output {
14555 MagneticFlux{Wb: self.V.clone() * rhs.s}
14556 }
14557}
14558impl<T> core::ops::Mul<&Time<T>> for Voltage<T> where T: NumLike {
14560 type Output = MagneticFlux<T>;
14561 fn mul(self, rhs: &Time<T>) -> Self::Output {
14562 MagneticFlux{Wb: self.V * rhs.s.clone()}
14563 }
14564}
14565impl<T> core::ops::Mul<&Time<T>> for &Voltage<T> where T: NumLike {
14567 type Output = MagneticFlux<T>;
14568 fn mul(self, rhs: &Time<T>) -> Self::Output {
14569 MagneticFlux{Wb: self.V.clone() * rhs.s.clone()}
14570 }
14571}
14572
14573impl<T> core::ops::Mul<Capacitance<T>> for Voltage<T> where T: NumLike {
14576 type Output = Charge<T>;
14577 fn mul(self, rhs: Capacitance<T>) -> Self::Output {
14578 Charge{C: self.V * rhs.F}
14579 }
14580}
14581impl<T> core::ops::Mul<Capacitance<T>> for &Voltage<T> where T: NumLike {
14583 type Output = Charge<T>;
14584 fn mul(self, rhs: Capacitance<T>) -> Self::Output {
14585 Charge{C: self.V.clone() * rhs.F}
14586 }
14587}
14588impl<T> core::ops::Mul<&Capacitance<T>> for Voltage<T> where T: NumLike {
14590 type Output = Charge<T>;
14591 fn mul(self, rhs: &Capacitance<T>) -> Self::Output {
14592 Charge{C: self.V * rhs.F.clone()}
14593 }
14594}
14595impl<T> core::ops::Mul<&Capacitance<T>> for &Voltage<T> where T: NumLike {
14597 type Output = Charge<T>;
14598 fn mul(self, rhs: &Capacitance<T>) -> Self::Output {
14599 Charge{C: self.V.clone() * rhs.F.clone()}
14600 }
14601}
14602
14603impl<T> core::ops::Mul<Charge<T>> for Voltage<T> where T: NumLike {
14606 type Output = Energy<T>;
14607 fn mul(self, rhs: Charge<T>) -> Self::Output {
14608 Energy{J: self.V * rhs.C}
14609 }
14610}
14611impl<T> core::ops::Mul<Charge<T>> for &Voltage<T> where T: NumLike {
14613 type Output = Energy<T>;
14614 fn mul(self, rhs: Charge<T>) -> Self::Output {
14615 Energy{J: self.V.clone() * rhs.C}
14616 }
14617}
14618impl<T> core::ops::Mul<&Charge<T>> for Voltage<T> where T: NumLike {
14620 type Output = Energy<T>;
14621 fn mul(self, rhs: &Charge<T>) -> Self::Output {
14622 Energy{J: self.V * rhs.C.clone()}
14623 }
14624}
14625impl<T> core::ops::Mul<&Charge<T>> for &Voltage<T> where T: NumLike {
14627 type Output = Energy<T>;
14628 fn mul(self, rhs: &Charge<T>) -> Self::Output {
14629 Energy{J: self.V.clone() * rhs.C.clone()}
14630 }
14631}
14632
14633impl<T> core::ops::Div<Charge<T>> for Voltage<T> where T: NumLike {
14636 type Output = Elastance<T>;
14637 fn div(self, rhs: Charge<T>) -> Self::Output {
14638 Elastance{per_F: self.V / rhs.C}
14639 }
14640}
14641impl<T> core::ops::Div<Charge<T>> for &Voltage<T> where T: NumLike {
14643 type Output = Elastance<T>;
14644 fn div(self, rhs: Charge<T>) -> Self::Output {
14645 Elastance{per_F: self.V.clone() / rhs.C}
14646 }
14647}
14648impl<T> core::ops::Div<&Charge<T>> for Voltage<T> where T: NumLike {
14650 type Output = Elastance<T>;
14651 fn div(self, rhs: &Charge<T>) -> Self::Output {
14652 Elastance{per_F: self.V / rhs.C.clone()}
14653 }
14654}
14655impl<T> core::ops::Div<&Charge<T>> for &Voltage<T> where T: NumLike {
14657 type Output = Elastance<T>;
14658 fn div(self, rhs: &Charge<T>) -> Self::Output {
14659 Elastance{per_F: self.V.clone() / rhs.C.clone()}
14660 }
14661}
14662
14663impl<T> core::ops::Mul<Conductance<T>> for Voltage<T> where T: NumLike {
14666 type Output = Current<T>;
14667 fn mul(self, rhs: Conductance<T>) -> Self::Output {
14668 Current{A: self.V * rhs.S}
14669 }
14670}
14671impl<T> core::ops::Mul<Conductance<T>> for &Voltage<T> where T: NumLike {
14673 type Output = Current<T>;
14674 fn mul(self, rhs: Conductance<T>) -> Self::Output {
14675 Current{A: self.V.clone() * rhs.S}
14676 }
14677}
14678impl<T> core::ops::Mul<&Conductance<T>> for Voltage<T> where T: NumLike {
14680 type Output = Current<T>;
14681 fn mul(self, rhs: &Conductance<T>) -> Self::Output {
14682 Current{A: self.V * rhs.S.clone()}
14683 }
14684}
14685impl<T> core::ops::Mul<&Conductance<T>> for &Voltage<T> where T: NumLike {
14687 type Output = Current<T>;
14688 fn mul(self, rhs: &Conductance<T>) -> Self::Output {
14689 Current{A: self.V.clone() * rhs.S.clone()}
14690 }
14691}
14692
14693impl<T> core::ops::Div<Elastance<T>> for Voltage<T> where T: NumLike {
14696 type Output = Charge<T>;
14697 fn div(self, rhs: Elastance<T>) -> Self::Output {
14698 Charge{C: self.V / rhs.per_F}
14699 }
14700}
14701impl<T> core::ops::Div<Elastance<T>> for &Voltage<T> where T: NumLike {
14703 type Output = Charge<T>;
14704 fn div(self, rhs: Elastance<T>) -> Self::Output {
14705 Charge{C: self.V.clone() / rhs.per_F}
14706 }
14707}
14708impl<T> core::ops::Div<&Elastance<T>> for Voltage<T> where T: NumLike {
14710 type Output = Charge<T>;
14711 fn div(self, rhs: &Elastance<T>) -> Self::Output {
14712 Charge{C: self.V / rhs.per_F.clone()}
14713 }
14714}
14715impl<T> core::ops::Div<&Elastance<T>> for &Voltage<T> where T: NumLike {
14717 type Output = Charge<T>;
14718 fn div(self, rhs: &Elastance<T>) -> Self::Output {
14719 Charge{C: self.V.clone() / rhs.per_F.clone()}
14720 }
14721}
14722
14723impl<T> core::ops::Mul<InverseCharge<T>> for Voltage<T> where T: NumLike {
14726 type Output = Elastance<T>;
14727 fn mul(self, rhs: InverseCharge<T>) -> Self::Output {
14728 Elastance{per_F: self.V * rhs.per_C}
14729 }
14730}
14731impl<T> core::ops::Mul<InverseCharge<T>> for &Voltage<T> where T: NumLike {
14733 type Output = Elastance<T>;
14734 fn mul(self, rhs: InverseCharge<T>) -> Self::Output {
14735 Elastance{per_F: self.V.clone() * rhs.per_C}
14736 }
14737}
14738impl<T> core::ops::Mul<&InverseCharge<T>> for Voltage<T> where T: NumLike {
14740 type Output = Elastance<T>;
14741 fn mul(self, rhs: &InverseCharge<T>) -> Self::Output {
14742 Elastance{per_F: self.V * rhs.per_C.clone()}
14743 }
14744}
14745impl<T> core::ops::Mul<&InverseCharge<T>> for &Voltage<T> where T: NumLike {
14747 type Output = Elastance<T>;
14748 fn mul(self, rhs: &InverseCharge<T>) -> Self::Output {
14749 Elastance{per_F: self.V.clone() * rhs.per_C.clone()}
14750 }
14751}
14752
14753impl<T> core::ops::Div<InverseCharge<T>> for Voltage<T> where T: NumLike {
14756 type Output = Energy<T>;
14757 fn div(self, rhs: InverseCharge<T>) -> Self::Output {
14758 Energy{J: self.V / rhs.per_C}
14759 }
14760}
14761impl<T> core::ops::Div<InverseCharge<T>> for &Voltage<T> where T: NumLike {
14763 type Output = Energy<T>;
14764 fn div(self, rhs: InverseCharge<T>) -> Self::Output {
14765 Energy{J: self.V.clone() / rhs.per_C}
14766 }
14767}
14768impl<T> core::ops::Div<&InverseCharge<T>> for Voltage<T> where T: NumLike {
14770 type Output = Energy<T>;
14771 fn div(self, rhs: &InverseCharge<T>) -> Self::Output {
14772 Energy{J: self.V / rhs.per_C.clone()}
14773 }
14774}
14775impl<T> core::ops::Div<&InverseCharge<T>> for &Voltage<T> where T: NumLike {
14777 type Output = Energy<T>;
14778 fn div(self, rhs: &InverseCharge<T>) -> Self::Output {
14779 Energy{J: self.V.clone() / rhs.per_C.clone()}
14780 }
14781}
14782
14783impl<T> core::ops::Mul<InverseMagneticFlux<T>> for Voltage<T> where T: NumLike {
14786 type Output = Frequency<T>;
14787 fn mul(self, rhs: InverseMagneticFlux<T>) -> Self::Output {
14788 Frequency{Hz: self.V * rhs.per_Wb}
14789 }
14790}
14791impl<T> core::ops::Mul<InverseMagneticFlux<T>> for &Voltage<T> where T: NumLike {
14793 type Output = Frequency<T>;
14794 fn mul(self, rhs: InverseMagneticFlux<T>) -> Self::Output {
14795 Frequency{Hz: self.V.clone() * rhs.per_Wb}
14796 }
14797}
14798impl<T> core::ops::Mul<&InverseMagneticFlux<T>> for Voltage<T> where T: NumLike {
14800 type Output = Frequency<T>;
14801 fn mul(self, rhs: &InverseMagneticFlux<T>) -> Self::Output {
14802 Frequency{Hz: self.V * rhs.per_Wb.clone()}
14803 }
14804}
14805impl<T> core::ops::Mul<&InverseMagneticFlux<T>> for &Voltage<T> where T: NumLike {
14807 type Output = Frequency<T>;
14808 fn mul(self, rhs: &InverseMagneticFlux<T>) -> Self::Output {
14809 Frequency{Hz: self.V.clone() * rhs.per_Wb.clone()}
14810 }
14811}
14812
14813impl<T> core::ops::Div<MagneticFlux<T>> for Voltage<T> where T: NumLike {
14816 type Output = Frequency<T>;
14817 fn div(self, rhs: MagneticFlux<T>) -> Self::Output {
14818 Frequency{Hz: self.V / rhs.Wb}
14819 }
14820}
14821impl<T> core::ops::Div<MagneticFlux<T>> for &Voltage<T> where T: NumLike {
14823 type Output = Frequency<T>;
14824 fn div(self, rhs: MagneticFlux<T>) -> Self::Output {
14825 Frequency{Hz: self.V.clone() / rhs.Wb}
14826 }
14827}
14828impl<T> core::ops::Div<&MagneticFlux<T>> for Voltage<T> where T: NumLike {
14830 type Output = Frequency<T>;
14831 fn div(self, rhs: &MagneticFlux<T>) -> Self::Output {
14832 Frequency{Hz: self.V / rhs.Wb.clone()}
14833 }
14834}
14835impl<T> core::ops::Div<&MagneticFlux<T>> for &Voltage<T> where T: NumLike {
14837 type Output = Frequency<T>;
14838 fn div(self, rhs: &MagneticFlux<T>) -> Self::Output {
14839 Frequency{Hz: self.V.clone() / rhs.Wb.clone()}
14840 }
14841}
14842
14843impl<T> core::ops::Div<Resistance<T>> for Voltage<T> where T: NumLike {
14846 type Output = Current<T>;
14847 fn div(self, rhs: Resistance<T>) -> Self::Output {
14848 Current{A: self.V / rhs.Ohm}
14849 }
14850}
14851impl<T> core::ops::Div<Resistance<T>> for &Voltage<T> where T: NumLike {
14853 type Output = Current<T>;
14854 fn div(self, rhs: Resistance<T>) -> Self::Output {
14855 Current{A: self.V.clone() / rhs.Ohm}
14856 }
14857}
14858impl<T> core::ops::Div<&Resistance<T>> for Voltage<T> where T: NumLike {
14860 type Output = Current<T>;
14861 fn div(self, rhs: &Resistance<T>) -> Self::Output {
14862 Current{A: self.V / rhs.Ohm.clone()}
14863 }
14864}
14865impl<T> core::ops::Div<&Resistance<T>> for &Voltage<T> where T: NumLike {
14867 type Output = Current<T>;
14868 fn div(self, rhs: &Resistance<T>) -> Self::Output {
14869 Current{A: self.V.clone() / rhs.Ohm.clone()}
14870 }
14871}
14872
14873impl<T> core::ops::Div<Energy<T>> for Voltage<T> where T: NumLike {
14876 type Output = InverseCharge<T>;
14877 fn div(self, rhs: Energy<T>) -> Self::Output {
14878 InverseCharge{per_C: self.V / rhs.J}
14879 }
14880}
14881impl<T> core::ops::Div<Energy<T>> for &Voltage<T> where T: NumLike {
14883 type Output = InverseCharge<T>;
14884 fn div(self, rhs: Energy<T>) -> Self::Output {
14885 InverseCharge{per_C: self.V.clone() / rhs.J}
14886 }
14887}
14888impl<T> core::ops::Div<&Energy<T>> for Voltage<T> where T: NumLike {
14890 type Output = InverseCharge<T>;
14891 fn div(self, rhs: &Energy<T>) -> Self::Output {
14892 InverseCharge{per_C: self.V / rhs.J.clone()}
14893 }
14894}
14895impl<T> core::ops::Div<&Energy<T>> for &Voltage<T> where T: NumLike {
14897 type Output = InverseCharge<T>;
14898 fn div(self, rhs: &Energy<T>) -> Self::Output {
14899 InverseCharge{per_C: self.V.clone() / rhs.J.clone()}
14900 }
14901}
14902
14903impl<T> core::ops::Div<Torque<T>> for Voltage<T> where T: NumLike {
14906 type Output = InverseCharge<T>;
14907 fn div(self, rhs: Torque<T>) -> Self::Output {
14908 InverseCharge{per_C: self.V / rhs.Nm}
14909 }
14910}
14911impl<T> core::ops::Div<Torque<T>> for &Voltage<T> where T: NumLike {
14913 type Output = InverseCharge<T>;
14914 fn div(self, rhs: Torque<T>) -> Self::Output {
14915 InverseCharge{per_C: self.V.clone() / rhs.Nm}
14916 }
14917}
14918impl<T> core::ops::Div<&Torque<T>> for Voltage<T> where T: NumLike {
14920 type Output = InverseCharge<T>;
14921 fn div(self, rhs: &Torque<T>) -> Self::Output {
14922 InverseCharge{per_C: self.V / rhs.Nm.clone()}
14923 }
14924}
14925impl<T> core::ops::Div<&Torque<T>> for &Voltage<T> where T: NumLike {
14927 type Output = InverseCharge<T>;
14928 fn div(self, rhs: &Torque<T>) -> Self::Output {
14929 InverseCharge{per_C: self.V.clone() / rhs.Nm.clone()}
14930 }
14931}
14932
14933impl<T> core::ops::Div<Frequency<T>> for Voltage<T> where T: NumLike {
14936 type Output = MagneticFlux<T>;
14937 fn div(self, rhs: Frequency<T>) -> Self::Output {
14938 MagneticFlux{Wb: self.V / rhs.Hz}
14939 }
14940}
14941impl<T> core::ops::Div<Frequency<T>> for &Voltage<T> where T: NumLike {
14943 type Output = MagneticFlux<T>;
14944 fn div(self, rhs: Frequency<T>) -> Self::Output {
14945 MagneticFlux{Wb: self.V.clone() / rhs.Hz}
14946 }
14947}
14948impl<T> core::ops::Div<&Frequency<T>> for Voltage<T> where T: NumLike {
14950 type Output = MagneticFlux<T>;
14951 fn div(self, rhs: &Frequency<T>) -> Self::Output {
14952 MagneticFlux{Wb: self.V / rhs.Hz.clone()}
14953 }
14954}
14955impl<T> core::ops::Div<&Frequency<T>> for &Voltage<T> where T: NumLike {
14957 type Output = MagneticFlux<T>;
14958 fn div(self, rhs: &Frequency<T>) -> Self::Output {
14959 MagneticFlux{Wb: self.V.clone() / rhs.Hz.clone()}
14960 }
14961}
14962
14963impl<T> core::ops::Mul<InverseEnergy<T>> for Voltage<T> where T: NumLike {
14966 type Output = InverseCharge<T>;
14967 fn mul(self, rhs: InverseEnergy<T>) -> Self::Output {
14968 InverseCharge{per_C: self.V * rhs.per_J}
14969 }
14970}
14971impl<T> core::ops::Mul<InverseEnergy<T>> for &Voltage<T> where T: NumLike {
14973 type Output = InverseCharge<T>;
14974 fn mul(self, rhs: InverseEnergy<T>) -> Self::Output {
14975 InverseCharge{per_C: self.V.clone() * rhs.per_J}
14976 }
14977}
14978impl<T> core::ops::Mul<&InverseEnergy<T>> for Voltage<T> where T: NumLike {
14980 type Output = InverseCharge<T>;
14981 fn mul(self, rhs: &InverseEnergy<T>) -> Self::Output {
14982 InverseCharge{per_C: self.V * rhs.per_J.clone()}
14983 }
14984}
14985impl<T> core::ops::Mul<&InverseEnergy<T>> for &Voltage<T> where T: NumLike {
14987 type Output = InverseCharge<T>;
14988 fn mul(self, rhs: &InverseEnergy<T>) -> Self::Output {
14989 InverseCharge{per_C: self.V.clone() * rhs.per_J.clone()}
14990 }
14991}
14992
14993impl<T> core::ops::Mul<InverseTorque<T>> for Voltage<T> where T: NumLike {
14996 type Output = InverseCharge<T>;
14997 fn mul(self, rhs: InverseTorque<T>) -> Self::Output {
14998 InverseCharge{per_C: self.V * rhs.per_Nm}
14999 }
15000}
15001impl<T> core::ops::Mul<InverseTorque<T>> for &Voltage<T> where T: NumLike {
15003 type Output = InverseCharge<T>;
15004 fn mul(self, rhs: InverseTorque<T>) -> Self::Output {
15005 InverseCharge{per_C: self.V.clone() * rhs.per_Nm}
15006 }
15007}
15008impl<T> core::ops::Mul<&InverseTorque<T>> for Voltage<T> where T: NumLike {
15010 type Output = InverseCharge<T>;
15011 fn mul(self, rhs: &InverseTorque<T>) -> Self::Output {
15012 InverseCharge{per_C: self.V * rhs.per_Nm.clone()}
15013 }
15014}
15015impl<T> core::ops::Mul<&InverseTorque<T>> for &Voltage<T> where T: NumLike {
15017 type Output = InverseCharge<T>;
15018 fn mul(self, rhs: &InverseTorque<T>) -> Self::Output {
15019 InverseCharge{per_C: self.V.clone() * rhs.per_Nm.clone()}
15020 }
15021}
15022
15023impl<T> core::ops::Mul<InversePower<T>> for Voltage<T> where T: NumLike {
15026 type Output = InverseCurrent<T>;
15027 fn mul(self, rhs: InversePower<T>) -> Self::Output {
15028 InverseCurrent{per_A: self.V * rhs.per_W}
15029 }
15030}
15031impl<T> core::ops::Mul<InversePower<T>> for &Voltage<T> where T: NumLike {
15033 type Output = InverseCurrent<T>;
15034 fn mul(self, rhs: InversePower<T>) -> Self::Output {
15035 InverseCurrent{per_A: self.V.clone() * rhs.per_W}
15036 }
15037}
15038impl<T> core::ops::Mul<&InversePower<T>> for Voltage<T> where T: NumLike {
15040 type Output = InverseCurrent<T>;
15041 fn mul(self, rhs: &InversePower<T>) -> Self::Output {
15042 InverseCurrent{per_A: self.V * rhs.per_W.clone()}
15043 }
15044}
15045impl<T> core::ops::Mul<&InversePower<T>> for &Voltage<T> where T: NumLike {
15047 type Output = InverseCurrent<T>;
15048 fn mul(self, rhs: &InversePower<T>) -> Self::Output {
15049 InverseCurrent{per_A: self.V.clone() * rhs.per_W.clone()}
15050 }
15051}
15052
15053impl<T> core::ops::Div<Power<T>> for Voltage<T> where T: NumLike {
15056 type Output = InverseCurrent<T>;
15057 fn div(self, rhs: Power<T>) -> Self::Output {
15058 InverseCurrent{per_A: self.V / rhs.W}
15059 }
15060}
15061impl<T> core::ops::Div<Power<T>> for &Voltage<T> where T: NumLike {
15063 type Output = InverseCurrent<T>;
15064 fn div(self, rhs: Power<T>) -> Self::Output {
15065 InverseCurrent{per_A: self.V.clone() / rhs.W}
15066 }
15067}
15068impl<T> core::ops::Div<&Power<T>> for Voltage<T> where T: NumLike {
15070 type Output = InverseCurrent<T>;
15071 fn div(self, rhs: &Power<T>) -> Self::Output {
15072 InverseCurrent{per_A: self.V / rhs.W.clone()}
15073 }
15074}
15075impl<T> core::ops::Div<&Power<T>> for &Voltage<T> where T: NumLike {
15077 type Output = InverseCurrent<T>;
15078 fn div(self, rhs: &Power<T>) -> Self::Output {
15079 InverseCurrent{per_A: self.V.clone() / rhs.W.clone()}
15080 }
15081}
15082
15083impl<T> core::ops::Div<Voltage<T>> for f64 where T: NumLike+From<f64> {
15086 type Output = InverseVoltage<T>;
15087 fn div(self, rhs: Voltage<T>) -> Self::Output {
15088 InverseVoltage{per_V: T::from(self) / rhs.V}
15089 }
15090}
15091impl<T> core::ops::Div<Voltage<T>> for &f64 where T: NumLike+From<f64> {
15093 type Output = InverseVoltage<T>;
15094 fn div(self, rhs: Voltage<T>) -> Self::Output {
15095 InverseVoltage{per_V: T::from(self.clone()) / rhs.V}
15096 }
15097}
15098impl<T> core::ops::Div<&Voltage<T>> for f64 where T: NumLike+From<f64> {
15100 type Output = InverseVoltage<T>;
15101 fn div(self, rhs: &Voltage<T>) -> Self::Output {
15102 InverseVoltage{per_V: T::from(self) / rhs.V.clone()}
15103 }
15104}
15105impl<T> core::ops::Div<&Voltage<T>> for &f64 where T: NumLike+From<f64> {
15107 type Output = InverseVoltage<T>;
15108 fn div(self, rhs: &Voltage<T>) -> Self::Output {
15109 InverseVoltage{per_V: T::from(self.clone()) / rhs.V.clone()}
15110 }
15111}
15112
15113impl<T> core::ops::Div<Voltage<T>> for f32 where T: NumLike+From<f32> {
15116 type Output = InverseVoltage<T>;
15117 fn div(self, rhs: Voltage<T>) -> Self::Output {
15118 InverseVoltage{per_V: T::from(self) / rhs.V}
15119 }
15120}
15121impl<T> core::ops::Div<Voltage<T>> for &f32 where T: NumLike+From<f32> {
15123 type Output = InverseVoltage<T>;
15124 fn div(self, rhs: Voltage<T>) -> Self::Output {
15125 InverseVoltage{per_V: T::from(self.clone()) / rhs.V}
15126 }
15127}
15128impl<T> core::ops::Div<&Voltage<T>> for f32 where T: NumLike+From<f32> {
15130 type Output = InverseVoltage<T>;
15131 fn div(self, rhs: &Voltage<T>) -> Self::Output {
15132 InverseVoltage{per_V: T::from(self) / rhs.V.clone()}
15133 }
15134}
15135impl<T> core::ops::Div<&Voltage<T>> for &f32 where T: NumLike+From<f32> {
15137 type Output = InverseVoltage<T>;
15138 fn div(self, rhs: &Voltage<T>) -> Self::Output {
15139 InverseVoltage{per_V: T::from(self.clone()) / rhs.V.clone()}
15140 }
15141}
15142
15143impl<T> core::ops::Div<Voltage<T>> for i64 where T: NumLike+From<i64> {
15146 type Output = InverseVoltage<T>;
15147 fn div(self, rhs: Voltage<T>) -> Self::Output {
15148 InverseVoltage{per_V: T::from(self) / rhs.V}
15149 }
15150}
15151impl<T> core::ops::Div<Voltage<T>> for &i64 where T: NumLike+From<i64> {
15153 type Output = InverseVoltage<T>;
15154 fn div(self, rhs: Voltage<T>) -> Self::Output {
15155 InverseVoltage{per_V: T::from(self.clone()) / rhs.V}
15156 }
15157}
15158impl<T> core::ops::Div<&Voltage<T>> for i64 where T: NumLike+From<i64> {
15160 type Output = InverseVoltage<T>;
15161 fn div(self, rhs: &Voltage<T>) -> Self::Output {
15162 InverseVoltage{per_V: T::from(self) / rhs.V.clone()}
15163 }
15164}
15165impl<T> core::ops::Div<&Voltage<T>> for &i64 where T: NumLike+From<i64> {
15167 type Output = InverseVoltage<T>;
15168 fn div(self, rhs: &Voltage<T>) -> Self::Output {
15169 InverseVoltage{per_V: T::from(self.clone()) / rhs.V.clone()}
15170 }
15171}
15172
15173impl<T> core::ops::Div<Voltage<T>> for i32 where T: NumLike+From<i32> {
15176 type Output = InverseVoltage<T>;
15177 fn div(self, rhs: Voltage<T>) -> Self::Output {
15178 InverseVoltage{per_V: T::from(self) / rhs.V}
15179 }
15180}
15181impl<T> core::ops::Div<Voltage<T>> for &i32 where T: NumLike+From<i32> {
15183 type Output = InverseVoltage<T>;
15184 fn div(self, rhs: Voltage<T>) -> Self::Output {
15185 InverseVoltage{per_V: T::from(self.clone()) / rhs.V}
15186 }
15187}
15188impl<T> core::ops::Div<&Voltage<T>> for i32 where T: NumLike+From<i32> {
15190 type Output = InverseVoltage<T>;
15191 fn div(self, rhs: &Voltage<T>) -> Self::Output {
15192 InverseVoltage{per_V: T::from(self) / rhs.V.clone()}
15193 }
15194}
15195impl<T> core::ops::Div<&Voltage<T>> for &i32 where T: NumLike+From<i32> {
15197 type Output = InverseVoltage<T>;
15198 fn div(self, rhs: &Voltage<T>) -> Self::Output {
15199 InverseVoltage{per_V: T::from(self.clone()) / rhs.V.clone()}
15200 }
15201}
15202
15203#[cfg(feature="num-bigfloat")]
15206impl<T> core::ops::Div<Voltage<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
15207 type Output = InverseVoltage<T>;
15208 fn div(self, rhs: Voltage<T>) -> Self::Output {
15209 InverseVoltage{per_V: T::from(self) / rhs.V}
15210 }
15211}
15212#[cfg(feature="num-bigfloat")]
15214impl<T> core::ops::Div<Voltage<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
15215 type Output = InverseVoltage<T>;
15216 fn div(self, rhs: Voltage<T>) -> Self::Output {
15217 InverseVoltage{per_V: T::from(self.clone()) / rhs.V}
15218 }
15219}
15220#[cfg(feature="num-bigfloat")]
15222impl<T> core::ops::Div<&Voltage<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
15223 type Output = InverseVoltage<T>;
15224 fn div(self, rhs: &Voltage<T>) -> Self::Output {
15225 InverseVoltage{per_V: T::from(self) / rhs.V.clone()}
15226 }
15227}
15228#[cfg(feature="num-bigfloat")]
15230impl<T> core::ops::Div<&Voltage<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
15231 type Output = InverseVoltage<T>;
15232 fn div(self, rhs: &Voltage<T>) -> Self::Output {
15233 InverseVoltage{per_V: T::from(self.clone()) / rhs.V.clone()}
15234 }
15235}
15236
15237#[cfg(feature="num-complex")]
15240impl<T> core::ops::Div<Voltage<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
15241 type Output = InverseVoltage<T>;
15242 fn div(self, rhs: Voltage<T>) -> Self::Output {
15243 InverseVoltage{per_V: T::from(self) / rhs.V}
15244 }
15245}
15246#[cfg(feature="num-complex")]
15248impl<T> core::ops::Div<Voltage<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
15249 type Output = InverseVoltage<T>;
15250 fn div(self, rhs: Voltage<T>) -> Self::Output {
15251 InverseVoltage{per_V: T::from(self.clone()) / rhs.V}
15252 }
15253}
15254#[cfg(feature="num-complex")]
15256impl<T> core::ops::Div<&Voltage<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
15257 type Output = InverseVoltage<T>;
15258 fn div(self, rhs: &Voltage<T>) -> Self::Output {
15259 InverseVoltage{per_V: T::from(self) / rhs.V.clone()}
15260 }
15261}
15262#[cfg(feature="num-complex")]
15264impl<T> core::ops::Div<&Voltage<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
15265 type Output = InverseVoltage<T>;
15266 fn div(self, rhs: &Voltage<T>) -> Self::Output {
15267 InverseVoltage{per_V: T::from(self.clone()) / rhs.V.clone()}
15268 }
15269}
15270
15271#[cfg(feature="num-complex")]
15274impl<T> core::ops::Div<Voltage<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
15275 type Output = InverseVoltage<T>;
15276 fn div(self, rhs: Voltage<T>) -> Self::Output {
15277 InverseVoltage{per_V: T::from(self) / rhs.V}
15278 }
15279}
15280#[cfg(feature="num-complex")]
15282impl<T> core::ops::Div<Voltage<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
15283 type Output = InverseVoltage<T>;
15284 fn div(self, rhs: Voltage<T>) -> Self::Output {
15285 InverseVoltage{per_V: T::from(self.clone()) / rhs.V}
15286 }
15287}
15288#[cfg(feature="num-complex")]
15290impl<T> core::ops::Div<&Voltage<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
15291 type Output = InverseVoltage<T>;
15292 fn div(self, rhs: &Voltage<T>) -> Self::Output {
15293 InverseVoltage{per_V: T::from(self) / rhs.V.clone()}
15294 }
15295}
15296#[cfg(feature="num-complex")]
15298impl<T> core::ops::Div<&Voltage<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
15299 type Output = InverseVoltage<T>;
15300 fn div(self, rhs: &Voltage<T>) -> Self::Output {
15301 InverseVoltage{per_V: T::from(self.clone()) / rhs.V.clone()}
15302 }
15303}
15304
15305
15306