1
2use core::fmt;
5use super::UnitStruct;
6use super::NumLike;
7use super::base::*;
8use super::chemical::*;
9use super::electromagnetic::*;
10use super::geometry::*;
11use super::nuclear::*;
12
13#[cfg(feature="serde")]
15use serde::{Serialize, Deserialize};
16#[cfg(feature="num-bigfloat")]
17use num_bigfloat;
18#[cfg(feature="num-complex")]
19use num_complex;
20
21
22
23#[derive(UnitStruct, Debug, Clone)]
25#[cfg_attr(feature="serde", derive(Serialize, Deserialize))]
26pub struct Acceleration<T: NumLike>{
27 pub mps2: T
29}
30
31impl<T> Acceleration<T> where T: NumLike {
32
33 pub fn unit_name() -> &'static str { "meters per second squared" }
35
36 pub fn unit_symbol() -> &'static str { "m/s²" }
38
39 pub fn from_mps2(mps2: T) -> Self { Acceleration{mps2: mps2} }
44
45 pub fn to_mps2(&self) -> T { self.mps2.clone() }
47
48 pub fn from_meters_per_second_squared(meters_per_second_squared: T) -> Self { Acceleration{mps2: meters_per_second_squared} }
53
54 pub fn to_meters_per_second_squared(&self) -> T { self.mps2.clone() }
56
57}
58
59impl<T> fmt::Display for Acceleration<T> where T: NumLike {
60 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
61 write!(f, "{} {}", &self.mps2, Self::unit_symbol())
62 }
63}
64
65impl<T> Acceleration<T> where T: NumLike+From<f64> {
66
67 pub fn to_mmps2(&self) -> T {
71 return self.mps2.clone() * T::from(1000.0_f64);
72 }
73
74 pub fn from_mmps2(mmps2: T) -> Self {
81 Acceleration{mps2: mmps2 * T::from(0.001_f64)}
82 }
83
84 pub fn to_kilometers_per_hour_squared(&self) -> T {
88 return self.mps2.clone() * T::from(1000000.0_f64);
89 }
90
91 pub fn from_kilometers_per_hour_squared(kilometers_per_hour_squared: T) -> Self {
98 Acceleration{mps2: kilometers_per_hour_squared * T::from(1e-06_f64)}
99 }
100
101 pub fn to_kph2(&self) -> T {
105 return self.mps2.clone() * T::from(12960.0_f64);
106 }
107
108 pub fn from_kph2(kph2: T) -> Self {
115 Acceleration{mps2: kph2 * T::from(7.71604938271605e-05_f64)}
116 }
117
118}
119
120
121#[cfg(feature="num-bigfloat")]
123impl core::ops::Mul<Acceleration<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
124 type Output = Acceleration<num_bigfloat::BigFloat>;
125 fn mul(self, rhs: Acceleration<num_bigfloat::BigFloat>) -> Self::Output {
126 Acceleration{mps2: self * rhs.mps2}
127 }
128}
129#[cfg(feature="num-bigfloat")]
131impl core::ops::Mul<Acceleration<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
132 type Output = Acceleration<num_bigfloat::BigFloat>;
133 fn mul(self, rhs: Acceleration<num_bigfloat::BigFloat>) -> Self::Output {
134 Acceleration{mps2: self.clone() * rhs.mps2}
135 }
136}
137#[cfg(feature="num-bigfloat")]
139impl core::ops::Mul<&Acceleration<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
140 type Output = Acceleration<num_bigfloat::BigFloat>;
141 fn mul(self, rhs: &Acceleration<num_bigfloat::BigFloat>) -> Self::Output {
142 Acceleration{mps2: self * rhs.mps2.clone()}
143 }
144}
145#[cfg(feature="num-bigfloat")]
147impl core::ops::Mul<&Acceleration<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
148 type Output = Acceleration<num_bigfloat::BigFloat>;
149 fn mul(self, rhs: &Acceleration<num_bigfloat::BigFloat>) -> Self::Output {
150 Acceleration{mps2: self.clone() * rhs.mps2.clone()}
151 }
152}
153
154#[cfg(feature="num-complex")]
156impl core::ops::Mul<Acceleration<num_complex::Complex32>> for num_complex::Complex32 {
157 type Output = Acceleration<num_complex::Complex32>;
158 fn mul(self, rhs: Acceleration<num_complex::Complex32>) -> Self::Output {
159 Acceleration{mps2: self * rhs.mps2}
160 }
161}
162#[cfg(feature="num-complex")]
164impl core::ops::Mul<Acceleration<num_complex::Complex32>> for &num_complex::Complex32 {
165 type Output = Acceleration<num_complex::Complex32>;
166 fn mul(self, rhs: Acceleration<num_complex::Complex32>) -> Self::Output {
167 Acceleration{mps2: self.clone() * rhs.mps2}
168 }
169}
170#[cfg(feature="num-complex")]
172impl core::ops::Mul<&Acceleration<num_complex::Complex32>> for num_complex::Complex32 {
173 type Output = Acceleration<num_complex::Complex32>;
174 fn mul(self, rhs: &Acceleration<num_complex::Complex32>) -> Self::Output {
175 Acceleration{mps2: self * rhs.mps2.clone()}
176 }
177}
178#[cfg(feature="num-complex")]
180impl core::ops::Mul<&Acceleration<num_complex::Complex32>> for &num_complex::Complex32 {
181 type Output = Acceleration<num_complex::Complex32>;
182 fn mul(self, rhs: &Acceleration<num_complex::Complex32>) -> Self::Output {
183 Acceleration{mps2: self.clone() * rhs.mps2.clone()}
184 }
185}
186
187#[cfg(feature="num-complex")]
189impl core::ops::Mul<Acceleration<num_complex::Complex64>> for num_complex::Complex64 {
190 type Output = Acceleration<num_complex::Complex64>;
191 fn mul(self, rhs: Acceleration<num_complex::Complex64>) -> Self::Output {
192 Acceleration{mps2: self * rhs.mps2}
193 }
194}
195#[cfg(feature="num-complex")]
197impl core::ops::Mul<Acceleration<num_complex::Complex64>> for &num_complex::Complex64 {
198 type Output = Acceleration<num_complex::Complex64>;
199 fn mul(self, rhs: Acceleration<num_complex::Complex64>) -> Self::Output {
200 Acceleration{mps2: self.clone() * rhs.mps2}
201 }
202}
203#[cfg(feature="num-complex")]
205impl core::ops::Mul<&Acceleration<num_complex::Complex64>> for num_complex::Complex64 {
206 type Output = Acceleration<num_complex::Complex64>;
207 fn mul(self, rhs: &Acceleration<num_complex::Complex64>) -> Self::Output {
208 Acceleration{mps2: self * rhs.mps2.clone()}
209 }
210}
211#[cfg(feature="num-complex")]
213impl core::ops::Mul<&Acceleration<num_complex::Complex64>> for &num_complex::Complex64 {
214 type Output = Acceleration<num_complex::Complex64>;
215 fn mul(self, rhs: &Acceleration<num_complex::Complex64>) -> Self::Output {
216 Acceleration{mps2: self.clone() * rhs.mps2.clone()}
217 }
218}
219
220
221
222#[cfg(feature = "uom")]
224impl<T> Into<uom::si::f32::Acceleration> for Acceleration<T> where T: NumLike+Into<f32> {
225 fn into(self) -> uom::si::f32::Acceleration {
226 uom::si::f32::Acceleration::new::<uom::si::acceleration::meter_per_second_squared>(self.mps2.into())
227 }
228}
229
230#[cfg(feature = "uom")]
232impl<T> From<uom::si::f32::Acceleration> for Acceleration<T> where T: NumLike+From<f32> {
233 fn from(src: uom::si::f32::Acceleration) -> Self {
234 Acceleration{mps2: T::from(src.value)}
235 }
236}
237
238#[cfg(feature = "uom")]
240impl<T> Into<uom::si::f64::Acceleration> for Acceleration<T> where T: NumLike+Into<f64> {
241 fn into(self) -> uom::si::f64::Acceleration {
242 uom::si::f64::Acceleration::new::<uom::si::acceleration::meter_per_second_squared>(self.mps2.into())
243 }
244}
245
246#[cfg(feature = "uom")]
248impl<T> From<uom::si::f64::Acceleration> for Acceleration<T> where T: NumLike+From<f64> {
249 fn from(src: uom::si::f64::Acceleration) -> Self {
250 Acceleration{mps2: T::from(src.value)}
251 }
252}
253
254
255impl<T> core::ops::Div<InverseMass<T>> for Acceleration<T> where T: NumLike {
258 type Output = Force<T>;
259 fn div(self, rhs: InverseMass<T>) -> Self::Output {
260 Force{N: self.mps2 / rhs.per_kg}
261 }
262}
263impl<T> core::ops::Div<InverseMass<T>> for &Acceleration<T> where T: NumLike {
265 type Output = Force<T>;
266 fn div(self, rhs: InverseMass<T>) -> Self::Output {
267 Force{N: self.mps2.clone() / rhs.per_kg}
268 }
269}
270impl<T> core::ops::Div<&InverseMass<T>> for Acceleration<T> where T: NumLike {
272 type Output = Force<T>;
273 fn div(self, rhs: &InverseMass<T>) -> Self::Output {
274 Force{N: self.mps2 / rhs.per_kg.clone()}
275 }
276}
277impl<T> core::ops::Div<&InverseMass<T>> for &Acceleration<T> where T: NumLike {
279 type Output = Force<T>;
280 fn div(self, rhs: &InverseMass<T>) -> Self::Output {
281 Force{N: self.mps2.clone() / rhs.per_kg.clone()}
282 }
283}
284
285impl<T> core::ops::Mul<Mass<T>> for Acceleration<T> where T: NumLike {
288 type Output = Force<T>;
289 fn mul(self, rhs: Mass<T>) -> Self::Output {
290 Force{N: self.mps2 * rhs.kg}
291 }
292}
293impl<T> core::ops::Mul<Mass<T>> for &Acceleration<T> where T: NumLike {
295 type Output = Force<T>;
296 fn mul(self, rhs: Mass<T>) -> Self::Output {
297 Force{N: self.mps2.clone() * rhs.kg}
298 }
299}
300impl<T> core::ops::Mul<&Mass<T>> for Acceleration<T> where T: NumLike {
302 type Output = Force<T>;
303 fn mul(self, rhs: &Mass<T>) -> Self::Output {
304 Force{N: self.mps2 * rhs.kg.clone()}
305 }
306}
307impl<T> core::ops::Mul<&Mass<T>> for &Acceleration<T> where T: NumLike {
309 type Output = Force<T>;
310 fn mul(self, rhs: &Mass<T>) -> Self::Output {
311 Force{N: self.mps2.clone() * rhs.kg.clone()}
312 }
313}
314
315impl<T> core::ops::Mul<Time<T>> for Acceleration<T> where T: NumLike {
318 type Output = Velocity<T>;
319 fn mul(self, rhs: Time<T>) -> Self::Output {
320 Velocity{mps: self.mps2 * rhs.s}
321 }
322}
323impl<T> core::ops::Mul<Time<T>> for &Acceleration<T> where T: NumLike {
325 type Output = Velocity<T>;
326 fn mul(self, rhs: Time<T>) -> Self::Output {
327 Velocity{mps: self.mps2.clone() * rhs.s}
328 }
329}
330impl<T> core::ops::Mul<&Time<T>> for Acceleration<T> where T: NumLike {
332 type Output = Velocity<T>;
333 fn mul(self, rhs: &Time<T>) -> Self::Output {
334 Velocity{mps: self.mps2 * rhs.s.clone()}
335 }
336}
337impl<T> core::ops::Mul<&Time<T>> for &Acceleration<T> where T: NumLike {
339 type Output = Velocity<T>;
340 fn mul(self, rhs: &Time<T>) -> Self::Output {
341 Velocity{mps: self.mps2.clone() * rhs.s.clone()}
342 }
343}
344
345impl<T> core::ops::Mul<AreaDensity<T>> for Acceleration<T> where T: NumLike {
348 type Output = Pressure<T>;
349 fn mul(self, rhs: AreaDensity<T>) -> Self::Output {
350 Pressure{Pa: self.mps2 * rhs.kgpm2}
351 }
352}
353impl<T> core::ops::Mul<AreaDensity<T>> for &Acceleration<T> where T: NumLike {
355 type Output = Pressure<T>;
356 fn mul(self, rhs: AreaDensity<T>) -> Self::Output {
357 Pressure{Pa: self.mps2.clone() * rhs.kgpm2}
358 }
359}
360impl<T> core::ops::Mul<&AreaDensity<T>> for Acceleration<T> where T: NumLike {
362 type Output = Pressure<T>;
363 fn mul(self, rhs: &AreaDensity<T>) -> Self::Output {
364 Pressure{Pa: self.mps2 * rhs.kgpm2.clone()}
365 }
366}
367impl<T> core::ops::Mul<&AreaDensity<T>> for &Acceleration<T> where T: NumLike {
369 type Output = Pressure<T>;
370 fn mul(self, rhs: &AreaDensity<T>) -> Self::Output {
371 Pressure{Pa: self.mps2.clone() * rhs.kgpm2.clone()}
372 }
373}
374
375impl<T> core::ops::Div<AreaPerMass<T>> for Acceleration<T> where T: NumLike {
378 type Output = Pressure<T>;
379 fn div(self, rhs: AreaPerMass<T>) -> Self::Output {
380 Pressure{Pa: self.mps2 / rhs.m2_per_kg}
381 }
382}
383impl<T> core::ops::Div<AreaPerMass<T>> for &Acceleration<T> where T: NumLike {
385 type Output = Pressure<T>;
386 fn div(self, rhs: AreaPerMass<T>) -> Self::Output {
387 Pressure{Pa: self.mps2.clone() / rhs.m2_per_kg}
388 }
389}
390impl<T> core::ops::Div<&AreaPerMass<T>> for Acceleration<T> where T: NumLike {
392 type Output = Pressure<T>;
393 fn div(self, rhs: &AreaPerMass<T>) -> Self::Output {
394 Pressure{Pa: self.mps2 / rhs.m2_per_kg.clone()}
395 }
396}
397impl<T> core::ops::Div<&AreaPerMass<T>> for &Acceleration<T> where T: NumLike {
399 type Output = Pressure<T>;
400 fn div(self, rhs: &AreaPerMass<T>) -> Self::Output {
401 Pressure{Pa: self.mps2.clone() / rhs.m2_per_kg.clone()}
402 }
403}
404
405impl<T> core::ops::Div<Force<T>> for Acceleration<T> where T: NumLike {
408 type Output = InverseMass<T>;
409 fn div(self, rhs: Force<T>) -> Self::Output {
410 InverseMass{per_kg: self.mps2 / rhs.N}
411 }
412}
413impl<T> core::ops::Div<Force<T>> for &Acceleration<T> where T: NumLike {
415 type Output = InverseMass<T>;
416 fn div(self, rhs: Force<T>) -> Self::Output {
417 InverseMass{per_kg: self.mps2.clone() / rhs.N}
418 }
419}
420impl<T> core::ops::Div<&Force<T>> for Acceleration<T> where T: NumLike {
422 type Output = InverseMass<T>;
423 fn div(self, rhs: &Force<T>) -> Self::Output {
424 InverseMass{per_kg: self.mps2 / rhs.N.clone()}
425 }
426}
427impl<T> core::ops::Div<&Force<T>> for &Acceleration<T> where T: NumLike {
429 type Output = InverseMass<T>;
430 fn div(self, rhs: &Force<T>) -> Self::Output {
431 InverseMass{per_kg: self.mps2.clone() / rhs.N.clone()}
432 }
433}
434
435impl<T> core::ops::Div<Frequency<T>> for Acceleration<T> where T: NumLike {
438 type Output = Velocity<T>;
439 fn div(self, rhs: Frequency<T>) -> Self::Output {
440 Velocity{mps: self.mps2 / rhs.Hz}
441 }
442}
443impl<T> core::ops::Div<Frequency<T>> for &Acceleration<T> where T: NumLike {
445 type Output = Velocity<T>;
446 fn div(self, rhs: Frequency<T>) -> Self::Output {
447 Velocity{mps: self.mps2.clone() / rhs.Hz}
448 }
449}
450impl<T> core::ops::Div<&Frequency<T>> for Acceleration<T> where T: NumLike {
452 type Output = Velocity<T>;
453 fn div(self, rhs: &Frequency<T>) -> Self::Output {
454 Velocity{mps: self.mps2 / rhs.Hz.clone()}
455 }
456}
457impl<T> core::ops::Div<&Frequency<T>> for &Acceleration<T> where T: NumLike {
459 type Output = Velocity<T>;
460 fn div(self, rhs: &Frequency<T>) -> Self::Output {
461 Velocity{mps: self.mps2.clone() / rhs.Hz.clone()}
462 }
463}
464
465impl<T> core::ops::Mul<InverseForce<T>> for Acceleration<T> where T: NumLike {
468 type Output = InverseMass<T>;
469 fn mul(self, rhs: InverseForce<T>) -> Self::Output {
470 InverseMass{per_kg: self.mps2 * rhs.per_N}
471 }
472}
473impl<T> core::ops::Mul<InverseForce<T>> for &Acceleration<T> where T: NumLike {
475 type Output = InverseMass<T>;
476 fn mul(self, rhs: InverseForce<T>) -> Self::Output {
477 InverseMass{per_kg: self.mps2.clone() * rhs.per_N}
478 }
479}
480impl<T> core::ops::Mul<&InverseForce<T>> for Acceleration<T> where T: NumLike {
482 type Output = InverseMass<T>;
483 fn mul(self, rhs: &InverseForce<T>) -> Self::Output {
484 InverseMass{per_kg: self.mps2 * rhs.per_N.clone()}
485 }
486}
487impl<T> core::ops::Mul<&InverseForce<T>> for &Acceleration<T> where T: NumLike {
489 type Output = InverseMass<T>;
490 fn mul(self, rhs: &InverseForce<T>) -> Self::Output {
491 InverseMass{per_kg: self.mps2.clone() * rhs.per_N.clone()}
492 }
493}
494
495impl<T> core::ops::Div<InverseMomentum<T>> for Acceleration<T> where T: NumLike {
498 type Output = Power<T>;
499 fn div(self, rhs: InverseMomentum<T>) -> Self::Output {
500 Power{W: self.mps2 / rhs.s_per_kgm}
501 }
502}
503impl<T> core::ops::Div<InverseMomentum<T>> for &Acceleration<T> where T: NumLike {
505 type Output = Power<T>;
506 fn div(self, rhs: InverseMomentum<T>) -> Self::Output {
507 Power{W: self.mps2.clone() / rhs.s_per_kgm}
508 }
509}
510impl<T> core::ops::Div<&InverseMomentum<T>> for Acceleration<T> where T: NumLike {
512 type Output = Power<T>;
513 fn div(self, rhs: &InverseMomentum<T>) -> Self::Output {
514 Power{W: self.mps2 / rhs.s_per_kgm.clone()}
515 }
516}
517impl<T> core::ops::Div<&InverseMomentum<T>> for &Acceleration<T> where T: NumLike {
519 type Output = Power<T>;
520 fn div(self, rhs: &InverseMomentum<T>) -> Self::Output {
521 Power{W: self.mps2.clone() / rhs.s_per_kgm.clone()}
522 }
523}
524
525impl<T> core::ops::Mul<InversePower<T>> for Acceleration<T> where T: NumLike {
528 type Output = InverseMomentum<T>;
529 fn mul(self, rhs: InversePower<T>) -> Self::Output {
530 InverseMomentum{s_per_kgm: self.mps2 * rhs.per_W}
531 }
532}
533impl<T> core::ops::Mul<InversePower<T>> for &Acceleration<T> where T: NumLike {
535 type Output = InverseMomentum<T>;
536 fn mul(self, rhs: InversePower<T>) -> Self::Output {
537 InverseMomentum{s_per_kgm: self.mps2.clone() * rhs.per_W}
538 }
539}
540impl<T> core::ops::Mul<&InversePower<T>> for Acceleration<T> where T: NumLike {
542 type Output = InverseMomentum<T>;
543 fn mul(self, rhs: &InversePower<T>) -> Self::Output {
544 InverseMomentum{s_per_kgm: self.mps2 * rhs.per_W.clone()}
545 }
546}
547impl<T> core::ops::Mul<&InversePower<T>> for &Acceleration<T> where T: NumLike {
549 type Output = InverseMomentum<T>;
550 fn mul(self, rhs: &InversePower<T>) -> Self::Output {
551 InverseMomentum{s_per_kgm: self.mps2.clone() * rhs.per_W.clone()}
552 }
553}
554
555impl<T> core::ops::Mul<InversePressure<T>> for Acceleration<T> where T: NumLike {
558 type Output = AreaPerMass<T>;
559 fn mul(self, rhs: InversePressure<T>) -> Self::Output {
560 AreaPerMass{m2_per_kg: self.mps2 * rhs.per_Pa}
561 }
562}
563impl<T> core::ops::Mul<InversePressure<T>> for &Acceleration<T> where T: NumLike {
565 type Output = AreaPerMass<T>;
566 fn mul(self, rhs: InversePressure<T>) -> Self::Output {
567 AreaPerMass{m2_per_kg: self.mps2.clone() * rhs.per_Pa}
568 }
569}
570impl<T> core::ops::Mul<&InversePressure<T>> for Acceleration<T> where T: NumLike {
572 type Output = AreaPerMass<T>;
573 fn mul(self, rhs: &InversePressure<T>) -> Self::Output {
574 AreaPerMass{m2_per_kg: self.mps2 * rhs.per_Pa.clone()}
575 }
576}
577impl<T> core::ops::Mul<&InversePressure<T>> for &Acceleration<T> where T: NumLike {
579 type Output = AreaPerMass<T>;
580 fn mul(self, rhs: &InversePressure<T>) -> Self::Output {
581 AreaPerMass{m2_per_kg: self.mps2.clone() * rhs.per_Pa.clone()}
582 }
583}
584
585impl<T> core::ops::Mul<Momentum<T>> for Acceleration<T> where T: NumLike {
588 type Output = Power<T>;
589 fn mul(self, rhs: Momentum<T>) -> Self::Output {
590 Power{W: self.mps2 * rhs.kgmps}
591 }
592}
593impl<T> core::ops::Mul<Momentum<T>> for &Acceleration<T> where T: NumLike {
595 type Output = Power<T>;
596 fn mul(self, rhs: Momentum<T>) -> Self::Output {
597 Power{W: self.mps2.clone() * rhs.kgmps}
598 }
599}
600impl<T> core::ops::Mul<&Momentum<T>> for Acceleration<T> where T: NumLike {
602 type Output = Power<T>;
603 fn mul(self, rhs: &Momentum<T>) -> Self::Output {
604 Power{W: self.mps2 * rhs.kgmps.clone()}
605 }
606}
607impl<T> core::ops::Mul<&Momentum<T>> for &Acceleration<T> where T: NumLike {
609 type Output = Power<T>;
610 fn mul(self, rhs: &Momentum<T>) -> Self::Output {
611 Power{W: self.mps2.clone() * rhs.kgmps.clone()}
612 }
613}
614
615impl<T> core::ops::Div<Power<T>> for Acceleration<T> where T: NumLike {
618 type Output = InverseMomentum<T>;
619 fn div(self, rhs: Power<T>) -> Self::Output {
620 InverseMomentum{s_per_kgm: self.mps2 / rhs.W}
621 }
622}
623impl<T> core::ops::Div<Power<T>> for &Acceleration<T> where T: NumLike {
625 type Output = InverseMomentum<T>;
626 fn div(self, rhs: Power<T>) -> Self::Output {
627 InverseMomentum{s_per_kgm: self.mps2.clone() / rhs.W}
628 }
629}
630impl<T> core::ops::Div<&Power<T>> for Acceleration<T> where T: NumLike {
632 type Output = InverseMomentum<T>;
633 fn div(self, rhs: &Power<T>) -> Self::Output {
634 InverseMomentum{s_per_kgm: self.mps2 / rhs.W.clone()}
635 }
636}
637impl<T> core::ops::Div<&Power<T>> for &Acceleration<T> where T: NumLike {
639 type Output = InverseMomentum<T>;
640 fn div(self, rhs: &Power<T>) -> Self::Output {
641 InverseMomentum{s_per_kgm: self.mps2.clone() / rhs.W.clone()}
642 }
643}
644
645impl<T> core::ops::Div<Pressure<T>> for Acceleration<T> where T: NumLike {
648 type Output = AreaPerMass<T>;
649 fn div(self, rhs: Pressure<T>) -> Self::Output {
650 AreaPerMass{m2_per_kg: self.mps2 / rhs.Pa}
651 }
652}
653impl<T> core::ops::Div<Pressure<T>> for &Acceleration<T> where T: NumLike {
655 type Output = AreaPerMass<T>;
656 fn div(self, rhs: Pressure<T>) -> Self::Output {
657 AreaPerMass{m2_per_kg: self.mps2.clone() / rhs.Pa}
658 }
659}
660impl<T> core::ops::Div<&Pressure<T>> for Acceleration<T> where T: NumLike {
662 type Output = AreaPerMass<T>;
663 fn div(self, rhs: &Pressure<T>) -> Self::Output {
664 AreaPerMass{m2_per_kg: self.mps2 / rhs.Pa.clone()}
665 }
666}
667impl<T> core::ops::Div<&Pressure<T>> for &Acceleration<T> where T: NumLike {
669 type Output = AreaPerMass<T>;
670 fn div(self, rhs: &Pressure<T>) -> Self::Output {
671 AreaPerMass{m2_per_kg: self.mps2.clone() / rhs.Pa.clone()}
672 }
673}
674
675impl<T> core::ops::Mul<TimePerDistance<T>> for Acceleration<T> where T: NumLike {
678 type Output = Frequency<T>;
679 fn mul(self, rhs: TimePerDistance<T>) -> Self::Output {
680 Frequency{Hz: self.mps2 * rhs.spm}
681 }
682}
683impl<T> core::ops::Mul<TimePerDistance<T>> for &Acceleration<T> where T: NumLike {
685 type Output = Frequency<T>;
686 fn mul(self, rhs: TimePerDistance<T>) -> Self::Output {
687 Frequency{Hz: self.mps2.clone() * rhs.spm}
688 }
689}
690impl<T> core::ops::Mul<&TimePerDistance<T>> for Acceleration<T> where T: NumLike {
692 type Output = Frequency<T>;
693 fn mul(self, rhs: &TimePerDistance<T>) -> Self::Output {
694 Frequency{Hz: self.mps2 * rhs.spm.clone()}
695 }
696}
697impl<T> core::ops::Mul<&TimePerDistance<T>> for &Acceleration<T> where T: NumLike {
699 type Output = Frequency<T>;
700 fn mul(self, rhs: &TimePerDistance<T>) -> Self::Output {
701 Frequency{Hz: self.mps2.clone() * rhs.spm.clone()}
702 }
703}
704
705impl<T> core::ops::Div<Velocity<T>> for Acceleration<T> where T: NumLike {
708 type Output = Frequency<T>;
709 fn div(self, rhs: Velocity<T>) -> Self::Output {
710 Frequency{Hz: self.mps2 / rhs.mps}
711 }
712}
713impl<T> core::ops::Div<Velocity<T>> for &Acceleration<T> where T: NumLike {
715 type Output = Frequency<T>;
716 fn div(self, rhs: Velocity<T>) -> Self::Output {
717 Frequency{Hz: self.mps2.clone() / rhs.mps}
718 }
719}
720impl<T> core::ops::Div<&Velocity<T>> for Acceleration<T> where T: NumLike {
722 type Output = Frequency<T>;
723 fn div(self, rhs: &Velocity<T>) -> Self::Output {
724 Frequency{Hz: self.mps2 / rhs.mps.clone()}
725 }
726}
727impl<T> core::ops::Div<&Velocity<T>> for &Acceleration<T> where T: NumLike {
729 type Output = Frequency<T>;
730 fn div(self, rhs: &Velocity<T>) -> Self::Output {
731 Frequency{Hz: self.mps2.clone() / rhs.mps.clone()}
732 }
733}
734
735impl<T> core::ops::Mul<InverseAbsorbedDose<T>> for Acceleration<T> where T: NumLike {
738 type Output = InverseDistance<T>;
739 fn mul(self, rhs: InverseAbsorbedDose<T>) -> Self::Output {
740 InverseDistance{per_m: self.mps2 * rhs.per_Gy}
741 }
742}
743impl<T> core::ops::Mul<InverseAbsorbedDose<T>> for &Acceleration<T> where T: NumLike {
745 type Output = InverseDistance<T>;
746 fn mul(self, rhs: InverseAbsorbedDose<T>) -> Self::Output {
747 InverseDistance{per_m: self.mps2.clone() * rhs.per_Gy}
748 }
749}
750impl<T> core::ops::Mul<&InverseAbsorbedDose<T>> for Acceleration<T> where T: NumLike {
752 type Output = InverseDistance<T>;
753 fn mul(self, rhs: &InverseAbsorbedDose<T>) -> Self::Output {
754 InverseDistance{per_m: self.mps2 * rhs.per_Gy.clone()}
755 }
756}
757impl<T> core::ops::Mul<&InverseAbsorbedDose<T>> for &Acceleration<T> where T: NumLike {
759 type Output = InverseDistance<T>;
760 fn mul(self, rhs: &InverseAbsorbedDose<T>) -> Self::Output {
761 InverseDistance{per_m: self.mps2.clone() * rhs.per_Gy.clone()}
762 }
763}
764
765impl<T> core::ops::Mul<InverseDoseEquivalent<T>> for Acceleration<T> where T: NumLike {
768 type Output = InverseDistance<T>;
769 fn mul(self, rhs: InverseDoseEquivalent<T>) -> Self::Output {
770 InverseDistance{per_m: self.mps2 * rhs.per_Sv}
771 }
772}
773impl<T> core::ops::Mul<InverseDoseEquivalent<T>> for &Acceleration<T> where T: NumLike {
775 type Output = InverseDistance<T>;
776 fn mul(self, rhs: InverseDoseEquivalent<T>) -> Self::Output {
777 InverseDistance{per_m: self.mps2.clone() * rhs.per_Sv}
778 }
779}
780impl<T> core::ops::Mul<&InverseDoseEquivalent<T>> for Acceleration<T> where T: NumLike {
782 type Output = InverseDistance<T>;
783 fn mul(self, rhs: &InverseDoseEquivalent<T>) -> Self::Output {
784 InverseDistance{per_m: self.mps2 * rhs.per_Sv.clone()}
785 }
786}
787impl<T> core::ops::Mul<&InverseDoseEquivalent<T>> for &Acceleration<T> where T: NumLike {
789 type Output = InverseDistance<T>;
790 fn mul(self, rhs: &InverseDoseEquivalent<T>) -> Self::Output {
791 InverseDistance{per_m: self.mps2.clone() * rhs.per_Sv.clone()}
792 }
793}
794
795impl<T> core::ops::Div<Acceleration<T>> for f64 where T: NumLike+From<f64> {
798 type Output = InverseAcceleration<T>;
799 fn div(self, rhs: Acceleration<T>) -> Self::Output {
800 InverseAcceleration{s2pm: T::from(self) / rhs.mps2}
801 }
802}
803impl<T> core::ops::Div<Acceleration<T>> for &f64 where T: NumLike+From<f64> {
805 type Output = InverseAcceleration<T>;
806 fn div(self, rhs: Acceleration<T>) -> Self::Output {
807 InverseAcceleration{s2pm: T::from(self.clone()) / rhs.mps2}
808 }
809}
810impl<T> core::ops::Div<&Acceleration<T>> for f64 where T: NumLike+From<f64> {
812 type Output = InverseAcceleration<T>;
813 fn div(self, rhs: &Acceleration<T>) -> Self::Output {
814 InverseAcceleration{s2pm: T::from(self) / rhs.mps2.clone()}
815 }
816}
817impl<T> core::ops::Div<&Acceleration<T>> for &f64 where T: NumLike+From<f64> {
819 type Output = InverseAcceleration<T>;
820 fn div(self, rhs: &Acceleration<T>) -> Self::Output {
821 InverseAcceleration{s2pm: T::from(self.clone()) / rhs.mps2.clone()}
822 }
823}
824
825impl<T> core::ops::Div<Acceleration<T>> for f32 where T: NumLike+From<f32> {
828 type Output = InverseAcceleration<T>;
829 fn div(self, rhs: Acceleration<T>) -> Self::Output {
830 InverseAcceleration{s2pm: T::from(self) / rhs.mps2}
831 }
832}
833impl<T> core::ops::Div<Acceleration<T>> for &f32 where T: NumLike+From<f32> {
835 type Output = InverseAcceleration<T>;
836 fn div(self, rhs: Acceleration<T>) -> Self::Output {
837 InverseAcceleration{s2pm: T::from(self.clone()) / rhs.mps2}
838 }
839}
840impl<T> core::ops::Div<&Acceleration<T>> for f32 where T: NumLike+From<f32> {
842 type Output = InverseAcceleration<T>;
843 fn div(self, rhs: &Acceleration<T>) -> Self::Output {
844 InverseAcceleration{s2pm: T::from(self) / rhs.mps2.clone()}
845 }
846}
847impl<T> core::ops::Div<&Acceleration<T>> for &f32 where T: NumLike+From<f32> {
849 type Output = InverseAcceleration<T>;
850 fn div(self, rhs: &Acceleration<T>) -> Self::Output {
851 InverseAcceleration{s2pm: T::from(self.clone()) / rhs.mps2.clone()}
852 }
853}
854
855impl<T> core::ops::Div<Acceleration<T>> for i64 where T: NumLike+From<i64> {
858 type Output = InverseAcceleration<T>;
859 fn div(self, rhs: Acceleration<T>) -> Self::Output {
860 InverseAcceleration{s2pm: T::from(self) / rhs.mps2}
861 }
862}
863impl<T> core::ops::Div<Acceleration<T>> for &i64 where T: NumLike+From<i64> {
865 type Output = InverseAcceleration<T>;
866 fn div(self, rhs: Acceleration<T>) -> Self::Output {
867 InverseAcceleration{s2pm: T::from(self.clone()) / rhs.mps2}
868 }
869}
870impl<T> core::ops::Div<&Acceleration<T>> for i64 where T: NumLike+From<i64> {
872 type Output = InverseAcceleration<T>;
873 fn div(self, rhs: &Acceleration<T>) -> Self::Output {
874 InverseAcceleration{s2pm: T::from(self) / rhs.mps2.clone()}
875 }
876}
877impl<T> core::ops::Div<&Acceleration<T>> for &i64 where T: NumLike+From<i64> {
879 type Output = InverseAcceleration<T>;
880 fn div(self, rhs: &Acceleration<T>) -> Self::Output {
881 InverseAcceleration{s2pm: T::from(self.clone()) / rhs.mps2.clone()}
882 }
883}
884
885impl<T> core::ops::Div<Acceleration<T>> for i32 where T: NumLike+From<i32> {
888 type Output = InverseAcceleration<T>;
889 fn div(self, rhs: Acceleration<T>) -> Self::Output {
890 InverseAcceleration{s2pm: T::from(self) / rhs.mps2}
891 }
892}
893impl<T> core::ops::Div<Acceleration<T>> for &i32 where T: NumLike+From<i32> {
895 type Output = InverseAcceleration<T>;
896 fn div(self, rhs: Acceleration<T>) -> Self::Output {
897 InverseAcceleration{s2pm: T::from(self.clone()) / rhs.mps2}
898 }
899}
900impl<T> core::ops::Div<&Acceleration<T>> for i32 where T: NumLike+From<i32> {
902 type Output = InverseAcceleration<T>;
903 fn div(self, rhs: &Acceleration<T>) -> Self::Output {
904 InverseAcceleration{s2pm: T::from(self) / rhs.mps2.clone()}
905 }
906}
907impl<T> core::ops::Div<&Acceleration<T>> for &i32 where T: NumLike+From<i32> {
909 type Output = InverseAcceleration<T>;
910 fn div(self, rhs: &Acceleration<T>) -> Self::Output {
911 InverseAcceleration{s2pm: T::from(self.clone()) / rhs.mps2.clone()}
912 }
913}
914
915#[cfg(feature="num-bigfloat")]
918impl<T> core::ops::Div<Acceleration<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
919 type Output = InverseAcceleration<T>;
920 fn div(self, rhs: Acceleration<T>) -> Self::Output {
921 InverseAcceleration{s2pm: T::from(self) / rhs.mps2}
922 }
923}
924#[cfg(feature="num-bigfloat")]
926impl<T> core::ops::Div<Acceleration<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
927 type Output = InverseAcceleration<T>;
928 fn div(self, rhs: Acceleration<T>) -> Self::Output {
929 InverseAcceleration{s2pm: T::from(self.clone()) / rhs.mps2}
930 }
931}
932#[cfg(feature="num-bigfloat")]
934impl<T> core::ops::Div<&Acceleration<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
935 type Output = InverseAcceleration<T>;
936 fn div(self, rhs: &Acceleration<T>) -> Self::Output {
937 InverseAcceleration{s2pm: T::from(self) / rhs.mps2.clone()}
938 }
939}
940#[cfg(feature="num-bigfloat")]
942impl<T> core::ops::Div<&Acceleration<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
943 type Output = InverseAcceleration<T>;
944 fn div(self, rhs: &Acceleration<T>) -> Self::Output {
945 InverseAcceleration{s2pm: T::from(self.clone()) / rhs.mps2.clone()}
946 }
947}
948
949#[cfg(feature="num-complex")]
952impl<T> core::ops::Div<Acceleration<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
953 type Output = InverseAcceleration<T>;
954 fn div(self, rhs: Acceleration<T>) -> Self::Output {
955 InverseAcceleration{s2pm: T::from(self) / rhs.mps2}
956 }
957}
958#[cfg(feature="num-complex")]
960impl<T> core::ops::Div<Acceleration<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
961 type Output = InverseAcceleration<T>;
962 fn div(self, rhs: Acceleration<T>) -> Self::Output {
963 InverseAcceleration{s2pm: T::from(self.clone()) / rhs.mps2}
964 }
965}
966#[cfg(feature="num-complex")]
968impl<T> core::ops::Div<&Acceleration<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
969 type Output = InverseAcceleration<T>;
970 fn div(self, rhs: &Acceleration<T>) -> Self::Output {
971 InverseAcceleration{s2pm: T::from(self) / rhs.mps2.clone()}
972 }
973}
974#[cfg(feature="num-complex")]
976impl<T> core::ops::Div<&Acceleration<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
977 type Output = InverseAcceleration<T>;
978 fn div(self, rhs: &Acceleration<T>) -> Self::Output {
979 InverseAcceleration{s2pm: T::from(self.clone()) / rhs.mps2.clone()}
980 }
981}
982
983#[cfg(feature="num-complex")]
986impl<T> core::ops::Div<Acceleration<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
987 type Output = InverseAcceleration<T>;
988 fn div(self, rhs: Acceleration<T>) -> Self::Output {
989 InverseAcceleration{s2pm: T::from(self) / rhs.mps2}
990 }
991}
992#[cfg(feature="num-complex")]
994impl<T> core::ops::Div<Acceleration<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
995 type Output = InverseAcceleration<T>;
996 fn div(self, rhs: Acceleration<T>) -> Self::Output {
997 InverseAcceleration{s2pm: T::from(self.clone()) / rhs.mps2}
998 }
999}
1000#[cfg(feature="num-complex")]
1002impl<T> core::ops::Div<&Acceleration<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
1003 type Output = InverseAcceleration<T>;
1004 fn div(self, rhs: &Acceleration<T>) -> Self::Output {
1005 InverseAcceleration{s2pm: T::from(self) / rhs.mps2.clone()}
1006 }
1007}
1008#[cfg(feature="num-complex")]
1010impl<T> core::ops::Div<&Acceleration<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
1011 type Output = InverseAcceleration<T>;
1012 fn div(self, rhs: &Acceleration<T>) -> Self::Output {
1013 InverseAcceleration{s2pm: T::from(self.clone()) / rhs.mps2.clone()}
1014 }
1015}
1016
1017#[derive(UnitStruct, Debug, Clone)]
1019#[cfg_attr(feature="serde", derive(Serialize, Deserialize))]
1020pub struct AngularAcceleration<T: NumLike>{
1021 pub radps2: T
1023}
1024
1025impl<T> AngularAcceleration<T> where T: NumLike {
1026
1027 pub fn unit_name() -> &'static str { "radians per second squared" }
1029
1030 pub fn unit_symbol() -> &'static str { "rad/s²" }
1032
1033 pub fn from_radps2(radps2: T) -> Self { AngularAcceleration{radps2: radps2} }
1038
1039 pub fn to_radps2(&self) -> T { self.radps2.clone() }
1041
1042 pub fn from_radians_per_second_squared(radians_per_second_squared: T) -> Self { AngularAcceleration{radps2: radians_per_second_squared} }
1047
1048 pub fn to_radians_per_second_squared(&self) -> T { self.radps2.clone() }
1050
1051}
1052
1053impl<T> fmt::Display for AngularAcceleration<T> where T: NumLike {
1054 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
1055 write!(f, "{} {}", &self.radps2, Self::unit_symbol())
1056 }
1057}
1058
1059impl<T> AngularAcceleration<T> where T: NumLike+From<f64> {
1060
1061 pub fn to_degrees_per_second_squared(&self) -> T {
1065 return self.radps2.clone() * T::from(57.2957795130823_f64);
1066 }
1067
1068 pub fn from_degrees_per_second_squared(degrees_per_second_squared: T) -> Self {
1075 AngularAcceleration{radps2: degrees_per_second_squared * T::from(0.0174532925199433_f64)}
1076 }
1077
1078 pub fn to_rps2(&self) -> T {
1082 return self.radps2.clone() * T::from(0.159154943091895_f64);
1083 }
1084
1085 pub fn from_rps2(rps2: T) -> Self {
1092 AngularAcceleration{radps2: rps2 * T::from(6.28318530717959_f64)}
1093 }
1094
1095 pub fn to_rpm2(&self) -> T {
1099 return self.radps2.clone() * T::from(572.957795130823_f64);
1100 }
1101
1102 pub fn from_rpm2(rpm2: T) -> Self {
1109 AngularAcceleration{radps2: rpm2 * T::from(0.0017453292519943_f64)}
1110 }
1111
1112 pub fn to_degps2(&self) -> T {
1116 return self.radps2.clone() * T::from(57.2957795130823_f64);
1117 }
1118
1119 pub fn from_degps2(degps2: T) -> Self {
1126 AngularAcceleration{radps2: degps2 * T::from(0.0174532925199433_f64)}
1127 }
1128
1129 pub fn to_rph2(&self) -> T {
1133 return self.radps2.clone() * T::from(2062648.06247096_f64);
1134 }
1135
1136 pub fn from_rph2(rph2: T) -> Self {
1143 AngularAcceleration{radps2: rph2 * T::from(4.84813681109536e-07_f64)}
1144 }
1145
1146}
1147
1148
1149#[cfg(feature="num-bigfloat")]
1151impl core::ops::Mul<AngularAcceleration<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
1152 type Output = AngularAcceleration<num_bigfloat::BigFloat>;
1153 fn mul(self, rhs: AngularAcceleration<num_bigfloat::BigFloat>) -> Self::Output {
1154 AngularAcceleration{radps2: self * rhs.radps2}
1155 }
1156}
1157#[cfg(feature="num-bigfloat")]
1159impl core::ops::Mul<AngularAcceleration<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
1160 type Output = AngularAcceleration<num_bigfloat::BigFloat>;
1161 fn mul(self, rhs: AngularAcceleration<num_bigfloat::BigFloat>) -> Self::Output {
1162 AngularAcceleration{radps2: self.clone() * rhs.radps2}
1163 }
1164}
1165#[cfg(feature="num-bigfloat")]
1167impl core::ops::Mul<&AngularAcceleration<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
1168 type Output = AngularAcceleration<num_bigfloat::BigFloat>;
1169 fn mul(self, rhs: &AngularAcceleration<num_bigfloat::BigFloat>) -> Self::Output {
1170 AngularAcceleration{radps2: self * rhs.radps2.clone()}
1171 }
1172}
1173#[cfg(feature="num-bigfloat")]
1175impl core::ops::Mul<&AngularAcceleration<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
1176 type Output = AngularAcceleration<num_bigfloat::BigFloat>;
1177 fn mul(self, rhs: &AngularAcceleration<num_bigfloat::BigFloat>) -> Self::Output {
1178 AngularAcceleration{radps2: self.clone() * rhs.radps2.clone()}
1179 }
1180}
1181
1182#[cfg(feature="num-complex")]
1184impl core::ops::Mul<AngularAcceleration<num_complex::Complex32>> for num_complex::Complex32 {
1185 type Output = AngularAcceleration<num_complex::Complex32>;
1186 fn mul(self, rhs: AngularAcceleration<num_complex::Complex32>) -> Self::Output {
1187 AngularAcceleration{radps2: self * rhs.radps2}
1188 }
1189}
1190#[cfg(feature="num-complex")]
1192impl core::ops::Mul<AngularAcceleration<num_complex::Complex32>> for &num_complex::Complex32 {
1193 type Output = AngularAcceleration<num_complex::Complex32>;
1194 fn mul(self, rhs: AngularAcceleration<num_complex::Complex32>) -> Self::Output {
1195 AngularAcceleration{radps2: self.clone() * rhs.radps2}
1196 }
1197}
1198#[cfg(feature="num-complex")]
1200impl core::ops::Mul<&AngularAcceleration<num_complex::Complex32>> for num_complex::Complex32 {
1201 type Output = AngularAcceleration<num_complex::Complex32>;
1202 fn mul(self, rhs: &AngularAcceleration<num_complex::Complex32>) -> Self::Output {
1203 AngularAcceleration{radps2: self * rhs.radps2.clone()}
1204 }
1205}
1206#[cfg(feature="num-complex")]
1208impl core::ops::Mul<&AngularAcceleration<num_complex::Complex32>> for &num_complex::Complex32 {
1209 type Output = AngularAcceleration<num_complex::Complex32>;
1210 fn mul(self, rhs: &AngularAcceleration<num_complex::Complex32>) -> Self::Output {
1211 AngularAcceleration{radps2: self.clone() * rhs.radps2.clone()}
1212 }
1213}
1214
1215#[cfg(feature="num-complex")]
1217impl core::ops::Mul<AngularAcceleration<num_complex::Complex64>> for num_complex::Complex64 {
1218 type Output = AngularAcceleration<num_complex::Complex64>;
1219 fn mul(self, rhs: AngularAcceleration<num_complex::Complex64>) -> Self::Output {
1220 AngularAcceleration{radps2: self * rhs.radps2}
1221 }
1222}
1223#[cfg(feature="num-complex")]
1225impl core::ops::Mul<AngularAcceleration<num_complex::Complex64>> for &num_complex::Complex64 {
1226 type Output = AngularAcceleration<num_complex::Complex64>;
1227 fn mul(self, rhs: AngularAcceleration<num_complex::Complex64>) -> Self::Output {
1228 AngularAcceleration{radps2: self.clone() * rhs.radps2}
1229 }
1230}
1231#[cfg(feature="num-complex")]
1233impl core::ops::Mul<&AngularAcceleration<num_complex::Complex64>> for num_complex::Complex64 {
1234 type Output = AngularAcceleration<num_complex::Complex64>;
1235 fn mul(self, rhs: &AngularAcceleration<num_complex::Complex64>) -> Self::Output {
1236 AngularAcceleration{radps2: self * rhs.radps2.clone()}
1237 }
1238}
1239#[cfg(feature="num-complex")]
1241impl core::ops::Mul<&AngularAcceleration<num_complex::Complex64>> for &num_complex::Complex64 {
1242 type Output = AngularAcceleration<num_complex::Complex64>;
1243 fn mul(self, rhs: &AngularAcceleration<num_complex::Complex64>) -> Self::Output {
1244 AngularAcceleration{radps2: self.clone() * rhs.radps2.clone()}
1245 }
1246}
1247
1248
1249
1250#[cfg(feature = "uom")]
1252impl<T> Into<uom::si::f32::AngularAcceleration> for AngularAcceleration<T> where T: NumLike+Into<f32> {
1253 fn into(self) -> uom::si::f32::AngularAcceleration {
1254 uom::si::f32::AngularAcceleration::new::<uom::si::angular_acceleration::radian_per_second_squared>(self.radps2.into())
1255 }
1256}
1257
1258#[cfg(feature = "uom")]
1260impl<T> From<uom::si::f32::AngularAcceleration> for AngularAcceleration<T> where T: NumLike+From<f32> {
1261 fn from(src: uom::si::f32::AngularAcceleration) -> Self {
1262 AngularAcceleration{radps2: T::from(src.value)}
1263 }
1264}
1265
1266#[cfg(feature = "uom")]
1268impl<T> Into<uom::si::f64::AngularAcceleration> for AngularAcceleration<T> where T: NumLike+Into<f64> {
1269 fn into(self) -> uom::si::f64::AngularAcceleration {
1270 uom::si::f64::AngularAcceleration::new::<uom::si::angular_acceleration::radian_per_second_squared>(self.radps2.into())
1271 }
1272}
1273
1274#[cfg(feature = "uom")]
1276impl<T> From<uom::si::f64::AngularAcceleration> for AngularAcceleration<T> where T: NumLike+From<f64> {
1277 fn from(src: uom::si::f64::AngularAcceleration) -> Self {
1278 AngularAcceleration{radps2: T::from(src.value)}
1279 }
1280}
1281
1282
1283impl<T> core::ops::Mul<Time<T>> for AngularAcceleration<T> where T: NumLike {
1286 type Output = AngularVelocity<T>;
1287 fn mul(self, rhs: Time<T>) -> Self::Output {
1288 AngularVelocity{radps: self.radps2 * rhs.s}
1289 }
1290}
1291impl<T> core::ops::Mul<Time<T>> for &AngularAcceleration<T> where T: NumLike {
1293 type Output = AngularVelocity<T>;
1294 fn mul(self, rhs: Time<T>) -> Self::Output {
1295 AngularVelocity{radps: self.radps2.clone() * rhs.s}
1296 }
1297}
1298impl<T> core::ops::Mul<&Time<T>> for AngularAcceleration<T> where T: NumLike {
1300 type Output = AngularVelocity<T>;
1301 fn mul(self, rhs: &Time<T>) -> Self::Output {
1302 AngularVelocity{radps: self.radps2 * rhs.s.clone()}
1303 }
1304}
1305impl<T> core::ops::Mul<&Time<T>> for &AngularAcceleration<T> where T: NumLike {
1307 type Output = AngularVelocity<T>;
1308 fn mul(self, rhs: &Time<T>) -> Self::Output {
1309 AngularVelocity{radps: self.radps2.clone() * rhs.s.clone()}
1310 }
1311}
1312
1313impl<T> core::ops::Div<AngularVelocity<T>> for AngularAcceleration<T> where T: NumLike {
1316 type Output = Frequency<T>;
1317 fn div(self, rhs: AngularVelocity<T>) -> Self::Output {
1318 Frequency{Hz: self.radps2 / rhs.radps}
1319 }
1320}
1321impl<T> core::ops::Div<AngularVelocity<T>> for &AngularAcceleration<T> where T: NumLike {
1323 type Output = Frequency<T>;
1324 fn div(self, rhs: AngularVelocity<T>) -> Self::Output {
1325 Frequency{Hz: self.radps2.clone() / rhs.radps}
1326 }
1327}
1328impl<T> core::ops::Div<&AngularVelocity<T>> for AngularAcceleration<T> where T: NumLike {
1330 type Output = Frequency<T>;
1331 fn div(self, rhs: &AngularVelocity<T>) -> Self::Output {
1332 Frequency{Hz: self.radps2 / rhs.radps.clone()}
1333 }
1334}
1335impl<T> core::ops::Div<&AngularVelocity<T>> for &AngularAcceleration<T> where T: NumLike {
1337 type Output = Frequency<T>;
1338 fn div(self, rhs: &AngularVelocity<T>) -> Self::Output {
1339 Frequency{Hz: self.radps2.clone() / rhs.radps.clone()}
1340 }
1341}
1342
1343impl<T> core::ops::Div<Frequency<T>> for AngularAcceleration<T> where T: NumLike {
1346 type Output = AngularVelocity<T>;
1347 fn div(self, rhs: Frequency<T>) -> Self::Output {
1348 AngularVelocity{radps: self.radps2 / rhs.Hz}
1349 }
1350}
1351impl<T> core::ops::Div<Frequency<T>> for &AngularAcceleration<T> where T: NumLike {
1353 type Output = AngularVelocity<T>;
1354 fn div(self, rhs: Frequency<T>) -> Self::Output {
1355 AngularVelocity{radps: self.radps2.clone() / rhs.Hz}
1356 }
1357}
1358impl<T> core::ops::Div<&Frequency<T>> for AngularAcceleration<T> where T: NumLike {
1360 type Output = AngularVelocity<T>;
1361 fn div(self, rhs: &Frequency<T>) -> Self::Output {
1362 AngularVelocity{radps: self.radps2 / rhs.Hz.clone()}
1363 }
1364}
1365impl<T> core::ops::Div<&Frequency<T>> for &AngularAcceleration<T> where T: NumLike {
1367 type Output = AngularVelocity<T>;
1368 fn div(self, rhs: &Frequency<T>) -> Self::Output {
1369 AngularVelocity{radps: self.radps2.clone() / rhs.Hz.clone()}
1370 }
1371}
1372
1373impl<T> core::ops::Mul<InverseAngularVelocity<T>> for AngularAcceleration<T> where T: NumLike {
1376 type Output = Frequency<T>;
1377 fn mul(self, rhs: InverseAngularVelocity<T>) -> Self::Output {
1378 Frequency{Hz: self.radps2 * rhs.s_per_rad}
1379 }
1380}
1381impl<T> core::ops::Mul<InverseAngularVelocity<T>> for &AngularAcceleration<T> where T: NumLike {
1383 type Output = Frequency<T>;
1384 fn mul(self, rhs: InverseAngularVelocity<T>) -> Self::Output {
1385 Frequency{Hz: self.radps2.clone() * rhs.s_per_rad}
1386 }
1387}
1388impl<T> core::ops::Mul<&InverseAngularVelocity<T>> for AngularAcceleration<T> where T: NumLike {
1390 type Output = Frequency<T>;
1391 fn mul(self, rhs: &InverseAngularVelocity<T>) -> Self::Output {
1392 Frequency{Hz: self.radps2 * rhs.s_per_rad.clone()}
1393 }
1394}
1395impl<T> core::ops::Mul<&InverseAngularVelocity<T>> for &AngularAcceleration<T> where T: NumLike {
1397 type Output = Frequency<T>;
1398 fn mul(self, rhs: &InverseAngularVelocity<T>) -> Self::Output {
1399 Frequency{Hz: self.radps2.clone() * rhs.s_per_rad.clone()}
1400 }
1401}
1402
1403impl<T> core::ops::Div<AngularAcceleration<T>> for f64 where T: NumLike+From<f64> {
1406 type Output = InverseAngularAcceleration<T>;
1407 fn div(self, rhs: AngularAcceleration<T>) -> Self::Output {
1408 InverseAngularAcceleration{s2prad: T::from(self) / rhs.radps2}
1409 }
1410}
1411impl<T> core::ops::Div<AngularAcceleration<T>> for &f64 where T: NumLike+From<f64> {
1413 type Output = InverseAngularAcceleration<T>;
1414 fn div(self, rhs: AngularAcceleration<T>) -> Self::Output {
1415 InverseAngularAcceleration{s2prad: T::from(self.clone()) / rhs.radps2}
1416 }
1417}
1418impl<T> core::ops::Div<&AngularAcceleration<T>> for f64 where T: NumLike+From<f64> {
1420 type Output = InverseAngularAcceleration<T>;
1421 fn div(self, rhs: &AngularAcceleration<T>) -> Self::Output {
1422 InverseAngularAcceleration{s2prad: T::from(self) / rhs.radps2.clone()}
1423 }
1424}
1425impl<T> core::ops::Div<&AngularAcceleration<T>> for &f64 where T: NumLike+From<f64> {
1427 type Output = InverseAngularAcceleration<T>;
1428 fn div(self, rhs: &AngularAcceleration<T>) -> Self::Output {
1429 InverseAngularAcceleration{s2prad: T::from(self.clone()) / rhs.radps2.clone()}
1430 }
1431}
1432
1433impl<T> core::ops::Div<AngularAcceleration<T>> for f32 where T: NumLike+From<f32> {
1436 type Output = InverseAngularAcceleration<T>;
1437 fn div(self, rhs: AngularAcceleration<T>) -> Self::Output {
1438 InverseAngularAcceleration{s2prad: T::from(self) / rhs.radps2}
1439 }
1440}
1441impl<T> core::ops::Div<AngularAcceleration<T>> for &f32 where T: NumLike+From<f32> {
1443 type Output = InverseAngularAcceleration<T>;
1444 fn div(self, rhs: AngularAcceleration<T>) -> Self::Output {
1445 InverseAngularAcceleration{s2prad: T::from(self.clone()) / rhs.radps2}
1446 }
1447}
1448impl<T> core::ops::Div<&AngularAcceleration<T>> for f32 where T: NumLike+From<f32> {
1450 type Output = InverseAngularAcceleration<T>;
1451 fn div(self, rhs: &AngularAcceleration<T>) -> Self::Output {
1452 InverseAngularAcceleration{s2prad: T::from(self) / rhs.radps2.clone()}
1453 }
1454}
1455impl<T> core::ops::Div<&AngularAcceleration<T>> for &f32 where T: NumLike+From<f32> {
1457 type Output = InverseAngularAcceleration<T>;
1458 fn div(self, rhs: &AngularAcceleration<T>) -> Self::Output {
1459 InverseAngularAcceleration{s2prad: T::from(self.clone()) / rhs.radps2.clone()}
1460 }
1461}
1462
1463impl<T> core::ops::Div<AngularAcceleration<T>> for i64 where T: NumLike+From<i64> {
1466 type Output = InverseAngularAcceleration<T>;
1467 fn div(self, rhs: AngularAcceleration<T>) -> Self::Output {
1468 InverseAngularAcceleration{s2prad: T::from(self) / rhs.radps2}
1469 }
1470}
1471impl<T> core::ops::Div<AngularAcceleration<T>> for &i64 where T: NumLike+From<i64> {
1473 type Output = InverseAngularAcceleration<T>;
1474 fn div(self, rhs: AngularAcceleration<T>) -> Self::Output {
1475 InverseAngularAcceleration{s2prad: T::from(self.clone()) / rhs.radps2}
1476 }
1477}
1478impl<T> core::ops::Div<&AngularAcceleration<T>> for i64 where T: NumLike+From<i64> {
1480 type Output = InverseAngularAcceleration<T>;
1481 fn div(self, rhs: &AngularAcceleration<T>) -> Self::Output {
1482 InverseAngularAcceleration{s2prad: T::from(self) / rhs.radps2.clone()}
1483 }
1484}
1485impl<T> core::ops::Div<&AngularAcceleration<T>> for &i64 where T: NumLike+From<i64> {
1487 type Output = InverseAngularAcceleration<T>;
1488 fn div(self, rhs: &AngularAcceleration<T>) -> Self::Output {
1489 InverseAngularAcceleration{s2prad: T::from(self.clone()) / rhs.radps2.clone()}
1490 }
1491}
1492
1493impl<T> core::ops::Div<AngularAcceleration<T>> for i32 where T: NumLike+From<i32> {
1496 type Output = InverseAngularAcceleration<T>;
1497 fn div(self, rhs: AngularAcceleration<T>) -> Self::Output {
1498 InverseAngularAcceleration{s2prad: T::from(self) / rhs.radps2}
1499 }
1500}
1501impl<T> core::ops::Div<AngularAcceleration<T>> for &i32 where T: NumLike+From<i32> {
1503 type Output = InverseAngularAcceleration<T>;
1504 fn div(self, rhs: AngularAcceleration<T>) -> Self::Output {
1505 InverseAngularAcceleration{s2prad: T::from(self.clone()) / rhs.radps2}
1506 }
1507}
1508impl<T> core::ops::Div<&AngularAcceleration<T>> for i32 where T: NumLike+From<i32> {
1510 type Output = InverseAngularAcceleration<T>;
1511 fn div(self, rhs: &AngularAcceleration<T>) -> Self::Output {
1512 InverseAngularAcceleration{s2prad: T::from(self) / rhs.radps2.clone()}
1513 }
1514}
1515impl<T> core::ops::Div<&AngularAcceleration<T>> for &i32 where T: NumLike+From<i32> {
1517 type Output = InverseAngularAcceleration<T>;
1518 fn div(self, rhs: &AngularAcceleration<T>) -> Self::Output {
1519 InverseAngularAcceleration{s2prad: T::from(self.clone()) / rhs.radps2.clone()}
1520 }
1521}
1522
1523#[cfg(feature="num-bigfloat")]
1526impl<T> core::ops::Div<AngularAcceleration<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
1527 type Output = InverseAngularAcceleration<T>;
1528 fn div(self, rhs: AngularAcceleration<T>) -> Self::Output {
1529 InverseAngularAcceleration{s2prad: T::from(self) / rhs.radps2}
1530 }
1531}
1532#[cfg(feature="num-bigfloat")]
1534impl<T> core::ops::Div<AngularAcceleration<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
1535 type Output = InverseAngularAcceleration<T>;
1536 fn div(self, rhs: AngularAcceleration<T>) -> Self::Output {
1537 InverseAngularAcceleration{s2prad: T::from(self.clone()) / rhs.radps2}
1538 }
1539}
1540#[cfg(feature="num-bigfloat")]
1542impl<T> core::ops::Div<&AngularAcceleration<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
1543 type Output = InverseAngularAcceleration<T>;
1544 fn div(self, rhs: &AngularAcceleration<T>) -> Self::Output {
1545 InverseAngularAcceleration{s2prad: T::from(self) / rhs.radps2.clone()}
1546 }
1547}
1548#[cfg(feature="num-bigfloat")]
1550impl<T> core::ops::Div<&AngularAcceleration<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
1551 type Output = InverseAngularAcceleration<T>;
1552 fn div(self, rhs: &AngularAcceleration<T>) -> Self::Output {
1553 InverseAngularAcceleration{s2prad: T::from(self.clone()) / rhs.radps2.clone()}
1554 }
1555}
1556
1557#[cfg(feature="num-complex")]
1560impl<T> core::ops::Div<AngularAcceleration<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
1561 type Output = InverseAngularAcceleration<T>;
1562 fn div(self, rhs: AngularAcceleration<T>) -> Self::Output {
1563 InverseAngularAcceleration{s2prad: T::from(self) / rhs.radps2}
1564 }
1565}
1566#[cfg(feature="num-complex")]
1568impl<T> core::ops::Div<AngularAcceleration<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
1569 type Output = InverseAngularAcceleration<T>;
1570 fn div(self, rhs: AngularAcceleration<T>) -> Self::Output {
1571 InverseAngularAcceleration{s2prad: T::from(self.clone()) / rhs.radps2}
1572 }
1573}
1574#[cfg(feature="num-complex")]
1576impl<T> core::ops::Div<&AngularAcceleration<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
1577 type Output = InverseAngularAcceleration<T>;
1578 fn div(self, rhs: &AngularAcceleration<T>) -> Self::Output {
1579 InverseAngularAcceleration{s2prad: T::from(self) / rhs.radps2.clone()}
1580 }
1581}
1582#[cfg(feature="num-complex")]
1584impl<T> core::ops::Div<&AngularAcceleration<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
1585 type Output = InverseAngularAcceleration<T>;
1586 fn div(self, rhs: &AngularAcceleration<T>) -> Self::Output {
1587 InverseAngularAcceleration{s2prad: T::from(self.clone()) / rhs.radps2.clone()}
1588 }
1589}
1590
1591#[cfg(feature="num-complex")]
1594impl<T> core::ops::Div<AngularAcceleration<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
1595 type Output = InverseAngularAcceleration<T>;
1596 fn div(self, rhs: AngularAcceleration<T>) -> Self::Output {
1597 InverseAngularAcceleration{s2prad: T::from(self) / rhs.radps2}
1598 }
1599}
1600#[cfg(feature="num-complex")]
1602impl<T> core::ops::Div<AngularAcceleration<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
1603 type Output = InverseAngularAcceleration<T>;
1604 fn div(self, rhs: AngularAcceleration<T>) -> Self::Output {
1605 InverseAngularAcceleration{s2prad: T::from(self.clone()) / rhs.radps2}
1606 }
1607}
1608#[cfg(feature="num-complex")]
1610impl<T> core::ops::Div<&AngularAcceleration<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
1611 type Output = InverseAngularAcceleration<T>;
1612 fn div(self, rhs: &AngularAcceleration<T>) -> Self::Output {
1613 InverseAngularAcceleration{s2prad: T::from(self) / rhs.radps2.clone()}
1614 }
1615}
1616#[cfg(feature="num-complex")]
1618impl<T> core::ops::Div<&AngularAcceleration<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
1619 type Output = InverseAngularAcceleration<T>;
1620 fn div(self, rhs: &AngularAcceleration<T>) -> Self::Output {
1621 InverseAngularAcceleration{s2prad: T::from(self.clone()) / rhs.radps2.clone()}
1622 }
1623}
1624
1625#[derive(UnitStruct, Debug, Clone)]
1627#[cfg_attr(feature="serde", derive(Serialize, Deserialize))]
1628pub struct AngularMomentum<T: NumLike>{
1629 pub kgm2radps: T
1631}
1632
1633impl<T> AngularMomentum<T> where T: NumLike {
1634
1635 pub fn unit_name() -> &'static str { "kilogram meters squared radians per second" }
1637
1638 pub fn unit_symbol() -> &'static str { "kg·m²·rad/s" }
1640
1641 pub fn from_kgm2radps(kgm2radps: T) -> Self { AngularMomentum{kgm2radps: kgm2radps} }
1646
1647 pub fn to_kgm2radps(&self) -> T { self.kgm2radps.clone() }
1649
1650 pub fn from_kilogram_meters_squared_radians_per_second(kilogram_meters_squared_radians_per_second: T) -> Self { AngularMomentum{kgm2radps: kilogram_meters_squared_radians_per_second} }
1655
1656 pub fn to_kilogram_meters_squared_radians_per_second(&self) -> T { self.kgm2radps.clone() }
1658
1659}
1660
1661impl<T> fmt::Display for AngularMomentum<T> where T: NumLike {
1662 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
1663 write!(f, "{} {}", &self.kgm2radps, Self::unit_symbol())
1664 }
1665}
1666
1667impl<T> AngularMomentum<T> where T: NumLike+From<f64> {
1668
1669 pub fn to_gcm2radps(&self) -> T {
1673 return self.kgm2radps.clone() * T::from(10000000.0_f64);
1674 }
1675
1676 pub fn from_gcm2radps(gcm2radps: T) -> Self {
1683 AngularMomentum{kgm2radps: gcm2radps * T::from(1e-07_f64)}
1684 }
1685
1686}
1687
1688
1689#[cfg(feature="num-bigfloat")]
1691impl core::ops::Mul<AngularMomentum<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
1692 type Output = AngularMomentum<num_bigfloat::BigFloat>;
1693 fn mul(self, rhs: AngularMomentum<num_bigfloat::BigFloat>) -> Self::Output {
1694 AngularMomentum{kgm2radps: self * rhs.kgm2radps}
1695 }
1696}
1697#[cfg(feature="num-bigfloat")]
1699impl core::ops::Mul<AngularMomentum<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
1700 type Output = AngularMomentum<num_bigfloat::BigFloat>;
1701 fn mul(self, rhs: AngularMomentum<num_bigfloat::BigFloat>) -> Self::Output {
1702 AngularMomentum{kgm2radps: self.clone() * rhs.kgm2radps}
1703 }
1704}
1705#[cfg(feature="num-bigfloat")]
1707impl core::ops::Mul<&AngularMomentum<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
1708 type Output = AngularMomentum<num_bigfloat::BigFloat>;
1709 fn mul(self, rhs: &AngularMomentum<num_bigfloat::BigFloat>) -> Self::Output {
1710 AngularMomentum{kgm2radps: self * rhs.kgm2radps.clone()}
1711 }
1712}
1713#[cfg(feature="num-bigfloat")]
1715impl core::ops::Mul<&AngularMomentum<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
1716 type Output = AngularMomentum<num_bigfloat::BigFloat>;
1717 fn mul(self, rhs: &AngularMomentum<num_bigfloat::BigFloat>) -> Self::Output {
1718 AngularMomentum{kgm2radps: self.clone() * rhs.kgm2radps.clone()}
1719 }
1720}
1721
1722#[cfg(feature="num-complex")]
1724impl core::ops::Mul<AngularMomentum<num_complex::Complex32>> for num_complex::Complex32 {
1725 type Output = AngularMomentum<num_complex::Complex32>;
1726 fn mul(self, rhs: AngularMomentum<num_complex::Complex32>) -> Self::Output {
1727 AngularMomentum{kgm2radps: self * rhs.kgm2radps}
1728 }
1729}
1730#[cfg(feature="num-complex")]
1732impl core::ops::Mul<AngularMomentum<num_complex::Complex32>> for &num_complex::Complex32 {
1733 type Output = AngularMomentum<num_complex::Complex32>;
1734 fn mul(self, rhs: AngularMomentum<num_complex::Complex32>) -> Self::Output {
1735 AngularMomentum{kgm2radps: self.clone() * rhs.kgm2radps}
1736 }
1737}
1738#[cfg(feature="num-complex")]
1740impl core::ops::Mul<&AngularMomentum<num_complex::Complex32>> for num_complex::Complex32 {
1741 type Output = AngularMomentum<num_complex::Complex32>;
1742 fn mul(self, rhs: &AngularMomentum<num_complex::Complex32>) -> Self::Output {
1743 AngularMomentum{kgm2radps: self * rhs.kgm2radps.clone()}
1744 }
1745}
1746#[cfg(feature="num-complex")]
1748impl core::ops::Mul<&AngularMomentum<num_complex::Complex32>> for &num_complex::Complex32 {
1749 type Output = AngularMomentum<num_complex::Complex32>;
1750 fn mul(self, rhs: &AngularMomentum<num_complex::Complex32>) -> Self::Output {
1751 AngularMomentum{kgm2radps: self.clone() * rhs.kgm2radps.clone()}
1752 }
1753}
1754
1755#[cfg(feature="num-complex")]
1757impl core::ops::Mul<AngularMomentum<num_complex::Complex64>> for num_complex::Complex64 {
1758 type Output = AngularMomentum<num_complex::Complex64>;
1759 fn mul(self, rhs: AngularMomentum<num_complex::Complex64>) -> Self::Output {
1760 AngularMomentum{kgm2radps: self * rhs.kgm2radps}
1761 }
1762}
1763#[cfg(feature="num-complex")]
1765impl core::ops::Mul<AngularMomentum<num_complex::Complex64>> for &num_complex::Complex64 {
1766 type Output = AngularMomentum<num_complex::Complex64>;
1767 fn mul(self, rhs: AngularMomentum<num_complex::Complex64>) -> Self::Output {
1768 AngularMomentum{kgm2radps: self.clone() * rhs.kgm2radps}
1769 }
1770}
1771#[cfg(feature="num-complex")]
1773impl core::ops::Mul<&AngularMomentum<num_complex::Complex64>> for num_complex::Complex64 {
1774 type Output = AngularMomentum<num_complex::Complex64>;
1775 fn mul(self, rhs: &AngularMomentum<num_complex::Complex64>) -> Self::Output {
1776 AngularMomentum{kgm2radps: self * rhs.kgm2radps.clone()}
1777 }
1778}
1779#[cfg(feature="num-complex")]
1781impl core::ops::Mul<&AngularMomentum<num_complex::Complex64>> for &num_complex::Complex64 {
1782 type Output = AngularMomentum<num_complex::Complex64>;
1783 fn mul(self, rhs: &AngularMomentum<num_complex::Complex64>) -> Self::Output {
1784 AngularMomentum{kgm2radps: self.clone() * rhs.kgm2radps.clone()}
1785 }
1786}
1787
1788
1789
1790
1791impl<T> core::ops::Mul<InverseMomentOfInertia<T>> for AngularMomentum<T> where T: NumLike {
1794 type Output = AngularVelocity<T>;
1795 fn mul(self, rhs: InverseMomentOfInertia<T>) -> Self::Output {
1796 AngularVelocity{radps: self.kgm2radps * rhs.per_kgm2}
1797 }
1798}
1799impl<T> core::ops::Mul<InverseMomentOfInertia<T>> for &AngularMomentum<T> where T: NumLike {
1801 type Output = AngularVelocity<T>;
1802 fn mul(self, rhs: InverseMomentOfInertia<T>) -> Self::Output {
1803 AngularVelocity{radps: self.kgm2radps.clone() * rhs.per_kgm2}
1804 }
1805}
1806impl<T> core::ops::Mul<&InverseMomentOfInertia<T>> for AngularMomentum<T> where T: NumLike {
1808 type Output = AngularVelocity<T>;
1809 fn mul(self, rhs: &InverseMomentOfInertia<T>) -> Self::Output {
1810 AngularVelocity{radps: self.kgm2radps * rhs.per_kgm2.clone()}
1811 }
1812}
1813impl<T> core::ops::Mul<&InverseMomentOfInertia<T>> for &AngularMomentum<T> where T: NumLike {
1815 type Output = AngularVelocity<T>;
1816 fn mul(self, rhs: &InverseMomentOfInertia<T>) -> Self::Output {
1817 AngularVelocity{radps: self.kgm2radps.clone() * rhs.per_kgm2.clone()}
1818 }
1819}
1820
1821impl<T> core::ops::Div<MomentOfInertia<T>> for AngularMomentum<T> where T: NumLike {
1824 type Output = AngularVelocity<T>;
1825 fn div(self, rhs: MomentOfInertia<T>) -> Self::Output {
1826 AngularVelocity{radps: self.kgm2radps / rhs.kgm2}
1827 }
1828}
1829impl<T> core::ops::Div<MomentOfInertia<T>> for &AngularMomentum<T> where T: NumLike {
1831 type Output = AngularVelocity<T>;
1832 fn div(self, rhs: MomentOfInertia<T>) -> Self::Output {
1833 AngularVelocity{radps: self.kgm2radps.clone() / rhs.kgm2}
1834 }
1835}
1836impl<T> core::ops::Div<&MomentOfInertia<T>> for AngularMomentum<T> where T: NumLike {
1838 type Output = AngularVelocity<T>;
1839 fn div(self, rhs: &MomentOfInertia<T>) -> Self::Output {
1840 AngularVelocity{radps: self.kgm2radps / rhs.kgm2.clone()}
1841 }
1842}
1843impl<T> core::ops::Div<&MomentOfInertia<T>> for &AngularMomentum<T> where T: NumLike {
1845 type Output = AngularVelocity<T>;
1846 fn div(self, rhs: &MomentOfInertia<T>) -> Self::Output {
1847 AngularVelocity{radps: self.kgm2radps.clone() / rhs.kgm2.clone()}
1848 }
1849}
1850
1851impl<T> core::ops::Div<AngularMomentum<T>> for f64 where T: NumLike+From<f64> {
1854 type Output = InverseAngularMomentum<T>;
1855 fn div(self, rhs: AngularMomentum<T>) -> Self::Output {
1856 InverseAngularMomentum{s_per_kgm2rad: T::from(self) / rhs.kgm2radps}
1857 }
1858}
1859impl<T> core::ops::Div<AngularMomentum<T>> for &f64 where T: NumLike+From<f64> {
1861 type Output = InverseAngularMomentum<T>;
1862 fn div(self, rhs: AngularMomentum<T>) -> Self::Output {
1863 InverseAngularMomentum{s_per_kgm2rad: T::from(self.clone()) / rhs.kgm2radps}
1864 }
1865}
1866impl<T> core::ops::Div<&AngularMomentum<T>> for f64 where T: NumLike+From<f64> {
1868 type Output = InverseAngularMomentum<T>;
1869 fn div(self, rhs: &AngularMomentum<T>) -> Self::Output {
1870 InverseAngularMomentum{s_per_kgm2rad: T::from(self) / rhs.kgm2radps.clone()}
1871 }
1872}
1873impl<T> core::ops::Div<&AngularMomentum<T>> for &f64 where T: NumLike+From<f64> {
1875 type Output = InverseAngularMomentum<T>;
1876 fn div(self, rhs: &AngularMomentum<T>) -> Self::Output {
1877 InverseAngularMomentum{s_per_kgm2rad: T::from(self.clone()) / rhs.kgm2radps.clone()}
1878 }
1879}
1880
1881impl<T> core::ops::Div<AngularMomentum<T>> for f32 where T: NumLike+From<f32> {
1884 type Output = InverseAngularMomentum<T>;
1885 fn div(self, rhs: AngularMomentum<T>) -> Self::Output {
1886 InverseAngularMomentum{s_per_kgm2rad: T::from(self) / rhs.kgm2radps}
1887 }
1888}
1889impl<T> core::ops::Div<AngularMomentum<T>> for &f32 where T: NumLike+From<f32> {
1891 type Output = InverseAngularMomentum<T>;
1892 fn div(self, rhs: AngularMomentum<T>) -> Self::Output {
1893 InverseAngularMomentum{s_per_kgm2rad: T::from(self.clone()) / rhs.kgm2radps}
1894 }
1895}
1896impl<T> core::ops::Div<&AngularMomentum<T>> for f32 where T: NumLike+From<f32> {
1898 type Output = InverseAngularMomentum<T>;
1899 fn div(self, rhs: &AngularMomentum<T>) -> Self::Output {
1900 InverseAngularMomentum{s_per_kgm2rad: T::from(self) / rhs.kgm2radps.clone()}
1901 }
1902}
1903impl<T> core::ops::Div<&AngularMomentum<T>> for &f32 where T: NumLike+From<f32> {
1905 type Output = InverseAngularMomentum<T>;
1906 fn div(self, rhs: &AngularMomentum<T>) -> Self::Output {
1907 InverseAngularMomentum{s_per_kgm2rad: T::from(self.clone()) / rhs.kgm2radps.clone()}
1908 }
1909}
1910
1911impl<T> core::ops::Div<AngularMomentum<T>> for i64 where T: NumLike+From<i64> {
1914 type Output = InverseAngularMomentum<T>;
1915 fn div(self, rhs: AngularMomentum<T>) -> Self::Output {
1916 InverseAngularMomentum{s_per_kgm2rad: T::from(self) / rhs.kgm2radps}
1917 }
1918}
1919impl<T> core::ops::Div<AngularMomentum<T>> for &i64 where T: NumLike+From<i64> {
1921 type Output = InverseAngularMomentum<T>;
1922 fn div(self, rhs: AngularMomentum<T>) -> Self::Output {
1923 InverseAngularMomentum{s_per_kgm2rad: T::from(self.clone()) / rhs.kgm2radps}
1924 }
1925}
1926impl<T> core::ops::Div<&AngularMomentum<T>> for i64 where T: NumLike+From<i64> {
1928 type Output = InverseAngularMomentum<T>;
1929 fn div(self, rhs: &AngularMomentum<T>) -> Self::Output {
1930 InverseAngularMomentum{s_per_kgm2rad: T::from(self) / rhs.kgm2radps.clone()}
1931 }
1932}
1933impl<T> core::ops::Div<&AngularMomentum<T>> for &i64 where T: NumLike+From<i64> {
1935 type Output = InverseAngularMomentum<T>;
1936 fn div(self, rhs: &AngularMomentum<T>) -> Self::Output {
1937 InverseAngularMomentum{s_per_kgm2rad: T::from(self.clone()) / rhs.kgm2radps.clone()}
1938 }
1939}
1940
1941impl<T> core::ops::Div<AngularMomentum<T>> for i32 where T: NumLike+From<i32> {
1944 type Output = InverseAngularMomentum<T>;
1945 fn div(self, rhs: AngularMomentum<T>) -> Self::Output {
1946 InverseAngularMomentum{s_per_kgm2rad: T::from(self) / rhs.kgm2radps}
1947 }
1948}
1949impl<T> core::ops::Div<AngularMomentum<T>> for &i32 where T: NumLike+From<i32> {
1951 type Output = InverseAngularMomentum<T>;
1952 fn div(self, rhs: AngularMomentum<T>) -> Self::Output {
1953 InverseAngularMomentum{s_per_kgm2rad: T::from(self.clone()) / rhs.kgm2radps}
1954 }
1955}
1956impl<T> core::ops::Div<&AngularMomentum<T>> for i32 where T: NumLike+From<i32> {
1958 type Output = InverseAngularMomentum<T>;
1959 fn div(self, rhs: &AngularMomentum<T>) -> Self::Output {
1960 InverseAngularMomentum{s_per_kgm2rad: T::from(self) / rhs.kgm2radps.clone()}
1961 }
1962}
1963impl<T> core::ops::Div<&AngularMomentum<T>> for &i32 where T: NumLike+From<i32> {
1965 type Output = InverseAngularMomentum<T>;
1966 fn div(self, rhs: &AngularMomentum<T>) -> Self::Output {
1967 InverseAngularMomentum{s_per_kgm2rad: T::from(self.clone()) / rhs.kgm2radps.clone()}
1968 }
1969}
1970
1971#[cfg(feature="num-bigfloat")]
1974impl<T> core::ops::Div<AngularMomentum<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
1975 type Output = InverseAngularMomentum<T>;
1976 fn div(self, rhs: AngularMomentum<T>) -> Self::Output {
1977 InverseAngularMomentum{s_per_kgm2rad: T::from(self) / rhs.kgm2radps}
1978 }
1979}
1980#[cfg(feature="num-bigfloat")]
1982impl<T> core::ops::Div<AngularMomentum<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
1983 type Output = InverseAngularMomentum<T>;
1984 fn div(self, rhs: AngularMomentum<T>) -> Self::Output {
1985 InverseAngularMomentum{s_per_kgm2rad: T::from(self.clone()) / rhs.kgm2radps}
1986 }
1987}
1988#[cfg(feature="num-bigfloat")]
1990impl<T> core::ops::Div<&AngularMomentum<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
1991 type Output = InverseAngularMomentum<T>;
1992 fn div(self, rhs: &AngularMomentum<T>) -> Self::Output {
1993 InverseAngularMomentum{s_per_kgm2rad: T::from(self) / rhs.kgm2radps.clone()}
1994 }
1995}
1996#[cfg(feature="num-bigfloat")]
1998impl<T> core::ops::Div<&AngularMomentum<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
1999 type Output = InverseAngularMomentum<T>;
2000 fn div(self, rhs: &AngularMomentum<T>) -> Self::Output {
2001 InverseAngularMomentum{s_per_kgm2rad: T::from(self.clone()) / rhs.kgm2radps.clone()}
2002 }
2003}
2004
2005#[cfg(feature="num-complex")]
2008impl<T> core::ops::Div<AngularMomentum<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
2009 type Output = InverseAngularMomentum<T>;
2010 fn div(self, rhs: AngularMomentum<T>) -> Self::Output {
2011 InverseAngularMomentum{s_per_kgm2rad: T::from(self) / rhs.kgm2radps}
2012 }
2013}
2014#[cfg(feature="num-complex")]
2016impl<T> core::ops::Div<AngularMomentum<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
2017 type Output = InverseAngularMomentum<T>;
2018 fn div(self, rhs: AngularMomentum<T>) -> Self::Output {
2019 InverseAngularMomentum{s_per_kgm2rad: T::from(self.clone()) / rhs.kgm2radps}
2020 }
2021}
2022#[cfg(feature="num-complex")]
2024impl<T> core::ops::Div<&AngularMomentum<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
2025 type Output = InverseAngularMomentum<T>;
2026 fn div(self, rhs: &AngularMomentum<T>) -> Self::Output {
2027 InverseAngularMomentum{s_per_kgm2rad: T::from(self) / rhs.kgm2radps.clone()}
2028 }
2029}
2030#[cfg(feature="num-complex")]
2032impl<T> core::ops::Div<&AngularMomentum<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
2033 type Output = InverseAngularMomentum<T>;
2034 fn div(self, rhs: &AngularMomentum<T>) -> Self::Output {
2035 InverseAngularMomentum{s_per_kgm2rad: T::from(self.clone()) / rhs.kgm2radps.clone()}
2036 }
2037}
2038
2039#[cfg(feature="num-complex")]
2042impl<T> core::ops::Div<AngularMomentum<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
2043 type Output = InverseAngularMomentum<T>;
2044 fn div(self, rhs: AngularMomentum<T>) -> Self::Output {
2045 InverseAngularMomentum{s_per_kgm2rad: T::from(self) / rhs.kgm2radps}
2046 }
2047}
2048#[cfg(feature="num-complex")]
2050impl<T> core::ops::Div<AngularMomentum<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
2051 type Output = InverseAngularMomentum<T>;
2052 fn div(self, rhs: AngularMomentum<T>) -> Self::Output {
2053 InverseAngularMomentum{s_per_kgm2rad: T::from(self.clone()) / rhs.kgm2radps}
2054 }
2055}
2056#[cfg(feature="num-complex")]
2058impl<T> core::ops::Div<&AngularMomentum<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
2059 type Output = InverseAngularMomentum<T>;
2060 fn div(self, rhs: &AngularMomentum<T>) -> Self::Output {
2061 InverseAngularMomentum{s_per_kgm2rad: T::from(self) / rhs.kgm2radps.clone()}
2062 }
2063}
2064#[cfg(feature="num-complex")]
2066impl<T> core::ops::Div<&AngularMomentum<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
2067 type Output = InverseAngularMomentum<T>;
2068 fn div(self, rhs: &AngularMomentum<T>) -> Self::Output {
2069 InverseAngularMomentum{s_per_kgm2rad: T::from(self.clone()) / rhs.kgm2radps.clone()}
2070 }
2071}
2072
2073#[derive(UnitStruct, Debug, Clone)]
2075#[cfg_attr(feature="serde", derive(Serialize, Deserialize))]
2076pub struct AngularVelocity<T: NumLike>{
2077 pub radps: T
2079}
2080
2081impl<T> AngularVelocity<T> where T: NumLike {
2082
2083 pub fn unit_name() -> &'static str { "radians per second" }
2085
2086 pub fn unit_symbol() -> &'static str { "rad/s" }
2088
2089 pub fn from_radps(radps: T) -> Self { AngularVelocity{radps: radps} }
2094
2095 pub fn to_radps(&self) -> T { self.radps.clone() }
2097
2098 pub fn from_radians_per_second(radians_per_second: T) -> Self { AngularVelocity{radps: radians_per_second} }
2103
2104 pub fn to_radians_per_second(&self) -> T { self.radps.clone() }
2106
2107}
2108
2109impl<T> fmt::Display for AngularVelocity<T> where T: NumLike {
2110 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2111 write!(f, "{} {}", &self.radps, Self::unit_symbol())
2112 }
2113}
2114
2115impl<T> AngularVelocity<T> where T: NumLike+From<f64> {
2116
2117 pub fn to_degrees_per_second(&self) -> T {
2121 return self.radps.clone() * T::from(57.2957795130823_f64);
2122 }
2123
2124 pub fn from_degrees_per_second(degrees_per_second: T) -> Self {
2131 AngularVelocity{radps: degrees_per_second * T::from(0.0174532925199433_f64)}
2132 }
2133
2134 pub fn to_degps(&self) -> T {
2138 return self.radps.clone() * T::from(57.2957795130823_f64);
2139 }
2140
2141 pub fn from_degps(degps: T) -> Self {
2148 AngularVelocity{radps: degps * T::from(0.0174532925199433_f64)}
2149 }
2150
2151 pub fn to_rps(&self) -> T {
2155 return self.radps.clone() * T::from(0.159154943091895_f64);
2156 }
2157
2158 pub fn from_rps(rps: T) -> Self {
2165 AngularVelocity{radps: rps * T::from(6.28318530717959_f64)}
2166 }
2167
2168 pub fn to_rpm(&self) -> T {
2172 return self.radps.clone() * T::from(9.54929658551372_f64);
2173 }
2174
2175 pub fn from_rpm(rpm: T) -> Self {
2182 AngularVelocity{radps: rpm * T::from(0.10471975511966_f64)}
2183 }
2184
2185 pub fn to_rph(&self) -> T {
2189 return self.radps.clone() * T::from(572.957795130823_f64);
2190 }
2191
2192 pub fn from_rph(rph: T) -> Self {
2199 AngularVelocity{radps: rph * T::from(0.0017453292519943_f64)}
2200 }
2201
2202}
2203
2204
2205#[cfg(feature="num-bigfloat")]
2207impl core::ops::Mul<AngularVelocity<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
2208 type Output = AngularVelocity<num_bigfloat::BigFloat>;
2209 fn mul(self, rhs: AngularVelocity<num_bigfloat::BigFloat>) -> Self::Output {
2210 AngularVelocity{radps: self * rhs.radps}
2211 }
2212}
2213#[cfg(feature="num-bigfloat")]
2215impl core::ops::Mul<AngularVelocity<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
2216 type Output = AngularVelocity<num_bigfloat::BigFloat>;
2217 fn mul(self, rhs: AngularVelocity<num_bigfloat::BigFloat>) -> Self::Output {
2218 AngularVelocity{radps: self.clone() * rhs.radps}
2219 }
2220}
2221#[cfg(feature="num-bigfloat")]
2223impl core::ops::Mul<&AngularVelocity<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
2224 type Output = AngularVelocity<num_bigfloat::BigFloat>;
2225 fn mul(self, rhs: &AngularVelocity<num_bigfloat::BigFloat>) -> Self::Output {
2226 AngularVelocity{radps: self * rhs.radps.clone()}
2227 }
2228}
2229#[cfg(feature="num-bigfloat")]
2231impl core::ops::Mul<&AngularVelocity<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
2232 type Output = AngularVelocity<num_bigfloat::BigFloat>;
2233 fn mul(self, rhs: &AngularVelocity<num_bigfloat::BigFloat>) -> Self::Output {
2234 AngularVelocity{radps: self.clone() * rhs.radps.clone()}
2235 }
2236}
2237
2238#[cfg(feature="num-complex")]
2240impl core::ops::Mul<AngularVelocity<num_complex::Complex32>> for num_complex::Complex32 {
2241 type Output = AngularVelocity<num_complex::Complex32>;
2242 fn mul(self, rhs: AngularVelocity<num_complex::Complex32>) -> Self::Output {
2243 AngularVelocity{radps: self * rhs.radps}
2244 }
2245}
2246#[cfg(feature="num-complex")]
2248impl core::ops::Mul<AngularVelocity<num_complex::Complex32>> for &num_complex::Complex32 {
2249 type Output = AngularVelocity<num_complex::Complex32>;
2250 fn mul(self, rhs: AngularVelocity<num_complex::Complex32>) -> Self::Output {
2251 AngularVelocity{radps: self.clone() * rhs.radps}
2252 }
2253}
2254#[cfg(feature="num-complex")]
2256impl core::ops::Mul<&AngularVelocity<num_complex::Complex32>> for num_complex::Complex32 {
2257 type Output = AngularVelocity<num_complex::Complex32>;
2258 fn mul(self, rhs: &AngularVelocity<num_complex::Complex32>) -> Self::Output {
2259 AngularVelocity{radps: self * rhs.radps.clone()}
2260 }
2261}
2262#[cfg(feature="num-complex")]
2264impl core::ops::Mul<&AngularVelocity<num_complex::Complex32>> for &num_complex::Complex32 {
2265 type Output = AngularVelocity<num_complex::Complex32>;
2266 fn mul(self, rhs: &AngularVelocity<num_complex::Complex32>) -> Self::Output {
2267 AngularVelocity{radps: self.clone() * rhs.radps.clone()}
2268 }
2269}
2270
2271#[cfg(feature="num-complex")]
2273impl core::ops::Mul<AngularVelocity<num_complex::Complex64>> for num_complex::Complex64 {
2274 type Output = AngularVelocity<num_complex::Complex64>;
2275 fn mul(self, rhs: AngularVelocity<num_complex::Complex64>) -> Self::Output {
2276 AngularVelocity{radps: self * rhs.radps}
2277 }
2278}
2279#[cfg(feature="num-complex")]
2281impl core::ops::Mul<AngularVelocity<num_complex::Complex64>> for &num_complex::Complex64 {
2282 type Output = AngularVelocity<num_complex::Complex64>;
2283 fn mul(self, rhs: AngularVelocity<num_complex::Complex64>) -> Self::Output {
2284 AngularVelocity{radps: self.clone() * rhs.radps}
2285 }
2286}
2287#[cfg(feature="num-complex")]
2289impl core::ops::Mul<&AngularVelocity<num_complex::Complex64>> for num_complex::Complex64 {
2290 type Output = AngularVelocity<num_complex::Complex64>;
2291 fn mul(self, rhs: &AngularVelocity<num_complex::Complex64>) -> Self::Output {
2292 AngularVelocity{radps: self * rhs.radps.clone()}
2293 }
2294}
2295#[cfg(feature="num-complex")]
2297impl core::ops::Mul<&AngularVelocity<num_complex::Complex64>> for &num_complex::Complex64 {
2298 type Output = AngularVelocity<num_complex::Complex64>;
2299 fn mul(self, rhs: &AngularVelocity<num_complex::Complex64>) -> Self::Output {
2300 AngularVelocity{radps: self.clone() * rhs.radps.clone()}
2301 }
2302}
2303
2304
2305
2306#[cfg(feature = "uom")]
2308impl<T> Into<uom::si::f32::AngularVelocity> for AngularVelocity<T> where T: NumLike+Into<f32> {
2309 fn into(self) -> uom::si::f32::AngularVelocity {
2310 uom::si::f32::AngularVelocity::new::<uom::si::angular_velocity::radian_per_second>(self.radps.into())
2311 }
2312}
2313
2314#[cfg(feature = "uom")]
2316impl<T> From<uom::si::f32::AngularVelocity> for AngularVelocity<T> where T: NumLike+From<f32> {
2317 fn from(src: uom::si::f32::AngularVelocity) -> Self {
2318 AngularVelocity{radps: T::from(src.value)}
2319 }
2320}
2321
2322#[cfg(feature = "uom")]
2324impl<T> Into<uom::si::f64::AngularVelocity> for AngularVelocity<T> where T: NumLike+Into<f64> {
2325 fn into(self) -> uom::si::f64::AngularVelocity {
2326 uom::si::f64::AngularVelocity::new::<uom::si::angular_velocity::radian_per_second>(self.radps.into())
2327 }
2328}
2329
2330#[cfg(feature = "uom")]
2332impl<T> From<uom::si::f64::AngularVelocity> for AngularVelocity<T> where T: NumLike+From<f64> {
2333 fn from(src: uom::si::f64::AngularVelocity) -> Self {
2334 AngularVelocity{radps: T::from(src.value)}
2335 }
2336}
2337
2338
2339impl<T> core::ops::Mul<Time<T>> for AngularVelocity<T> where T: NumLike {
2342 type Output = Angle<T>;
2343 fn mul(self, rhs: Time<T>) -> Self::Output {
2344 Angle{rad: self.radps * rhs.s}
2345 }
2346}
2347impl<T> core::ops::Mul<Time<T>> for &AngularVelocity<T> where T: NumLike {
2349 type Output = Angle<T>;
2350 fn mul(self, rhs: Time<T>) -> Self::Output {
2351 Angle{rad: self.radps.clone() * rhs.s}
2352 }
2353}
2354impl<T> core::ops::Mul<&Time<T>> for AngularVelocity<T> where T: NumLike {
2356 type Output = Angle<T>;
2357 fn mul(self, rhs: &Time<T>) -> Self::Output {
2358 Angle{rad: self.radps * rhs.s.clone()}
2359 }
2360}
2361impl<T> core::ops::Mul<&Time<T>> for &AngularVelocity<T> where T: NumLike {
2363 type Output = Angle<T>;
2364 fn mul(self, rhs: &Time<T>) -> Self::Output {
2365 Angle{rad: self.radps.clone() * rhs.s.clone()}
2366 }
2367}
2368
2369impl<T> core::ops::Div<Time<T>> for AngularVelocity<T> where T: NumLike {
2372 type Output = AngularAcceleration<T>;
2373 fn div(self, rhs: Time<T>) -> Self::Output {
2374 AngularAcceleration{radps2: self.radps / rhs.s}
2375 }
2376}
2377impl<T> core::ops::Div<Time<T>> for &AngularVelocity<T> where T: NumLike {
2379 type Output = AngularAcceleration<T>;
2380 fn div(self, rhs: Time<T>) -> Self::Output {
2381 AngularAcceleration{radps2: self.radps.clone() / rhs.s}
2382 }
2383}
2384impl<T> core::ops::Div<&Time<T>> for AngularVelocity<T> where T: NumLike {
2386 type Output = AngularAcceleration<T>;
2387 fn div(self, rhs: &Time<T>) -> Self::Output {
2388 AngularAcceleration{radps2: self.radps / rhs.s.clone()}
2389 }
2390}
2391impl<T> core::ops::Div<&Time<T>> for &AngularVelocity<T> where T: NumLike {
2393 type Output = AngularAcceleration<T>;
2394 fn div(self, rhs: &Time<T>) -> Self::Output {
2395 AngularAcceleration{radps2: self.radps.clone() / rhs.s.clone()}
2396 }
2397}
2398
2399impl<T> core::ops::Div<Angle<T>> for AngularVelocity<T> where T: NumLike {
2402 type Output = Frequency<T>;
2403 fn div(self, rhs: Angle<T>) -> Self::Output {
2404 Frequency{Hz: self.radps / rhs.rad}
2405 }
2406}
2407impl<T> core::ops::Div<Angle<T>> for &AngularVelocity<T> where T: NumLike {
2409 type Output = Frequency<T>;
2410 fn div(self, rhs: Angle<T>) -> Self::Output {
2411 Frequency{Hz: self.radps.clone() / rhs.rad}
2412 }
2413}
2414impl<T> core::ops::Div<&Angle<T>> for AngularVelocity<T> where T: NumLike {
2416 type Output = Frequency<T>;
2417 fn div(self, rhs: &Angle<T>) -> Self::Output {
2418 Frequency{Hz: self.radps / rhs.rad.clone()}
2419 }
2420}
2421impl<T> core::ops::Div<&Angle<T>> for &AngularVelocity<T> where T: NumLike {
2423 type Output = Frequency<T>;
2424 fn div(self, rhs: &Angle<T>) -> Self::Output {
2425 Frequency{Hz: self.radps.clone() / rhs.rad.clone()}
2426 }
2427}
2428
2429impl<T> core::ops::Mul<InverseAngle<T>> for AngularVelocity<T> where T: NumLike {
2432 type Output = Frequency<T>;
2433 fn mul(self, rhs: InverseAngle<T>) -> Self::Output {
2434 Frequency{Hz: self.radps * rhs.per_rad}
2435 }
2436}
2437impl<T> core::ops::Mul<InverseAngle<T>> for &AngularVelocity<T> where T: NumLike {
2439 type Output = Frequency<T>;
2440 fn mul(self, rhs: InverseAngle<T>) -> Self::Output {
2441 Frequency{Hz: self.radps.clone() * rhs.per_rad}
2442 }
2443}
2444impl<T> core::ops::Mul<&InverseAngle<T>> for AngularVelocity<T> where T: NumLike {
2446 type Output = Frequency<T>;
2447 fn mul(self, rhs: &InverseAngle<T>) -> Self::Output {
2448 Frequency{Hz: self.radps * rhs.per_rad.clone()}
2449 }
2450}
2451impl<T> core::ops::Mul<&InverseAngle<T>> for &AngularVelocity<T> where T: NumLike {
2453 type Output = Frequency<T>;
2454 fn mul(self, rhs: &InverseAngle<T>) -> Self::Output {
2455 Frequency{Hz: self.radps.clone() * rhs.per_rad.clone()}
2456 }
2457}
2458
2459impl<T> core::ops::Div<AngularAcceleration<T>> for AngularVelocity<T> where T: NumLike {
2462 type Output = Time<T>;
2463 fn div(self, rhs: AngularAcceleration<T>) -> Self::Output {
2464 Time{s: self.radps / rhs.radps2}
2465 }
2466}
2467impl<T> core::ops::Div<AngularAcceleration<T>> for &AngularVelocity<T> where T: NumLike {
2469 type Output = Time<T>;
2470 fn div(self, rhs: AngularAcceleration<T>) -> Self::Output {
2471 Time{s: self.radps.clone() / rhs.radps2}
2472 }
2473}
2474impl<T> core::ops::Div<&AngularAcceleration<T>> for AngularVelocity<T> where T: NumLike {
2476 type Output = Time<T>;
2477 fn div(self, rhs: &AngularAcceleration<T>) -> Self::Output {
2478 Time{s: self.radps / rhs.radps2.clone()}
2479 }
2480}
2481impl<T> core::ops::Div<&AngularAcceleration<T>> for &AngularVelocity<T> where T: NumLike {
2483 type Output = Time<T>;
2484 fn div(self, rhs: &AngularAcceleration<T>) -> Self::Output {
2485 Time{s: self.radps.clone() / rhs.radps2.clone()}
2486 }
2487}
2488
2489impl<T> core::ops::Mul<Frequency<T>> for AngularVelocity<T> where T: NumLike {
2492 type Output = AngularAcceleration<T>;
2493 fn mul(self, rhs: Frequency<T>) -> Self::Output {
2494 AngularAcceleration{radps2: self.radps * rhs.Hz}
2495 }
2496}
2497impl<T> core::ops::Mul<Frequency<T>> for &AngularVelocity<T> where T: NumLike {
2499 type Output = AngularAcceleration<T>;
2500 fn mul(self, rhs: Frequency<T>) -> Self::Output {
2501 AngularAcceleration{radps2: self.radps.clone() * rhs.Hz}
2502 }
2503}
2504impl<T> core::ops::Mul<&Frequency<T>> for AngularVelocity<T> where T: NumLike {
2506 type Output = AngularAcceleration<T>;
2507 fn mul(self, rhs: &Frequency<T>) -> Self::Output {
2508 AngularAcceleration{radps2: self.radps * rhs.Hz.clone()}
2509 }
2510}
2511impl<T> core::ops::Mul<&Frequency<T>> for &AngularVelocity<T> where T: NumLike {
2513 type Output = AngularAcceleration<T>;
2514 fn mul(self, rhs: &Frequency<T>) -> Self::Output {
2515 AngularAcceleration{radps2: self.radps.clone() * rhs.Hz.clone()}
2516 }
2517}
2518
2519impl<T> core::ops::Div<Frequency<T>> for AngularVelocity<T> where T: NumLike {
2522 type Output = Angle<T>;
2523 fn div(self, rhs: Frequency<T>) -> Self::Output {
2524 Angle{rad: self.radps / rhs.Hz}
2525 }
2526}
2527impl<T> core::ops::Div<Frequency<T>> for &AngularVelocity<T> where T: NumLike {
2529 type Output = Angle<T>;
2530 fn div(self, rhs: Frequency<T>) -> Self::Output {
2531 Angle{rad: self.radps.clone() / rhs.Hz}
2532 }
2533}
2534impl<T> core::ops::Div<&Frequency<T>> for AngularVelocity<T> where T: NumLike {
2536 type Output = Angle<T>;
2537 fn div(self, rhs: &Frequency<T>) -> Self::Output {
2538 Angle{rad: self.radps / rhs.Hz.clone()}
2539 }
2540}
2541impl<T> core::ops::Div<&Frequency<T>> for &AngularVelocity<T> where T: NumLike {
2543 type Output = Angle<T>;
2544 fn div(self, rhs: &Frequency<T>) -> Self::Output {
2545 Angle{rad: self.radps.clone() / rhs.Hz.clone()}
2546 }
2547}
2548
2549impl<T> core::ops::Mul<InverseAngularAcceleration<T>> for AngularVelocity<T> where T: NumLike {
2552 type Output = Time<T>;
2553 fn mul(self, rhs: InverseAngularAcceleration<T>) -> Self::Output {
2554 Time{s: self.radps * rhs.s2prad}
2555 }
2556}
2557impl<T> core::ops::Mul<InverseAngularAcceleration<T>> for &AngularVelocity<T> where T: NumLike {
2559 type Output = Time<T>;
2560 fn mul(self, rhs: InverseAngularAcceleration<T>) -> Self::Output {
2561 Time{s: self.radps.clone() * rhs.s2prad}
2562 }
2563}
2564impl<T> core::ops::Mul<&InverseAngularAcceleration<T>> for AngularVelocity<T> where T: NumLike {
2566 type Output = Time<T>;
2567 fn mul(self, rhs: &InverseAngularAcceleration<T>) -> Self::Output {
2568 Time{s: self.radps * rhs.s2prad.clone()}
2569 }
2570}
2571impl<T> core::ops::Mul<&InverseAngularAcceleration<T>> for &AngularVelocity<T> where T: NumLike {
2573 type Output = Time<T>;
2574 fn mul(self, rhs: &InverseAngularAcceleration<T>) -> Self::Output {
2575 Time{s: self.radps.clone() * rhs.s2prad.clone()}
2576 }
2577}
2578
2579impl<T> core::ops::Div<InverseMomentOfInertia<T>> for AngularVelocity<T> where T: NumLike {
2582 type Output = AngularMomentum<T>;
2583 fn div(self, rhs: InverseMomentOfInertia<T>) -> Self::Output {
2584 AngularMomentum{kgm2radps: self.radps / rhs.per_kgm2}
2585 }
2586}
2587impl<T> core::ops::Div<InverseMomentOfInertia<T>> for &AngularVelocity<T> where T: NumLike {
2589 type Output = AngularMomentum<T>;
2590 fn div(self, rhs: InverseMomentOfInertia<T>) -> Self::Output {
2591 AngularMomentum{kgm2radps: self.radps.clone() / rhs.per_kgm2}
2592 }
2593}
2594impl<T> core::ops::Div<&InverseMomentOfInertia<T>> for AngularVelocity<T> where T: NumLike {
2596 type Output = AngularMomentum<T>;
2597 fn div(self, rhs: &InverseMomentOfInertia<T>) -> Self::Output {
2598 AngularMomentum{kgm2radps: self.radps / rhs.per_kgm2.clone()}
2599 }
2600}
2601impl<T> core::ops::Div<&InverseMomentOfInertia<T>> for &AngularVelocity<T> where T: NumLike {
2603 type Output = AngularMomentum<T>;
2604 fn div(self, rhs: &InverseMomentOfInertia<T>) -> Self::Output {
2605 AngularMomentum{kgm2radps: self.radps.clone() / rhs.per_kgm2.clone()}
2606 }
2607}
2608
2609impl<T> core::ops::Mul<MomentOfInertia<T>> for AngularVelocity<T> where T: NumLike {
2612 type Output = AngularMomentum<T>;
2613 fn mul(self, rhs: MomentOfInertia<T>) -> Self::Output {
2614 AngularMomentum{kgm2radps: self.radps * rhs.kgm2}
2615 }
2616}
2617impl<T> core::ops::Mul<MomentOfInertia<T>> for &AngularVelocity<T> where T: NumLike {
2619 type Output = AngularMomentum<T>;
2620 fn mul(self, rhs: MomentOfInertia<T>) -> Self::Output {
2621 AngularMomentum{kgm2radps: self.radps.clone() * rhs.kgm2}
2622 }
2623}
2624impl<T> core::ops::Mul<&MomentOfInertia<T>> for AngularVelocity<T> where T: NumLike {
2626 type Output = AngularMomentum<T>;
2627 fn mul(self, rhs: &MomentOfInertia<T>) -> Self::Output {
2628 AngularMomentum{kgm2radps: self.radps * rhs.kgm2.clone()}
2629 }
2630}
2631impl<T> core::ops::Mul<&MomentOfInertia<T>> for &AngularVelocity<T> where T: NumLike {
2633 type Output = AngularMomentum<T>;
2634 fn mul(self, rhs: &MomentOfInertia<T>) -> Self::Output {
2635 AngularMomentum{kgm2radps: self.radps.clone() * rhs.kgm2.clone()}
2636 }
2637}
2638
2639impl<T> core::ops::Div<AngularVelocity<T>> for f64 where T: NumLike+From<f64> {
2642 type Output = InverseAngularVelocity<T>;
2643 fn div(self, rhs: AngularVelocity<T>) -> Self::Output {
2644 InverseAngularVelocity{s_per_rad: T::from(self) / rhs.radps}
2645 }
2646}
2647impl<T> core::ops::Div<AngularVelocity<T>> for &f64 where T: NumLike+From<f64> {
2649 type Output = InverseAngularVelocity<T>;
2650 fn div(self, rhs: AngularVelocity<T>) -> Self::Output {
2651 InverseAngularVelocity{s_per_rad: T::from(self.clone()) / rhs.radps}
2652 }
2653}
2654impl<T> core::ops::Div<&AngularVelocity<T>> for f64 where T: NumLike+From<f64> {
2656 type Output = InverseAngularVelocity<T>;
2657 fn div(self, rhs: &AngularVelocity<T>) -> Self::Output {
2658 InverseAngularVelocity{s_per_rad: T::from(self) / rhs.radps.clone()}
2659 }
2660}
2661impl<T> core::ops::Div<&AngularVelocity<T>> for &f64 where T: NumLike+From<f64> {
2663 type Output = InverseAngularVelocity<T>;
2664 fn div(self, rhs: &AngularVelocity<T>) -> Self::Output {
2665 InverseAngularVelocity{s_per_rad: T::from(self.clone()) / rhs.radps.clone()}
2666 }
2667}
2668
2669impl<T> core::ops::Div<AngularVelocity<T>> for f32 where T: NumLike+From<f32> {
2672 type Output = InverseAngularVelocity<T>;
2673 fn div(self, rhs: AngularVelocity<T>) -> Self::Output {
2674 InverseAngularVelocity{s_per_rad: T::from(self) / rhs.radps}
2675 }
2676}
2677impl<T> core::ops::Div<AngularVelocity<T>> for &f32 where T: NumLike+From<f32> {
2679 type Output = InverseAngularVelocity<T>;
2680 fn div(self, rhs: AngularVelocity<T>) -> Self::Output {
2681 InverseAngularVelocity{s_per_rad: T::from(self.clone()) / rhs.radps}
2682 }
2683}
2684impl<T> core::ops::Div<&AngularVelocity<T>> for f32 where T: NumLike+From<f32> {
2686 type Output = InverseAngularVelocity<T>;
2687 fn div(self, rhs: &AngularVelocity<T>) -> Self::Output {
2688 InverseAngularVelocity{s_per_rad: T::from(self) / rhs.radps.clone()}
2689 }
2690}
2691impl<T> core::ops::Div<&AngularVelocity<T>> for &f32 where T: NumLike+From<f32> {
2693 type Output = InverseAngularVelocity<T>;
2694 fn div(self, rhs: &AngularVelocity<T>) -> Self::Output {
2695 InverseAngularVelocity{s_per_rad: T::from(self.clone()) / rhs.radps.clone()}
2696 }
2697}
2698
2699impl<T> core::ops::Div<AngularVelocity<T>> for i64 where T: NumLike+From<i64> {
2702 type Output = InverseAngularVelocity<T>;
2703 fn div(self, rhs: AngularVelocity<T>) -> Self::Output {
2704 InverseAngularVelocity{s_per_rad: T::from(self) / rhs.radps}
2705 }
2706}
2707impl<T> core::ops::Div<AngularVelocity<T>> for &i64 where T: NumLike+From<i64> {
2709 type Output = InverseAngularVelocity<T>;
2710 fn div(self, rhs: AngularVelocity<T>) -> Self::Output {
2711 InverseAngularVelocity{s_per_rad: T::from(self.clone()) / rhs.radps}
2712 }
2713}
2714impl<T> core::ops::Div<&AngularVelocity<T>> for i64 where T: NumLike+From<i64> {
2716 type Output = InverseAngularVelocity<T>;
2717 fn div(self, rhs: &AngularVelocity<T>) -> Self::Output {
2718 InverseAngularVelocity{s_per_rad: T::from(self) / rhs.radps.clone()}
2719 }
2720}
2721impl<T> core::ops::Div<&AngularVelocity<T>> for &i64 where T: NumLike+From<i64> {
2723 type Output = InverseAngularVelocity<T>;
2724 fn div(self, rhs: &AngularVelocity<T>) -> Self::Output {
2725 InverseAngularVelocity{s_per_rad: T::from(self.clone()) / rhs.radps.clone()}
2726 }
2727}
2728
2729impl<T> core::ops::Div<AngularVelocity<T>> for i32 where T: NumLike+From<i32> {
2732 type Output = InverseAngularVelocity<T>;
2733 fn div(self, rhs: AngularVelocity<T>) -> Self::Output {
2734 InverseAngularVelocity{s_per_rad: T::from(self) / rhs.radps}
2735 }
2736}
2737impl<T> core::ops::Div<AngularVelocity<T>> for &i32 where T: NumLike+From<i32> {
2739 type Output = InverseAngularVelocity<T>;
2740 fn div(self, rhs: AngularVelocity<T>) -> Self::Output {
2741 InverseAngularVelocity{s_per_rad: T::from(self.clone()) / rhs.radps}
2742 }
2743}
2744impl<T> core::ops::Div<&AngularVelocity<T>> for i32 where T: NumLike+From<i32> {
2746 type Output = InverseAngularVelocity<T>;
2747 fn div(self, rhs: &AngularVelocity<T>) -> Self::Output {
2748 InverseAngularVelocity{s_per_rad: T::from(self) / rhs.radps.clone()}
2749 }
2750}
2751impl<T> core::ops::Div<&AngularVelocity<T>> for &i32 where T: NumLike+From<i32> {
2753 type Output = InverseAngularVelocity<T>;
2754 fn div(self, rhs: &AngularVelocity<T>) -> Self::Output {
2755 InverseAngularVelocity{s_per_rad: T::from(self.clone()) / rhs.radps.clone()}
2756 }
2757}
2758
2759#[cfg(feature="num-bigfloat")]
2762impl<T> core::ops::Div<AngularVelocity<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
2763 type Output = InverseAngularVelocity<T>;
2764 fn div(self, rhs: AngularVelocity<T>) -> Self::Output {
2765 InverseAngularVelocity{s_per_rad: T::from(self) / rhs.radps}
2766 }
2767}
2768#[cfg(feature="num-bigfloat")]
2770impl<T> core::ops::Div<AngularVelocity<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
2771 type Output = InverseAngularVelocity<T>;
2772 fn div(self, rhs: AngularVelocity<T>) -> Self::Output {
2773 InverseAngularVelocity{s_per_rad: T::from(self.clone()) / rhs.radps}
2774 }
2775}
2776#[cfg(feature="num-bigfloat")]
2778impl<T> core::ops::Div<&AngularVelocity<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
2779 type Output = InverseAngularVelocity<T>;
2780 fn div(self, rhs: &AngularVelocity<T>) -> Self::Output {
2781 InverseAngularVelocity{s_per_rad: T::from(self) / rhs.radps.clone()}
2782 }
2783}
2784#[cfg(feature="num-bigfloat")]
2786impl<T> core::ops::Div<&AngularVelocity<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
2787 type Output = InverseAngularVelocity<T>;
2788 fn div(self, rhs: &AngularVelocity<T>) -> Self::Output {
2789 InverseAngularVelocity{s_per_rad: T::from(self.clone()) / rhs.radps.clone()}
2790 }
2791}
2792
2793#[cfg(feature="num-complex")]
2796impl<T> core::ops::Div<AngularVelocity<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
2797 type Output = InverseAngularVelocity<T>;
2798 fn div(self, rhs: AngularVelocity<T>) -> Self::Output {
2799 InverseAngularVelocity{s_per_rad: T::from(self) / rhs.radps}
2800 }
2801}
2802#[cfg(feature="num-complex")]
2804impl<T> core::ops::Div<AngularVelocity<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
2805 type Output = InverseAngularVelocity<T>;
2806 fn div(self, rhs: AngularVelocity<T>) -> Self::Output {
2807 InverseAngularVelocity{s_per_rad: T::from(self.clone()) / rhs.radps}
2808 }
2809}
2810#[cfg(feature="num-complex")]
2812impl<T> core::ops::Div<&AngularVelocity<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
2813 type Output = InverseAngularVelocity<T>;
2814 fn div(self, rhs: &AngularVelocity<T>) -> Self::Output {
2815 InverseAngularVelocity{s_per_rad: T::from(self) / rhs.radps.clone()}
2816 }
2817}
2818#[cfg(feature="num-complex")]
2820impl<T> core::ops::Div<&AngularVelocity<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
2821 type Output = InverseAngularVelocity<T>;
2822 fn div(self, rhs: &AngularVelocity<T>) -> Self::Output {
2823 InverseAngularVelocity{s_per_rad: T::from(self.clone()) / rhs.radps.clone()}
2824 }
2825}
2826
2827#[cfg(feature="num-complex")]
2830impl<T> core::ops::Div<AngularVelocity<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
2831 type Output = InverseAngularVelocity<T>;
2832 fn div(self, rhs: AngularVelocity<T>) -> Self::Output {
2833 InverseAngularVelocity{s_per_rad: T::from(self) / rhs.radps}
2834 }
2835}
2836#[cfg(feature="num-complex")]
2838impl<T> core::ops::Div<AngularVelocity<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
2839 type Output = InverseAngularVelocity<T>;
2840 fn div(self, rhs: AngularVelocity<T>) -> Self::Output {
2841 InverseAngularVelocity{s_per_rad: T::from(self.clone()) / rhs.radps}
2842 }
2843}
2844#[cfg(feature="num-complex")]
2846impl<T> core::ops::Div<&AngularVelocity<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
2847 type Output = InverseAngularVelocity<T>;
2848 fn div(self, rhs: &AngularVelocity<T>) -> Self::Output {
2849 InverseAngularVelocity{s_per_rad: T::from(self) / rhs.radps.clone()}
2850 }
2851}
2852#[cfg(feature="num-complex")]
2854impl<T> core::ops::Div<&AngularVelocity<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
2855 type Output = InverseAngularVelocity<T>;
2856 fn div(self, rhs: &AngularVelocity<T>) -> Self::Output {
2857 InverseAngularVelocity{s_per_rad: T::from(self.clone()) / rhs.radps.clone()}
2858 }
2859}
2860
2861#[derive(UnitStruct, Debug, Clone)]
2863#[cfg_attr(feature="serde", derive(Serialize, Deserialize))]
2864pub struct AreaDensity<T: NumLike>{
2865 pub kgpm2: T
2867}
2868
2869impl<T> AreaDensity<T> where T: NumLike {
2870
2871 pub fn unit_name() -> &'static str { "kilograms per square meter" }
2873
2874 pub fn unit_symbol() -> &'static str { "kg/m²" }
2876
2877 pub fn from_kgpm2(kgpm2: T) -> Self { AreaDensity{kgpm2: kgpm2} }
2882
2883 pub fn to_kgpm2(&self) -> T { self.kgpm2.clone() }
2885
2886 pub fn from_kilograms_per_square_meter(kilograms_per_square_meter: T) -> Self { AreaDensity{kgpm2: kilograms_per_square_meter} }
2891
2892 pub fn to_kilograms_per_square_meter(&self) -> T { self.kgpm2.clone() }
2894
2895}
2896
2897impl<T> fmt::Display for AreaDensity<T> where T: NumLike {
2898 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2899 write!(f, "{} {}", &self.kgpm2, Self::unit_symbol())
2900 }
2901}
2902
2903impl<T> AreaDensity<T> where T: NumLike+From<f64> {
2904
2905 pub fn to_gpm2(&self) -> T {
2909 return self.kgpm2.clone() * T::from(1000.0_f64);
2910 }
2911
2912 pub fn from_gpm2(gpm2: T) -> Self {
2919 AreaDensity{kgpm2: gpm2 * T::from(0.001_f64)}
2920 }
2921
2922 pub fn to_grams_per_square_meter(&self) -> T {
2926 return self.kgpm2.clone() * T::from(1000.0_f64);
2927 }
2928
2929 pub fn from_grams_per_square_meter(grams_per_square_meter: T) -> Self {
2936 AreaDensity{kgpm2: grams_per_square_meter * T::from(0.001_f64)}
2937 }
2938
2939 pub fn to_gpcm2(&self) -> T {
2943 return self.kgpm2.clone() * T::from(0.1_f64);
2944 }
2945
2946 pub fn from_gpcm2(gpcm2: T) -> Self {
2953 AreaDensity{kgpm2: gpcm2 * T::from(10.0_f64)}
2954 }
2955
2956 pub fn to_grams_per_square_cm(&self) -> T {
2960 return self.kgpm2.clone() * T::from(0.1_f64);
2961 }
2962
2963 pub fn from_grams_per_square_cm(grams_per_square_cm: T) -> Self {
2970 AreaDensity{kgpm2: grams_per_square_cm * T::from(10.0_f64)}
2971 }
2972
2973}
2974
2975
2976#[cfg(feature="num-bigfloat")]
2978impl core::ops::Mul<AreaDensity<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
2979 type Output = AreaDensity<num_bigfloat::BigFloat>;
2980 fn mul(self, rhs: AreaDensity<num_bigfloat::BigFloat>) -> Self::Output {
2981 AreaDensity{kgpm2: self * rhs.kgpm2}
2982 }
2983}
2984#[cfg(feature="num-bigfloat")]
2986impl core::ops::Mul<AreaDensity<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
2987 type Output = AreaDensity<num_bigfloat::BigFloat>;
2988 fn mul(self, rhs: AreaDensity<num_bigfloat::BigFloat>) -> Self::Output {
2989 AreaDensity{kgpm2: self.clone() * rhs.kgpm2}
2990 }
2991}
2992#[cfg(feature="num-bigfloat")]
2994impl core::ops::Mul<&AreaDensity<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
2995 type Output = AreaDensity<num_bigfloat::BigFloat>;
2996 fn mul(self, rhs: &AreaDensity<num_bigfloat::BigFloat>) -> Self::Output {
2997 AreaDensity{kgpm2: self * rhs.kgpm2.clone()}
2998 }
2999}
3000#[cfg(feature="num-bigfloat")]
3002impl core::ops::Mul<&AreaDensity<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
3003 type Output = AreaDensity<num_bigfloat::BigFloat>;
3004 fn mul(self, rhs: &AreaDensity<num_bigfloat::BigFloat>) -> Self::Output {
3005 AreaDensity{kgpm2: self.clone() * rhs.kgpm2.clone()}
3006 }
3007}
3008
3009#[cfg(feature="num-complex")]
3011impl core::ops::Mul<AreaDensity<num_complex::Complex32>> for num_complex::Complex32 {
3012 type Output = AreaDensity<num_complex::Complex32>;
3013 fn mul(self, rhs: AreaDensity<num_complex::Complex32>) -> Self::Output {
3014 AreaDensity{kgpm2: self * rhs.kgpm2}
3015 }
3016}
3017#[cfg(feature="num-complex")]
3019impl core::ops::Mul<AreaDensity<num_complex::Complex32>> for &num_complex::Complex32 {
3020 type Output = AreaDensity<num_complex::Complex32>;
3021 fn mul(self, rhs: AreaDensity<num_complex::Complex32>) -> Self::Output {
3022 AreaDensity{kgpm2: self.clone() * rhs.kgpm2}
3023 }
3024}
3025#[cfg(feature="num-complex")]
3027impl core::ops::Mul<&AreaDensity<num_complex::Complex32>> for num_complex::Complex32 {
3028 type Output = AreaDensity<num_complex::Complex32>;
3029 fn mul(self, rhs: &AreaDensity<num_complex::Complex32>) -> Self::Output {
3030 AreaDensity{kgpm2: self * rhs.kgpm2.clone()}
3031 }
3032}
3033#[cfg(feature="num-complex")]
3035impl core::ops::Mul<&AreaDensity<num_complex::Complex32>> for &num_complex::Complex32 {
3036 type Output = AreaDensity<num_complex::Complex32>;
3037 fn mul(self, rhs: &AreaDensity<num_complex::Complex32>) -> Self::Output {
3038 AreaDensity{kgpm2: self.clone() * rhs.kgpm2.clone()}
3039 }
3040}
3041
3042#[cfg(feature="num-complex")]
3044impl core::ops::Mul<AreaDensity<num_complex::Complex64>> for num_complex::Complex64 {
3045 type Output = AreaDensity<num_complex::Complex64>;
3046 fn mul(self, rhs: AreaDensity<num_complex::Complex64>) -> Self::Output {
3047 AreaDensity{kgpm2: self * rhs.kgpm2}
3048 }
3049}
3050#[cfg(feature="num-complex")]
3052impl core::ops::Mul<AreaDensity<num_complex::Complex64>> for &num_complex::Complex64 {
3053 type Output = AreaDensity<num_complex::Complex64>;
3054 fn mul(self, rhs: AreaDensity<num_complex::Complex64>) -> Self::Output {
3055 AreaDensity{kgpm2: self.clone() * rhs.kgpm2}
3056 }
3057}
3058#[cfg(feature="num-complex")]
3060impl core::ops::Mul<&AreaDensity<num_complex::Complex64>> for num_complex::Complex64 {
3061 type Output = AreaDensity<num_complex::Complex64>;
3062 fn mul(self, rhs: &AreaDensity<num_complex::Complex64>) -> Self::Output {
3063 AreaDensity{kgpm2: self * rhs.kgpm2.clone()}
3064 }
3065}
3066#[cfg(feature="num-complex")]
3068impl core::ops::Mul<&AreaDensity<num_complex::Complex64>> for &num_complex::Complex64 {
3069 type Output = AreaDensity<num_complex::Complex64>;
3070 fn mul(self, rhs: &AreaDensity<num_complex::Complex64>) -> Self::Output {
3071 AreaDensity{kgpm2: self.clone() * rhs.kgpm2.clone()}
3072 }
3073}
3074
3075
3076
3077#[cfg(feature = "uom")]
3079impl<T> Into<uom::si::f32::ArealMassDensity> for AreaDensity<T> where T: NumLike+Into<f32> {
3080 fn into(self) -> uom::si::f32::ArealMassDensity {
3081 uom::si::f32::ArealMassDensity::new::<uom::si::areal_mass_density::kilogram_per_square_meter>(self.kgpm2.into())
3082 }
3083}
3084
3085#[cfg(feature = "uom")]
3087impl<T> From<uom::si::f32::ArealMassDensity> for AreaDensity<T> where T: NumLike+From<f32> {
3088 fn from(src: uom::si::f32::ArealMassDensity) -> Self {
3089 AreaDensity{kgpm2: T::from(src.value)}
3090 }
3091}
3092
3093#[cfg(feature = "uom")]
3095impl<T> Into<uom::si::f64::ArealMassDensity> for AreaDensity<T> where T: NumLike+Into<f64> {
3096 fn into(self) -> uom::si::f64::ArealMassDensity {
3097 uom::si::f64::ArealMassDensity::new::<uom::si::areal_mass_density::kilogram_per_square_meter>(self.kgpm2.into())
3098 }
3099}
3100
3101#[cfg(feature = "uom")]
3103impl<T> From<uom::si::f64::ArealMassDensity> for AreaDensity<T> where T: NumLike+From<f64> {
3104 fn from(src: uom::si::f64::ArealMassDensity) -> Self {
3105 AreaDensity{kgpm2: T::from(src.value)}
3106 }
3107}
3108
3109
3110impl<T> core::ops::Div<Distance<T>> for AreaDensity<T> where T: NumLike {
3113 type Output = Density<T>;
3114 fn div(self, rhs: Distance<T>) -> Self::Output {
3115 Density{kgpm3: self.kgpm2 / rhs.m}
3116 }
3117}
3118impl<T> core::ops::Div<Distance<T>> for &AreaDensity<T> where T: NumLike {
3120 type Output = Density<T>;
3121 fn div(self, rhs: Distance<T>) -> Self::Output {
3122 Density{kgpm3: self.kgpm2.clone() / rhs.m}
3123 }
3124}
3125impl<T> core::ops::Div<&Distance<T>> for AreaDensity<T> where T: NumLike {
3127 type Output = Density<T>;
3128 fn div(self, rhs: &Distance<T>) -> Self::Output {
3129 Density{kgpm3: self.kgpm2 / rhs.m.clone()}
3130 }
3131}
3132impl<T> core::ops::Div<&Distance<T>> for &AreaDensity<T> where T: NumLike {
3134 type Output = Density<T>;
3135 fn div(self, rhs: &Distance<T>) -> Self::Output {
3136 Density{kgpm3: self.kgpm2.clone() / rhs.m.clone()}
3137 }
3138}
3139
3140impl<T> core::ops::Mul<InverseDistance<T>> for AreaDensity<T> where T: NumLike {
3143 type Output = Density<T>;
3144 fn mul(self, rhs: InverseDistance<T>) -> Self::Output {
3145 Density{kgpm3: self.kgpm2 * rhs.per_m}
3146 }
3147}
3148impl<T> core::ops::Mul<InverseDistance<T>> for &AreaDensity<T> where T: NumLike {
3150 type Output = Density<T>;
3151 fn mul(self, rhs: InverseDistance<T>) -> Self::Output {
3152 Density{kgpm3: self.kgpm2.clone() * rhs.per_m}
3153 }
3154}
3155impl<T> core::ops::Mul<&InverseDistance<T>> for AreaDensity<T> where T: NumLike {
3157 type Output = Density<T>;
3158 fn mul(self, rhs: &InverseDistance<T>) -> Self::Output {
3159 Density{kgpm3: self.kgpm2 * rhs.per_m.clone()}
3160 }
3161}
3162impl<T> core::ops::Mul<&InverseDistance<T>> for &AreaDensity<T> where T: NumLike {
3164 type Output = Density<T>;
3165 fn mul(self, rhs: &InverseDistance<T>) -> Self::Output {
3166 Density{kgpm3: self.kgpm2.clone() * rhs.per_m.clone()}
3167 }
3168}
3169
3170impl<T> core::ops::Mul<InverseMass<T>> for AreaDensity<T> where T: NumLike {
3173 type Output = InverseArea<T>;
3174 fn mul(self, rhs: InverseMass<T>) -> Self::Output {
3175 InverseArea{per_m2: self.kgpm2 * rhs.per_kg}
3176 }
3177}
3178impl<T> core::ops::Mul<InverseMass<T>> for &AreaDensity<T> where T: NumLike {
3180 type Output = InverseArea<T>;
3181 fn mul(self, rhs: InverseMass<T>) -> Self::Output {
3182 InverseArea{per_m2: self.kgpm2.clone() * rhs.per_kg}
3183 }
3184}
3185impl<T> core::ops::Mul<&InverseMass<T>> for AreaDensity<T> where T: NumLike {
3187 type Output = InverseArea<T>;
3188 fn mul(self, rhs: &InverseMass<T>) -> Self::Output {
3189 InverseArea{per_m2: self.kgpm2 * rhs.per_kg.clone()}
3190 }
3191}
3192impl<T> core::ops::Mul<&InverseMass<T>> for &AreaDensity<T> where T: NumLike {
3194 type Output = InverseArea<T>;
3195 fn mul(self, rhs: &InverseMass<T>) -> Self::Output {
3196 InverseArea{per_m2: self.kgpm2.clone() * rhs.per_kg.clone()}
3197 }
3198}
3199
3200impl<T> core::ops::Div<Mass<T>> for AreaDensity<T> where T: NumLike {
3203 type Output = InverseArea<T>;
3204 fn div(self, rhs: Mass<T>) -> Self::Output {
3205 InverseArea{per_m2: self.kgpm2 / rhs.kg}
3206 }
3207}
3208impl<T> core::ops::Div<Mass<T>> for &AreaDensity<T> where T: NumLike {
3210 type Output = InverseArea<T>;
3211 fn div(self, rhs: Mass<T>) -> Self::Output {
3212 InverseArea{per_m2: self.kgpm2.clone() / rhs.kg}
3213 }
3214}
3215impl<T> core::ops::Div<&Mass<T>> for AreaDensity<T> where T: NumLike {
3217 type Output = InverseArea<T>;
3218 fn div(self, rhs: &Mass<T>) -> Self::Output {
3219 InverseArea{per_m2: self.kgpm2 / rhs.kg.clone()}
3220 }
3221}
3222impl<T> core::ops::Div<&Mass<T>> for &AreaDensity<T> where T: NumLike {
3224 type Output = InverseArea<T>;
3225 fn div(self, rhs: &Mass<T>) -> Self::Output {
3226 InverseArea{per_m2: self.kgpm2.clone() / rhs.kg.clone()}
3227 }
3228}
3229
3230impl<T> core::ops::Mul<Area<T>> for AreaDensity<T> where T: NumLike {
3233 type Output = Mass<T>;
3234 fn mul(self, rhs: Area<T>) -> Self::Output {
3235 Mass{kg: self.kgpm2 * rhs.m2}
3236 }
3237}
3238impl<T> core::ops::Mul<Area<T>> for &AreaDensity<T> where T: NumLike {
3240 type Output = Mass<T>;
3241 fn mul(self, rhs: Area<T>) -> Self::Output {
3242 Mass{kg: self.kgpm2.clone() * rhs.m2}
3243 }
3244}
3245impl<T> core::ops::Mul<&Area<T>> for AreaDensity<T> where T: NumLike {
3247 type Output = Mass<T>;
3248 fn mul(self, rhs: &Area<T>) -> Self::Output {
3249 Mass{kg: self.kgpm2 * rhs.m2.clone()}
3250 }
3251}
3252impl<T> core::ops::Mul<&Area<T>> for &AreaDensity<T> where T: NumLike {
3254 type Output = Mass<T>;
3255 fn mul(self, rhs: &Area<T>) -> Self::Output {
3256 Mass{kg: self.kgpm2.clone() * rhs.m2.clone()}
3257 }
3258}
3259
3260impl<T> core::ops::Div<InverseArea<T>> for AreaDensity<T> where T: NumLike {
3263 type Output = Mass<T>;
3264 fn div(self, rhs: InverseArea<T>) -> Self::Output {
3265 Mass{kg: self.kgpm2 / rhs.per_m2}
3266 }
3267}
3268impl<T> core::ops::Div<InverseArea<T>> for &AreaDensity<T> where T: NumLike {
3270 type Output = Mass<T>;
3271 fn div(self, rhs: InverseArea<T>) -> Self::Output {
3272 Mass{kg: self.kgpm2.clone() / rhs.per_m2}
3273 }
3274}
3275impl<T> core::ops::Div<&InverseArea<T>> for AreaDensity<T> where T: NumLike {
3277 type Output = Mass<T>;
3278 fn div(self, rhs: &InverseArea<T>) -> Self::Output {
3279 Mass{kg: self.kgpm2 / rhs.per_m2.clone()}
3280 }
3281}
3282impl<T> core::ops::Div<&InverseArea<T>> for &AreaDensity<T> where T: NumLike {
3284 type Output = Mass<T>;
3285 fn div(self, rhs: &InverseArea<T>) -> Self::Output {
3286 Mass{kg: self.kgpm2.clone() / rhs.per_m2.clone()}
3287 }
3288}
3289
3290impl<T> core::ops::Mul<Acceleration<T>> for AreaDensity<T> where T: NumLike {
3293 type Output = Pressure<T>;
3294 fn mul(self, rhs: Acceleration<T>) -> Self::Output {
3295 Pressure{Pa: self.kgpm2 * rhs.mps2}
3296 }
3297}
3298impl<T> core::ops::Mul<Acceleration<T>> for &AreaDensity<T> where T: NumLike {
3300 type Output = Pressure<T>;
3301 fn mul(self, rhs: Acceleration<T>) -> Self::Output {
3302 Pressure{Pa: self.kgpm2.clone() * rhs.mps2}
3303 }
3304}
3305impl<T> core::ops::Mul<&Acceleration<T>> for AreaDensity<T> where T: NumLike {
3307 type Output = Pressure<T>;
3308 fn mul(self, rhs: &Acceleration<T>) -> Self::Output {
3309 Pressure{Pa: self.kgpm2 * rhs.mps2.clone()}
3310 }
3311}
3312impl<T> core::ops::Mul<&Acceleration<T>> for &AreaDensity<T> where T: NumLike {
3314 type Output = Pressure<T>;
3315 fn mul(self, rhs: &Acceleration<T>) -> Self::Output {
3316 Pressure{Pa: self.kgpm2.clone() * rhs.mps2.clone()}
3317 }
3318}
3319
3320impl<T> core::ops::Div<Density<T>> for AreaDensity<T> where T: NumLike {
3323 type Output = Distance<T>;
3324 fn div(self, rhs: Density<T>) -> Self::Output {
3325 Distance{m: self.kgpm2 / rhs.kgpm3}
3326 }
3327}
3328impl<T> core::ops::Div<Density<T>> for &AreaDensity<T> where T: NumLike {
3330 type Output = Distance<T>;
3331 fn div(self, rhs: Density<T>) -> Self::Output {
3332 Distance{m: self.kgpm2.clone() / rhs.kgpm3}
3333 }
3334}
3335impl<T> core::ops::Div<&Density<T>> for AreaDensity<T> where T: NumLike {
3337 type Output = Distance<T>;
3338 fn div(self, rhs: &Density<T>) -> Self::Output {
3339 Distance{m: self.kgpm2 / rhs.kgpm3.clone()}
3340 }
3341}
3342impl<T> core::ops::Div<&Density<T>> for &AreaDensity<T> where T: NumLike {
3344 type Output = Distance<T>;
3345 fn div(self, rhs: &Density<T>) -> Self::Output {
3346 Distance{m: self.kgpm2.clone() / rhs.kgpm3.clone()}
3347 }
3348}
3349
3350impl<T> core::ops::Div<InverseAcceleration<T>> for AreaDensity<T> where T: NumLike {
3353 type Output = Pressure<T>;
3354 fn div(self, rhs: InverseAcceleration<T>) -> Self::Output {
3355 Pressure{Pa: self.kgpm2 / rhs.s2pm}
3356 }
3357}
3358impl<T> core::ops::Div<InverseAcceleration<T>> for &AreaDensity<T> where T: NumLike {
3360 type Output = Pressure<T>;
3361 fn div(self, rhs: InverseAcceleration<T>) -> Self::Output {
3362 Pressure{Pa: self.kgpm2.clone() / rhs.s2pm}
3363 }
3364}
3365impl<T> core::ops::Div<&InverseAcceleration<T>> for AreaDensity<T> where T: NumLike {
3367 type Output = Pressure<T>;
3368 fn div(self, rhs: &InverseAcceleration<T>) -> Self::Output {
3369 Pressure{Pa: self.kgpm2 / rhs.s2pm.clone()}
3370 }
3371}
3372impl<T> core::ops::Div<&InverseAcceleration<T>> for &AreaDensity<T> where T: NumLike {
3374 type Output = Pressure<T>;
3375 fn div(self, rhs: &InverseAcceleration<T>) -> Self::Output {
3376 Pressure{Pa: self.kgpm2.clone() / rhs.s2pm.clone()}
3377 }
3378}
3379
3380impl<T> core::ops::Mul<InversePressure<T>> for AreaDensity<T> where T: NumLike {
3383 type Output = InverseAcceleration<T>;
3384 fn mul(self, rhs: InversePressure<T>) -> Self::Output {
3385 InverseAcceleration{s2pm: self.kgpm2 * rhs.per_Pa}
3386 }
3387}
3388impl<T> core::ops::Mul<InversePressure<T>> for &AreaDensity<T> where T: NumLike {
3390 type Output = InverseAcceleration<T>;
3391 fn mul(self, rhs: InversePressure<T>) -> Self::Output {
3392 InverseAcceleration{s2pm: self.kgpm2.clone() * rhs.per_Pa}
3393 }
3394}
3395impl<T> core::ops::Mul<&InversePressure<T>> for AreaDensity<T> where T: NumLike {
3397 type Output = InverseAcceleration<T>;
3398 fn mul(self, rhs: &InversePressure<T>) -> Self::Output {
3399 InverseAcceleration{s2pm: self.kgpm2 * rhs.per_Pa.clone()}
3400 }
3401}
3402impl<T> core::ops::Mul<&InversePressure<T>> for &AreaDensity<T> where T: NumLike {
3404 type Output = InverseAcceleration<T>;
3405 fn mul(self, rhs: &InversePressure<T>) -> Self::Output {
3406 InverseAcceleration{s2pm: self.kgpm2.clone() * rhs.per_Pa.clone()}
3407 }
3408}
3409
3410impl<T> core::ops::Div<Pressure<T>> for AreaDensity<T> where T: NumLike {
3413 type Output = InverseAcceleration<T>;
3414 fn div(self, rhs: Pressure<T>) -> Self::Output {
3415 InverseAcceleration{s2pm: self.kgpm2 / rhs.Pa}
3416 }
3417}
3418impl<T> core::ops::Div<Pressure<T>> for &AreaDensity<T> where T: NumLike {
3420 type Output = InverseAcceleration<T>;
3421 fn div(self, rhs: Pressure<T>) -> Self::Output {
3422 InverseAcceleration{s2pm: self.kgpm2.clone() / rhs.Pa}
3423 }
3424}
3425impl<T> core::ops::Div<&Pressure<T>> for AreaDensity<T> where T: NumLike {
3427 type Output = InverseAcceleration<T>;
3428 fn div(self, rhs: &Pressure<T>) -> Self::Output {
3429 InverseAcceleration{s2pm: self.kgpm2 / rhs.Pa.clone()}
3430 }
3431}
3432impl<T> core::ops::Div<&Pressure<T>> for &AreaDensity<T> where T: NumLike {
3434 type Output = InverseAcceleration<T>;
3435 fn div(self, rhs: &Pressure<T>) -> Self::Output {
3436 InverseAcceleration{s2pm: self.kgpm2.clone() / rhs.Pa.clone()}
3437 }
3438}
3439
3440impl<T> core::ops::Mul<VolumePerMass<T>> for AreaDensity<T> where T: NumLike {
3443 type Output = Distance<T>;
3444 fn mul(self, rhs: VolumePerMass<T>) -> Self::Output {
3445 Distance{m: self.kgpm2 * rhs.m3_per_kg}
3446 }
3447}
3448impl<T> core::ops::Mul<VolumePerMass<T>> for &AreaDensity<T> where T: NumLike {
3450 type Output = Distance<T>;
3451 fn mul(self, rhs: VolumePerMass<T>) -> Self::Output {
3452 Distance{m: self.kgpm2.clone() * rhs.m3_per_kg}
3453 }
3454}
3455impl<T> core::ops::Mul<&VolumePerMass<T>> for AreaDensity<T> where T: NumLike {
3457 type Output = Distance<T>;
3458 fn mul(self, rhs: &VolumePerMass<T>) -> Self::Output {
3459 Distance{m: self.kgpm2 * rhs.m3_per_kg.clone()}
3460 }
3461}
3462impl<T> core::ops::Mul<&VolumePerMass<T>> for &AreaDensity<T> where T: NumLike {
3464 type Output = Distance<T>;
3465 fn mul(self, rhs: &VolumePerMass<T>) -> Self::Output {
3466 Distance{m: self.kgpm2.clone() * rhs.m3_per_kg.clone()}
3467 }
3468}
3469
3470impl<T> core::ops::Div<AreaDensity<T>> for f64 where T: NumLike+From<f64> {
3473 type Output = AreaPerMass<T>;
3474 fn div(self, rhs: AreaDensity<T>) -> Self::Output {
3475 AreaPerMass{m2_per_kg: T::from(self) / rhs.kgpm2}
3476 }
3477}
3478impl<T> core::ops::Div<AreaDensity<T>> for &f64 where T: NumLike+From<f64> {
3480 type Output = AreaPerMass<T>;
3481 fn div(self, rhs: AreaDensity<T>) -> Self::Output {
3482 AreaPerMass{m2_per_kg: T::from(self.clone()) / rhs.kgpm2}
3483 }
3484}
3485impl<T> core::ops::Div<&AreaDensity<T>> for f64 where T: NumLike+From<f64> {
3487 type Output = AreaPerMass<T>;
3488 fn div(self, rhs: &AreaDensity<T>) -> Self::Output {
3489 AreaPerMass{m2_per_kg: T::from(self) / rhs.kgpm2.clone()}
3490 }
3491}
3492impl<T> core::ops::Div<&AreaDensity<T>> for &f64 where T: NumLike+From<f64> {
3494 type Output = AreaPerMass<T>;
3495 fn div(self, rhs: &AreaDensity<T>) -> Self::Output {
3496 AreaPerMass{m2_per_kg: T::from(self.clone()) / rhs.kgpm2.clone()}
3497 }
3498}
3499
3500impl<T> core::ops::Div<AreaDensity<T>> for f32 where T: NumLike+From<f32> {
3503 type Output = AreaPerMass<T>;
3504 fn div(self, rhs: AreaDensity<T>) -> Self::Output {
3505 AreaPerMass{m2_per_kg: T::from(self) / rhs.kgpm2}
3506 }
3507}
3508impl<T> core::ops::Div<AreaDensity<T>> for &f32 where T: NumLike+From<f32> {
3510 type Output = AreaPerMass<T>;
3511 fn div(self, rhs: AreaDensity<T>) -> Self::Output {
3512 AreaPerMass{m2_per_kg: T::from(self.clone()) / rhs.kgpm2}
3513 }
3514}
3515impl<T> core::ops::Div<&AreaDensity<T>> for f32 where T: NumLike+From<f32> {
3517 type Output = AreaPerMass<T>;
3518 fn div(self, rhs: &AreaDensity<T>) -> Self::Output {
3519 AreaPerMass{m2_per_kg: T::from(self) / rhs.kgpm2.clone()}
3520 }
3521}
3522impl<T> core::ops::Div<&AreaDensity<T>> for &f32 where T: NumLike+From<f32> {
3524 type Output = AreaPerMass<T>;
3525 fn div(self, rhs: &AreaDensity<T>) -> Self::Output {
3526 AreaPerMass{m2_per_kg: T::from(self.clone()) / rhs.kgpm2.clone()}
3527 }
3528}
3529
3530impl<T> core::ops::Div<AreaDensity<T>> for i64 where T: NumLike+From<i64> {
3533 type Output = AreaPerMass<T>;
3534 fn div(self, rhs: AreaDensity<T>) -> Self::Output {
3535 AreaPerMass{m2_per_kg: T::from(self) / rhs.kgpm2}
3536 }
3537}
3538impl<T> core::ops::Div<AreaDensity<T>> for &i64 where T: NumLike+From<i64> {
3540 type Output = AreaPerMass<T>;
3541 fn div(self, rhs: AreaDensity<T>) -> Self::Output {
3542 AreaPerMass{m2_per_kg: T::from(self.clone()) / rhs.kgpm2}
3543 }
3544}
3545impl<T> core::ops::Div<&AreaDensity<T>> for i64 where T: NumLike+From<i64> {
3547 type Output = AreaPerMass<T>;
3548 fn div(self, rhs: &AreaDensity<T>) -> Self::Output {
3549 AreaPerMass{m2_per_kg: T::from(self) / rhs.kgpm2.clone()}
3550 }
3551}
3552impl<T> core::ops::Div<&AreaDensity<T>> for &i64 where T: NumLike+From<i64> {
3554 type Output = AreaPerMass<T>;
3555 fn div(self, rhs: &AreaDensity<T>) -> Self::Output {
3556 AreaPerMass{m2_per_kg: T::from(self.clone()) / rhs.kgpm2.clone()}
3557 }
3558}
3559
3560impl<T> core::ops::Div<AreaDensity<T>> for i32 where T: NumLike+From<i32> {
3563 type Output = AreaPerMass<T>;
3564 fn div(self, rhs: AreaDensity<T>) -> Self::Output {
3565 AreaPerMass{m2_per_kg: T::from(self) / rhs.kgpm2}
3566 }
3567}
3568impl<T> core::ops::Div<AreaDensity<T>> for &i32 where T: NumLike+From<i32> {
3570 type Output = AreaPerMass<T>;
3571 fn div(self, rhs: AreaDensity<T>) -> Self::Output {
3572 AreaPerMass{m2_per_kg: T::from(self.clone()) / rhs.kgpm2}
3573 }
3574}
3575impl<T> core::ops::Div<&AreaDensity<T>> for i32 where T: NumLike+From<i32> {
3577 type Output = AreaPerMass<T>;
3578 fn div(self, rhs: &AreaDensity<T>) -> Self::Output {
3579 AreaPerMass{m2_per_kg: T::from(self) / rhs.kgpm2.clone()}
3580 }
3581}
3582impl<T> core::ops::Div<&AreaDensity<T>> for &i32 where T: NumLike+From<i32> {
3584 type Output = AreaPerMass<T>;
3585 fn div(self, rhs: &AreaDensity<T>) -> Self::Output {
3586 AreaPerMass{m2_per_kg: T::from(self.clone()) / rhs.kgpm2.clone()}
3587 }
3588}
3589
3590#[cfg(feature="num-bigfloat")]
3593impl<T> core::ops::Div<AreaDensity<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
3594 type Output = AreaPerMass<T>;
3595 fn div(self, rhs: AreaDensity<T>) -> Self::Output {
3596 AreaPerMass{m2_per_kg: T::from(self) / rhs.kgpm2}
3597 }
3598}
3599#[cfg(feature="num-bigfloat")]
3601impl<T> core::ops::Div<AreaDensity<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
3602 type Output = AreaPerMass<T>;
3603 fn div(self, rhs: AreaDensity<T>) -> Self::Output {
3604 AreaPerMass{m2_per_kg: T::from(self.clone()) / rhs.kgpm2}
3605 }
3606}
3607#[cfg(feature="num-bigfloat")]
3609impl<T> core::ops::Div<&AreaDensity<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
3610 type Output = AreaPerMass<T>;
3611 fn div(self, rhs: &AreaDensity<T>) -> Self::Output {
3612 AreaPerMass{m2_per_kg: T::from(self) / rhs.kgpm2.clone()}
3613 }
3614}
3615#[cfg(feature="num-bigfloat")]
3617impl<T> core::ops::Div<&AreaDensity<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
3618 type Output = AreaPerMass<T>;
3619 fn div(self, rhs: &AreaDensity<T>) -> Self::Output {
3620 AreaPerMass{m2_per_kg: T::from(self.clone()) / rhs.kgpm2.clone()}
3621 }
3622}
3623
3624#[cfg(feature="num-complex")]
3627impl<T> core::ops::Div<AreaDensity<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
3628 type Output = AreaPerMass<T>;
3629 fn div(self, rhs: AreaDensity<T>) -> Self::Output {
3630 AreaPerMass{m2_per_kg: T::from(self) / rhs.kgpm2}
3631 }
3632}
3633#[cfg(feature="num-complex")]
3635impl<T> core::ops::Div<AreaDensity<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
3636 type Output = AreaPerMass<T>;
3637 fn div(self, rhs: AreaDensity<T>) -> Self::Output {
3638 AreaPerMass{m2_per_kg: T::from(self.clone()) / rhs.kgpm2}
3639 }
3640}
3641#[cfg(feature="num-complex")]
3643impl<T> core::ops::Div<&AreaDensity<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
3644 type Output = AreaPerMass<T>;
3645 fn div(self, rhs: &AreaDensity<T>) -> Self::Output {
3646 AreaPerMass{m2_per_kg: T::from(self) / rhs.kgpm2.clone()}
3647 }
3648}
3649#[cfg(feature="num-complex")]
3651impl<T> core::ops::Div<&AreaDensity<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
3652 type Output = AreaPerMass<T>;
3653 fn div(self, rhs: &AreaDensity<T>) -> Self::Output {
3654 AreaPerMass{m2_per_kg: T::from(self.clone()) / rhs.kgpm2.clone()}
3655 }
3656}
3657
3658#[cfg(feature="num-complex")]
3661impl<T> core::ops::Div<AreaDensity<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
3662 type Output = AreaPerMass<T>;
3663 fn div(self, rhs: AreaDensity<T>) -> Self::Output {
3664 AreaPerMass{m2_per_kg: T::from(self) / rhs.kgpm2}
3665 }
3666}
3667#[cfg(feature="num-complex")]
3669impl<T> core::ops::Div<AreaDensity<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
3670 type Output = AreaPerMass<T>;
3671 fn div(self, rhs: AreaDensity<T>) -> Self::Output {
3672 AreaPerMass{m2_per_kg: T::from(self.clone()) / rhs.kgpm2}
3673 }
3674}
3675#[cfg(feature="num-complex")]
3677impl<T> core::ops::Div<&AreaDensity<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
3678 type Output = AreaPerMass<T>;
3679 fn div(self, rhs: &AreaDensity<T>) -> Self::Output {
3680 AreaPerMass{m2_per_kg: T::from(self) / rhs.kgpm2.clone()}
3681 }
3682}
3683#[cfg(feature="num-complex")]
3685impl<T> core::ops::Div<&AreaDensity<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
3686 type Output = AreaPerMass<T>;
3687 fn div(self, rhs: &AreaDensity<T>) -> Self::Output {
3688 AreaPerMass{m2_per_kg: T::from(self.clone()) / rhs.kgpm2.clone()}
3689 }
3690}
3691
3692#[derive(UnitStruct, Debug, Clone)]
3694#[cfg_attr(feature="serde", derive(Serialize, Deserialize))]
3695pub struct AreaPerMass<T: NumLike>{
3696 pub m2_per_kg: T
3698}
3699
3700impl<T> AreaPerMass<T> where T: NumLike {
3701
3702 pub fn unit_name() -> &'static str { "square meters per kilogram" }
3704
3705 pub fn unit_symbol() -> &'static str { "m²/kg" }
3707
3708 pub fn from_m2_per_kg(m2_per_kg: T) -> Self { AreaPerMass{m2_per_kg: m2_per_kg} }
3713
3714 pub fn to_m2_per_kg(&self) -> T { self.m2_per_kg.clone() }
3716
3717 pub fn from_square_meters_per_kilogram(square_meters_per_kilogram: T) -> Self { AreaPerMass{m2_per_kg: square_meters_per_kilogram} }
3722
3723 pub fn to_square_meters_per_kilogram(&self) -> T { self.m2_per_kg.clone() }
3725
3726}
3727
3728impl<T> fmt::Display for AreaPerMass<T> where T: NumLike {
3729 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3730 write!(f, "{} {}", &self.m2_per_kg, Self::unit_symbol())
3731 }
3732}
3733
3734impl<T> AreaPerMass<T> where T: NumLike+From<f64> {
3735
3736 pub fn to_m2_per_g(&self) -> T {
3740 return self.m2_per_kg.clone() * T::from(0.001_f64);
3741 }
3742
3743 pub fn from_m2_per_g(m2_per_g: T) -> Self {
3750 AreaPerMass{m2_per_kg: m2_per_g * T::from(1000.0_f64)}
3751 }
3752
3753 pub fn to_square_meters_per_gram(&self) -> T {
3757 return self.m2_per_kg.clone() * T::from(0.001_f64);
3758 }
3759
3760 pub fn from_square_meters_per_gram(square_meters_per_gram: T) -> Self {
3767 AreaPerMass{m2_per_kg: square_meters_per_gram * T::from(1000.0_f64)}
3768 }
3769
3770 pub fn to_cm2_per_g(&self) -> T {
3774 return self.m2_per_kg.clone() * T::from(10.0_f64);
3775 }
3776
3777 pub fn from_cm2_per_g(cm2_per_g: T) -> Self {
3784 AreaPerMass{m2_per_kg: cm2_per_g * T::from(0.1_f64)}
3785 }
3786
3787 pub fn to_square_centimeters_per_gram(&self) -> T {
3791 return self.m2_per_kg.clone() * T::from(10.0_f64);
3792 }
3793
3794 pub fn from_square_centimeters_per_gram(square_centimeters_per_gram: T) -> Self {
3801 AreaPerMass{m2_per_kg: square_centimeters_per_gram * T::from(0.1_f64)}
3802 }
3803
3804}
3805
3806
3807#[cfg(feature="num-bigfloat")]
3809impl core::ops::Mul<AreaPerMass<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
3810 type Output = AreaPerMass<num_bigfloat::BigFloat>;
3811 fn mul(self, rhs: AreaPerMass<num_bigfloat::BigFloat>) -> Self::Output {
3812 AreaPerMass{m2_per_kg: self * rhs.m2_per_kg}
3813 }
3814}
3815#[cfg(feature="num-bigfloat")]
3817impl core::ops::Mul<AreaPerMass<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
3818 type Output = AreaPerMass<num_bigfloat::BigFloat>;
3819 fn mul(self, rhs: AreaPerMass<num_bigfloat::BigFloat>) -> Self::Output {
3820 AreaPerMass{m2_per_kg: self.clone() * rhs.m2_per_kg}
3821 }
3822}
3823#[cfg(feature="num-bigfloat")]
3825impl core::ops::Mul<&AreaPerMass<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
3826 type Output = AreaPerMass<num_bigfloat::BigFloat>;
3827 fn mul(self, rhs: &AreaPerMass<num_bigfloat::BigFloat>) -> Self::Output {
3828 AreaPerMass{m2_per_kg: self * rhs.m2_per_kg.clone()}
3829 }
3830}
3831#[cfg(feature="num-bigfloat")]
3833impl core::ops::Mul<&AreaPerMass<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
3834 type Output = AreaPerMass<num_bigfloat::BigFloat>;
3835 fn mul(self, rhs: &AreaPerMass<num_bigfloat::BigFloat>) -> Self::Output {
3836 AreaPerMass{m2_per_kg: self.clone() * rhs.m2_per_kg.clone()}
3837 }
3838}
3839
3840#[cfg(feature="num-complex")]
3842impl core::ops::Mul<AreaPerMass<num_complex::Complex32>> for num_complex::Complex32 {
3843 type Output = AreaPerMass<num_complex::Complex32>;
3844 fn mul(self, rhs: AreaPerMass<num_complex::Complex32>) -> Self::Output {
3845 AreaPerMass{m2_per_kg: self * rhs.m2_per_kg}
3846 }
3847}
3848#[cfg(feature="num-complex")]
3850impl core::ops::Mul<AreaPerMass<num_complex::Complex32>> for &num_complex::Complex32 {
3851 type Output = AreaPerMass<num_complex::Complex32>;
3852 fn mul(self, rhs: AreaPerMass<num_complex::Complex32>) -> Self::Output {
3853 AreaPerMass{m2_per_kg: self.clone() * rhs.m2_per_kg}
3854 }
3855}
3856#[cfg(feature="num-complex")]
3858impl core::ops::Mul<&AreaPerMass<num_complex::Complex32>> for num_complex::Complex32 {
3859 type Output = AreaPerMass<num_complex::Complex32>;
3860 fn mul(self, rhs: &AreaPerMass<num_complex::Complex32>) -> Self::Output {
3861 AreaPerMass{m2_per_kg: self * rhs.m2_per_kg.clone()}
3862 }
3863}
3864#[cfg(feature="num-complex")]
3866impl core::ops::Mul<&AreaPerMass<num_complex::Complex32>> for &num_complex::Complex32 {
3867 type Output = AreaPerMass<num_complex::Complex32>;
3868 fn mul(self, rhs: &AreaPerMass<num_complex::Complex32>) -> Self::Output {
3869 AreaPerMass{m2_per_kg: self.clone() * rhs.m2_per_kg.clone()}
3870 }
3871}
3872
3873#[cfg(feature="num-complex")]
3875impl core::ops::Mul<AreaPerMass<num_complex::Complex64>> for num_complex::Complex64 {
3876 type Output = AreaPerMass<num_complex::Complex64>;
3877 fn mul(self, rhs: AreaPerMass<num_complex::Complex64>) -> Self::Output {
3878 AreaPerMass{m2_per_kg: self * rhs.m2_per_kg}
3879 }
3880}
3881#[cfg(feature="num-complex")]
3883impl core::ops::Mul<AreaPerMass<num_complex::Complex64>> for &num_complex::Complex64 {
3884 type Output = AreaPerMass<num_complex::Complex64>;
3885 fn mul(self, rhs: AreaPerMass<num_complex::Complex64>) -> Self::Output {
3886 AreaPerMass{m2_per_kg: self.clone() * rhs.m2_per_kg}
3887 }
3888}
3889#[cfg(feature="num-complex")]
3891impl core::ops::Mul<&AreaPerMass<num_complex::Complex64>> for num_complex::Complex64 {
3892 type Output = AreaPerMass<num_complex::Complex64>;
3893 fn mul(self, rhs: &AreaPerMass<num_complex::Complex64>) -> Self::Output {
3894 AreaPerMass{m2_per_kg: self * rhs.m2_per_kg.clone()}
3895 }
3896}
3897#[cfg(feature="num-complex")]
3899impl core::ops::Mul<&AreaPerMass<num_complex::Complex64>> for &num_complex::Complex64 {
3900 type Output = AreaPerMass<num_complex::Complex64>;
3901 fn mul(self, rhs: &AreaPerMass<num_complex::Complex64>) -> Self::Output {
3902 AreaPerMass{m2_per_kg: self.clone() * rhs.m2_per_kg.clone()}
3903 }
3904}
3905
3906
3907
3908#[cfg(feature = "uom")]
3910impl<T> Into<uom::si::f32::SpecificArea> for AreaPerMass<T> where T: NumLike+Into<f32> {
3911 fn into(self) -> uom::si::f32::SpecificArea {
3912 uom::si::f32::SpecificArea::new::<uom::si::specific_area::square_meter_per_kilogram>(self.m2_per_kg.into())
3913 }
3914}
3915
3916#[cfg(feature = "uom")]
3918impl<T> From<uom::si::f32::SpecificArea> for AreaPerMass<T> where T: NumLike+From<f32> {
3919 fn from(src: uom::si::f32::SpecificArea) -> Self {
3920 AreaPerMass{m2_per_kg: T::from(src.value)}
3921 }
3922}
3923
3924#[cfg(feature = "uom")]
3926impl<T> Into<uom::si::f64::SpecificArea> for AreaPerMass<T> where T: NumLike+Into<f64> {
3927 fn into(self) -> uom::si::f64::SpecificArea {
3928 uom::si::f64::SpecificArea::new::<uom::si::specific_area::square_meter_per_kilogram>(self.m2_per_kg.into())
3929 }
3930}
3931
3932#[cfg(feature = "uom")]
3934impl<T> From<uom::si::f64::SpecificArea> for AreaPerMass<T> where T: NumLike+From<f64> {
3935 fn from(src: uom::si::f64::SpecificArea) -> Self {
3936 AreaPerMass{m2_per_kg: T::from(src.value)}
3937 }
3938}
3939
3940
3941impl<T> core::ops::Mul<Distance<T>> for AreaPerMass<T> where T: NumLike {
3944 type Output = VolumePerMass<T>;
3945 fn mul(self, rhs: Distance<T>) -> Self::Output {
3946 VolumePerMass{m3_per_kg: self.m2_per_kg * rhs.m}
3947 }
3948}
3949impl<T> core::ops::Mul<Distance<T>> for &AreaPerMass<T> where T: NumLike {
3951 type Output = VolumePerMass<T>;
3952 fn mul(self, rhs: Distance<T>) -> Self::Output {
3953 VolumePerMass{m3_per_kg: self.m2_per_kg.clone() * rhs.m}
3954 }
3955}
3956impl<T> core::ops::Mul<&Distance<T>> for AreaPerMass<T> where T: NumLike {
3958 type Output = VolumePerMass<T>;
3959 fn mul(self, rhs: &Distance<T>) -> Self::Output {
3960 VolumePerMass{m3_per_kg: self.m2_per_kg * rhs.m.clone()}
3961 }
3962}
3963impl<T> core::ops::Mul<&Distance<T>> for &AreaPerMass<T> where T: NumLike {
3965 type Output = VolumePerMass<T>;
3966 fn mul(self, rhs: &Distance<T>) -> Self::Output {
3967 VolumePerMass{m3_per_kg: self.m2_per_kg.clone() * rhs.m.clone()}
3968 }
3969}
3970
3971impl<T> core::ops::Div<InverseDistance<T>> for AreaPerMass<T> where T: NumLike {
3974 type Output = VolumePerMass<T>;
3975 fn div(self, rhs: InverseDistance<T>) -> Self::Output {
3976 VolumePerMass{m3_per_kg: self.m2_per_kg / rhs.per_m}
3977 }
3978}
3979impl<T> core::ops::Div<InverseDistance<T>> for &AreaPerMass<T> where T: NumLike {
3981 type Output = VolumePerMass<T>;
3982 fn div(self, rhs: InverseDistance<T>) -> Self::Output {
3983 VolumePerMass{m3_per_kg: self.m2_per_kg.clone() / rhs.per_m}
3984 }
3985}
3986impl<T> core::ops::Div<&InverseDistance<T>> for AreaPerMass<T> where T: NumLike {
3988 type Output = VolumePerMass<T>;
3989 fn div(self, rhs: &InverseDistance<T>) -> Self::Output {
3990 VolumePerMass{m3_per_kg: self.m2_per_kg / rhs.per_m.clone()}
3991 }
3992}
3993impl<T> core::ops::Div<&InverseDistance<T>> for &AreaPerMass<T> where T: NumLike {
3995 type Output = VolumePerMass<T>;
3996 fn div(self, rhs: &InverseDistance<T>) -> Self::Output {
3997 VolumePerMass{m3_per_kg: self.m2_per_kg.clone() / rhs.per_m.clone()}
3998 }
3999}
4000
4001impl<T> core::ops::Div<InverseMass<T>> for AreaPerMass<T> where T: NumLike {
4004 type Output = Area<T>;
4005 fn div(self, rhs: InverseMass<T>) -> Self::Output {
4006 Area{m2: self.m2_per_kg / rhs.per_kg}
4007 }
4008}
4009impl<T> core::ops::Div<InverseMass<T>> for &AreaPerMass<T> where T: NumLike {
4011 type Output = Area<T>;
4012 fn div(self, rhs: InverseMass<T>) -> Self::Output {
4013 Area{m2: self.m2_per_kg.clone() / rhs.per_kg}
4014 }
4015}
4016impl<T> core::ops::Div<&InverseMass<T>> for AreaPerMass<T> where T: NumLike {
4018 type Output = Area<T>;
4019 fn div(self, rhs: &InverseMass<T>) -> Self::Output {
4020 Area{m2: self.m2_per_kg / rhs.per_kg.clone()}
4021 }
4022}
4023impl<T> core::ops::Div<&InverseMass<T>> for &AreaPerMass<T> where T: NumLike {
4025 type Output = Area<T>;
4026 fn div(self, rhs: &InverseMass<T>) -> Self::Output {
4027 Area{m2: self.m2_per_kg.clone() / rhs.per_kg.clone()}
4028 }
4029}
4030
4031impl<T> core::ops::Mul<Mass<T>> for AreaPerMass<T> where T: NumLike {
4034 type Output = Area<T>;
4035 fn mul(self, rhs: Mass<T>) -> Self::Output {
4036 Area{m2: self.m2_per_kg * rhs.kg}
4037 }
4038}
4039impl<T> core::ops::Mul<Mass<T>> for &AreaPerMass<T> where T: NumLike {
4041 type Output = Area<T>;
4042 fn mul(self, rhs: Mass<T>) -> Self::Output {
4043 Area{m2: self.m2_per_kg.clone() * rhs.kg}
4044 }
4045}
4046impl<T> core::ops::Mul<&Mass<T>> for AreaPerMass<T> where T: NumLike {
4048 type Output = Area<T>;
4049 fn mul(self, rhs: &Mass<T>) -> Self::Output {
4050 Area{m2: self.m2_per_kg * rhs.kg.clone()}
4051 }
4052}
4053impl<T> core::ops::Mul<&Mass<T>> for &AreaPerMass<T> where T: NumLike {
4055 type Output = Area<T>;
4056 fn mul(self, rhs: &Mass<T>) -> Self::Output {
4057 Area{m2: self.m2_per_kg.clone() * rhs.kg.clone()}
4058 }
4059}
4060
4061impl<T> core::ops::Div<Area<T>> for AreaPerMass<T> where T: NumLike {
4064 type Output = InverseMass<T>;
4065 fn div(self, rhs: Area<T>) -> Self::Output {
4066 InverseMass{per_kg: self.m2_per_kg / rhs.m2}
4067 }
4068}
4069impl<T> core::ops::Div<Area<T>> for &AreaPerMass<T> where T: NumLike {
4071 type Output = InverseMass<T>;
4072 fn div(self, rhs: Area<T>) -> Self::Output {
4073 InverseMass{per_kg: self.m2_per_kg.clone() / rhs.m2}
4074 }
4075}
4076impl<T> core::ops::Div<&Area<T>> for AreaPerMass<T> where T: NumLike {
4078 type Output = InverseMass<T>;
4079 fn div(self, rhs: &Area<T>) -> Self::Output {
4080 InverseMass{per_kg: self.m2_per_kg / rhs.m2.clone()}
4081 }
4082}
4083impl<T> core::ops::Div<&Area<T>> for &AreaPerMass<T> where T: NumLike {
4085 type Output = InverseMass<T>;
4086 fn div(self, rhs: &Area<T>) -> Self::Output {
4087 InverseMass{per_kg: self.m2_per_kg.clone() / rhs.m2.clone()}
4088 }
4089}
4090
4091impl<T> core::ops::Mul<InverseArea<T>> for AreaPerMass<T> where T: NumLike {
4094 type Output = InverseMass<T>;
4095 fn mul(self, rhs: InverseArea<T>) -> Self::Output {
4096 InverseMass{per_kg: self.m2_per_kg * rhs.per_m2}
4097 }
4098}
4099impl<T> core::ops::Mul<InverseArea<T>> for &AreaPerMass<T> where T: NumLike {
4101 type Output = InverseMass<T>;
4102 fn mul(self, rhs: InverseArea<T>) -> Self::Output {
4103 InverseMass{per_kg: self.m2_per_kg.clone() * rhs.per_m2}
4104 }
4105}
4106impl<T> core::ops::Mul<&InverseArea<T>> for AreaPerMass<T> where T: NumLike {
4108 type Output = InverseMass<T>;
4109 fn mul(self, rhs: &InverseArea<T>) -> Self::Output {
4110 InverseMass{per_kg: self.m2_per_kg * rhs.per_m2.clone()}
4111 }
4112}
4113impl<T> core::ops::Mul<&InverseArea<T>> for &AreaPerMass<T> where T: NumLike {
4115 type Output = InverseMass<T>;
4116 fn mul(self, rhs: &InverseArea<T>) -> Self::Output {
4117 InverseMass{per_kg: self.m2_per_kg.clone() * rhs.per_m2.clone()}
4118 }
4119}
4120
4121impl<T> core::ops::Div<Acceleration<T>> for AreaPerMass<T> where T: NumLike {
4124 type Output = InversePressure<T>;
4125 fn div(self, rhs: Acceleration<T>) -> Self::Output {
4126 InversePressure{per_Pa: self.m2_per_kg / rhs.mps2}
4127 }
4128}
4129impl<T> core::ops::Div<Acceleration<T>> for &AreaPerMass<T> where T: NumLike {
4131 type Output = InversePressure<T>;
4132 fn div(self, rhs: Acceleration<T>) -> Self::Output {
4133 InversePressure{per_Pa: self.m2_per_kg.clone() / rhs.mps2}
4134 }
4135}
4136impl<T> core::ops::Div<&Acceleration<T>> for AreaPerMass<T> where T: NumLike {
4138 type Output = InversePressure<T>;
4139 fn div(self, rhs: &Acceleration<T>) -> Self::Output {
4140 InversePressure{per_Pa: self.m2_per_kg / rhs.mps2.clone()}
4141 }
4142}
4143impl<T> core::ops::Div<&Acceleration<T>> for &AreaPerMass<T> where T: NumLike {
4145 type Output = InversePressure<T>;
4146 fn div(self, rhs: &Acceleration<T>) -> Self::Output {
4147 InversePressure{per_Pa: self.m2_per_kg.clone() / rhs.mps2.clone()}
4148 }
4149}
4150
4151impl<T> core::ops::Mul<Density<T>> for AreaPerMass<T> where T: NumLike {
4154 type Output = InverseDistance<T>;
4155 fn mul(self, rhs: Density<T>) -> Self::Output {
4156 InverseDistance{per_m: self.m2_per_kg * rhs.kgpm3}
4157 }
4158}
4159impl<T> core::ops::Mul<Density<T>> for &AreaPerMass<T> where T: NumLike {
4161 type Output = InverseDistance<T>;
4162 fn mul(self, rhs: Density<T>) -> Self::Output {
4163 InverseDistance{per_m: self.m2_per_kg.clone() * rhs.kgpm3}
4164 }
4165}
4166impl<T> core::ops::Mul<&Density<T>> for AreaPerMass<T> where T: NumLike {
4168 type Output = InverseDistance<T>;
4169 fn mul(self, rhs: &Density<T>) -> Self::Output {
4170 InverseDistance{per_m: self.m2_per_kg * rhs.kgpm3.clone()}
4171 }
4172}
4173impl<T> core::ops::Mul<&Density<T>> for &AreaPerMass<T> where T: NumLike {
4175 type Output = InverseDistance<T>;
4176 fn mul(self, rhs: &Density<T>) -> Self::Output {
4177 InverseDistance{per_m: self.m2_per_kg.clone() * rhs.kgpm3.clone()}
4178 }
4179}
4180
4181impl<T> core::ops::Mul<InverseAcceleration<T>> for AreaPerMass<T> where T: NumLike {
4184 type Output = InversePressure<T>;
4185 fn mul(self, rhs: InverseAcceleration<T>) -> Self::Output {
4186 InversePressure{per_Pa: self.m2_per_kg * rhs.s2pm}
4187 }
4188}
4189impl<T> core::ops::Mul<InverseAcceleration<T>> for &AreaPerMass<T> where T: NumLike {
4191 type Output = InversePressure<T>;
4192 fn mul(self, rhs: InverseAcceleration<T>) -> Self::Output {
4193 InversePressure{per_Pa: self.m2_per_kg.clone() * rhs.s2pm}
4194 }
4195}
4196impl<T> core::ops::Mul<&InverseAcceleration<T>> for AreaPerMass<T> where T: NumLike {
4198 type Output = InversePressure<T>;
4199 fn mul(self, rhs: &InverseAcceleration<T>) -> Self::Output {
4200 InversePressure{per_Pa: self.m2_per_kg * rhs.s2pm.clone()}
4201 }
4202}
4203impl<T> core::ops::Mul<&InverseAcceleration<T>> for &AreaPerMass<T> where T: NumLike {
4205 type Output = InversePressure<T>;
4206 fn mul(self, rhs: &InverseAcceleration<T>) -> Self::Output {
4207 InversePressure{per_Pa: self.m2_per_kg.clone() * rhs.s2pm.clone()}
4208 }
4209}
4210
4211impl<T> core::ops::Div<InversePressure<T>> for AreaPerMass<T> where T: NumLike {
4214 type Output = Acceleration<T>;
4215 fn div(self, rhs: InversePressure<T>) -> Self::Output {
4216 Acceleration{mps2: self.m2_per_kg / rhs.per_Pa}
4217 }
4218}
4219impl<T> core::ops::Div<InversePressure<T>> for &AreaPerMass<T> where T: NumLike {
4221 type Output = Acceleration<T>;
4222 fn div(self, rhs: InversePressure<T>) -> Self::Output {
4223 Acceleration{mps2: self.m2_per_kg.clone() / rhs.per_Pa}
4224 }
4225}
4226impl<T> core::ops::Div<&InversePressure<T>> for AreaPerMass<T> where T: NumLike {
4228 type Output = Acceleration<T>;
4229 fn div(self, rhs: &InversePressure<T>) -> Self::Output {
4230 Acceleration{mps2: self.m2_per_kg / rhs.per_Pa.clone()}
4231 }
4232}
4233impl<T> core::ops::Div<&InversePressure<T>> for &AreaPerMass<T> where T: NumLike {
4235 type Output = Acceleration<T>;
4236 fn div(self, rhs: &InversePressure<T>) -> Self::Output {
4237 Acceleration{mps2: self.m2_per_kg.clone() / rhs.per_Pa.clone()}
4238 }
4239}
4240
4241impl<T> core::ops::Mul<Pressure<T>> for AreaPerMass<T> where T: NumLike {
4244 type Output = Acceleration<T>;
4245 fn mul(self, rhs: Pressure<T>) -> Self::Output {
4246 Acceleration{mps2: self.m2_per_kg * rhs.Pa}
4247 }
4248}
4249impl<T> core::ops::Mul<Pressure<T>> for &AreaPerMass<T> where T: NumLike {
4251 type Output = Acceleration<T>;
4252 fn mul(self, rhs: Pressure<T>) -> Self::Output {
4253 Acceleration{mps2: self.m2_per_kg.clone() * rhs.Pa}
4254 }
4255}
4256impl<T> core::ops::Mul<&Pressure<T>> for AreaPerMass<T> where T: NumLike {
4258 type Output = Acceleration<T>;
4259 fn mul(self, rhs: &Pressure<T>) -> Self::Output {
4260 Acceleration{mps2: self.m2_per_kg * rhs.Pa.clone()}
4261 }
4262}
4263impl<T> core::ops::Mul<&Pressure<T>> for &AreaPerMass<T> where T: NumLike {
4265 type Output = Acceleration<T>;
4266 fn mul(self, rhs: &Pressure<T>) -> Self::Output {
4267 Acceleration{mps2: self.m2_per_kg.clone() * rhs.Pa.clone()}
4268 }
4269}
4270
4271impl<T> core::ops::Div<VolumePerMass<T>> for AreaPerMass<T> where T: NumLike {
4274 type Output = InverseDistance<T>;
4275 fn div(self, rhs: VolumePerMass<T>) -> Self::Output {
4276 InverseDistance{per_m: self.m2_per_kg / rhs.m3_per_kg}
4277 }
4278}
4279impl<T> core::ops::Div<VolumePerMass<T>> for &AreaPerMass<T> where T: NumLike {
4281 type Output = InverseDistance<T>;
4282 fn div(self, rhs: VolumePerMass<T>) -> Self::Output {
4283 InverseDistance{per_m: self.m2_per_kg.clone() / rhs.m3_per_kg}
4284 }
4285}
4286impl<T> core::ops::Div<&VolumePerMass<T>> for AreaPerMass<T> where T: NumLike {
4288 type Output = InverseDistance<T>;
4289 fn div(self, rhs: &VolumePerMass<T>) -> Self::Output {
4290 InverseDistance{per_m: self.m2_per_kg / rhs.m3_per_kg.clone()}
4291 }
4292}
4293impl<T> core::ops::Div<&VolumePerMass<T>> for &AreaPerMass<T> where T: NumLike {
4295 type Output = InverseDistance<T>;
4296 fn div(self, rhs: &VolumePerMass<T>) -> Self::Output {
4297 InverseDistance{per_m: self.m2_per_kg.clone() / rhs.m3_per_kg.clone()}
4298 }
4299}
4300
4301impl<T> core::ops::Div<AreaPerMass<T>> for f64 where T: NumLike+From<f64> {
4304 type Output = AreaDensity<T>;
4305 fn div(self, rhs: AreaPerMass<T>) -> Self::Output {
4306 AreaDensity{kgpm2: T::from(self) / rhs.m2_per_kg}
4307 }
4308}
4309impl<T> core::ops::Div<AreaPerMass<T>> for &f64 where T: NumLike+From<f64> {
4311 type Output = AreaDensity<T>;
4312 fn div(self, rhs: AreaPerMass<T>) -> Self::Output {
4313 AreaDensity{kgpm2: T::from(self.clone()) / rhs.m2_per_kg}
4314 }
4315}
4316impl<T> core::ops::Div<&AreaPerMass<T>> for f64 where T: NumLike+From<f64> {
4318 type Output = AreaDensity<T>;
4319 fn div(self, rhs: &AreaPerMass<T>) -> Self::Output {
4320 AreaDensity{kgpm2: T::from(self) / rhs.m2_per_kg.clone()}
4321 }
4322}
4323impl<T> core::ops::Div<&AreaPerMass<T>> for &f64 where T: NumLike+From<f64> {
4325 type Output = AreaDensity<T>;
4326 fn div(self, rhs: &AreaPerMass<T>) -> Self::Output {
4327 AreaDensity{kgpm2: T::from(self.clone()) / rhs.m2_per_kg.clone()}
4328 }
4329}
4330
4331impl<T> core::ops::Div<AreaPerMass<T>> for f32 where T: NumLike+From<f32> {
4334 type Output = AreaDensity<T>;
4335 fn div(self, rhs: AreaPerMass<T>) -> Self::Output {
4336 AreaDensity{kgpm2: T::from(self) / rhs.m2_per_kg}
4337 }
4338}
4339impl<T> core::ops::Div<AreaPerMass<T>> for &f32 where T: NumLike+From<f32> {
4341 type Output = AreaDensity<T>;
4342 fn div(self, rhs: AreaPerMass<T>) -> Self::Output {
4343 AreaDensity{kgpm2: T::from(self.clone()) / rhs.m2_per_kg}
4344 }
4345}
4346impl<T> core::ops::Div<&AreaPerMass<T>> for f32 where T: NumLike+From<f32> {
4348 type Output = AreaDensity<T>;
4349 fn div(self, rhs: &AreaPerMass<T>) -> Self::Output {
4350 AreaDensity{kgpm2: T::from(self) / rhs.m2_per_kg.clone()}
4351 }
4352}
4353impl<T> core::ops::Div<&AreaPerMass<T>> for &f32 where T: NumLike+From<f32> {
4355 type Output = AreaDensity<T>;
4356 fn div(self, rhs: &AreaPerMass<T>) -> Self::Output {
4357 AreaDensity{kgpm2: T::from(self.clone()) / rhs.m2_per_kg.clone()}
4358 }
4359}
4360
4361impl<T> core::ops::Div<AreaPerMass<T>> for i64 where T: NumLike+From<i64> {
4364 type Output = AreaDensity<T>;
4365 fn div(self, rhs: AreaPerMass<T>) -> Self::Output {
4366 AreaDensity{kgpm2: T::from(self) / rhs.m2_per_kg}
4367 }
4368}
4369impl<T> core::ops::Div<AreaPerMass<T>> for &i64 where T: NumLike+From<i64> {
4371 type Output = AreaDensity<T>;
4372 fn div(self, rhs: AreaPerMass<T>) -> Self::Output {
4373 AreaDensity{kgpm2: T::from(self.clone()) / rhs.m2_per_kg}
4374 }
4375}
4376impl<T> core::ops::Div<&AreaPerMass<T>> for i64 where T: NumLike+From<i64> {
4378 type Output = AreaDensity<T>;
4379 fn div(self, rhs: &AreaPerMass<T>) -> Self::Output {
4380 AreaDensity{kgpm2: T::from(self) / rhs.m2_per_kg.clone()}
4381 }
4382}
4383impl<T> core::ops::Div<&AreaPerMass<T>> for &i64 where T: NumLike+From<i64> {
4385 type Output = AreaDensity<T>;
4386 fn div(self, rhs: &AreaPerMass<T>) -> Self::Output {
4387 AreaDensity{kgpm2: T::from(self.clone()) / rhs.m2_per_kg.clone()}
4388 }
4389}
4390
4391impl<T> core::ops::Div<AreaPerMass<T>> for i32 where T: NumLike+From<i32> {
4394 type Output = AreaDensity<T>;
4395 fn div(self, rhs: AreaPerMass<T>) -> Self::Output {
4396 AreaDensity{kgpm2: T::from(self) / rhs.m2_per_kg}
4397 }
4398}
4399impl<T> core::ops::Div<AreaPerMass<T>> for &i32 where T: NumLike+From<i32> {
4401 type Output = AreaDensity<T>;
4402 fn div(self, rhs: AreaPerMass<T>) -> Self::Output {
4403 AreaDensity{kgpm2: T::from(self.clone()) / rhs.m2_per_kg}
4404 }
4405}
4406impl<T> core::ops::Div<&AreaPerMass<T>> for i32 where T: NumLike+From<i32> {
4408 type Output = AreaDensity<T>;
4409 fn div(self, rhs: &AreaPerMass<T>) -> Self::Output {
4410 AreaDensity{kgpm2: T::from(self) / rhs.m2_per_kg.clone()}
4411 }
4412}
4413impl<T> core::ops::Div<&AreaPerMass<T>> for &i32 where T: NumLike+From<i32> {
4415 type Output = AreaDensity<T>;
4416 fn div(self, rhs: &AreaPerMass<T>) -> Self::Output {
4417 AreaDensity{kgpm2: T::from(self.clone()) / rhs.m2_per_kg.clone()}
4418 }
4419}
4420
4421#[cfg(feature="num-bigfloat")]
4424impl<T> core::ops::Div<AreaPerMass<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
4425 type Output = AreaDensity<T>;
4426 fn div(self, rhs: AreaPerMass<T>) -> Self::Output {
4427 AreaDensity{kgpm2: T::from(self) / rhs.m2_per_kg}
4428 }
4429}
4430#[cfg(feature="num-bigfloat")]
4432impl<T> core::ops::Div<AreaPerMass<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
4433 type Output = AreaDensity<T>;
4434 fn div(self, rhs: AreaPerMass<T>) -> Self::Output {
4435 AreaDensity{kgpm2: T::from(self.clone()) / rhs.m2_per_kg}
4436 }
4437}
4438#[cfg(feature="num-bigfloat")]
4440impl<T> core::ops::Div<&AreaPerMass<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
4441 type Output = AreaDensity<T>;
4442 fn div(self, rhs: &AreaPerMass<T>) -> Self::Output {
4443 AreaDensity{kgpm2: T::from(self) / rhs.m2_per_kg.clone()}
4444 }
4445}
4446#[cfg(feature="num-bigfloat")]
4448impl<T> core::ops::Div<&AreaPerMass<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
4449 type Output = AreaDensity<T>;
4450 fn div(self, rhs: &AreaPerMass<T>) -> Self::Output {
4451 AreaDensity{kgpm2: T::from(self.clone()) / rhs.m2_per_kg.clone()}
4452 }
4453}
4454
4455#[cfg(feature="num-complex")]
4458impl<T> core::ops::Div<AreaPerMass<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
4459 type Output = AreaDensity<T>;
4460 fn div(self, rhs: AreaPerMass<T>) -> Self::Output {
4461 AreaDensity{kgpm2: T::from(self) / rhs.m2_per_kg}
4462 }
4463}
4464#[cfg(feature="num-complex")]
4466impl<T> core::ops::Div<AreaPerMass<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
4467 type Output = AreaDensity<T>;
4468 fn div(self, rhs: AreaPerMass<T>) -> Self::Output {
4469 AreaDensity{kgpm2: T::from(self.clone()) / rhs.m2_per_kg}
4470 }
4471}
4472#[cfg(feature="num-complex")]
4474impl<T> core::ops::Div<&AreaPerMass<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
4475 type Output = AreaDensity<T>;
4476 fn div(self, rhs: &AreaPerMass<T>) -> Self::Output {
4477 AreaDensity{kgpm2: T::from(self) / rhs.m2_per_kg.clone()}
4478 }
4479}
4480#[cfg(feature="num-complex")]
4482impl<T> core::ops::Div<&AreaPerMass<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
4483 type Output = AreaDensity<T>;
4484 fn div(self, rhs: &AreaPerMass<T>) -> Self::Output {
4485 AreaDensity{kgpm2: T::from(self.clone()) / rhs.m2_per_kg.clone()}
4486 }
4487}
4488
4489#[cfg(feature="num-complex")]
4492impl<T> core::ops::Div<AreaPerMass<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
4493 type Output = AreaDensity<T>;
4494 fn div(self, rhs: AreaPerMass<T>) -> Self::Output {
4495 AreaDensity{kgpm2: T::from(self) / rhs.m2_per_kg}
4496 }
4497}
4498#[cfg(feature="num-complex")]
4500impl<T> core::ops::Div<AreaPerMass<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
4501 type Output = AreaDensity<T>;
4502 fn div(self, rhs: AreaPerMass<T>) -> Self::Output {
4503 AreaDensity{kgpm2: T::from(self.clone()) / rhs.m2_per_kg}
4504 }
4505}
4506#[cfg(feature="num-complex")]
4508impl<T> core::ops::Div<&AreaPerMass<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
4509 type Output = AreaDensity<T>;
4510 fn div(self, rhs: &AreaPerMass<T>) -> Self::Output {
4511 AreaDensity{kgpm2: T::from(self) / rhs.m2_per_kg.clone()}
4512 }
4513}
4514#[cfg(feature="num-complex")]
4516impl<T> core::ops::Div<&AreaPerMass<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
4517 type Output = AreaDensity<T>;
4518 fn div(self, rhs: &AreaPerMass<T>) -> Self::Output {
4519 AreaDensity{kgpm2: T::from(self.clone()) / rhs.m2_per_kg.clone()}
4520 }
4521}
4522
4523#[derive(UnitStruct, Debug, Clone)]
4525#[cfg_attr(feature="serde", derive(Serialize, Deserialize))]
4526pub struct Density<T: NumLike>{
4527 pub kgpm3: T
4529}
4530
4531impl<T> Density<T> where T: NumLike {
4532
4533 pub fn unit_name() -> &'static str { "kilograms per cubic meter" }
4535
4536 pub fn unit_symbol() -> &'static str { "kg/m³" }
4538
4539 pub fn from_kgpm3(kgpm3: T) -> Self { Density{kgpm3: kgpm3} }
4544
4545 pub fn to_kgpm3(&self) -> T { self.kgpm3.clone() }
4547
4548 pub fn from_kilograms_per_cubic_meter(kilograms_per_cubic_meter: T) -> Self { Density{kgpm3: kilograms_per_cubic_meter} }
4553
4554 pub fn to_kilograms_per_cubic_meter(&self) -> T { self.kgpm3.clone() }
4556
4557}
4558
4559impl<T> fmt::Display for Density<T> where T: NumLike {
4560 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4561 write!(f, "{} {}", &self.kgpm3, Self::unit_symbol())
4562 }
4563}
4564
4565impl<T> Density<T> where T: NumLike+From<f64> {
4566
4567 pub fn to_kgpL(&self) -> T {
4571 return self.kgpm3.clone() * T::from(0.001_f64);
4572 }
4573
4574 pub fn from_kgpL(kgpL: T) -> Self {
4581 Density{kgpm3: kgpL * T::from(1000.0_f64)}
4582 }
4583
4584 pub fn to_kilograms_per_liter(&self) -> T {
4588 return self.kgpm3.clone() * T::from(0.001_f64);
4589 }
4590
4591 pub fn from_kilograms_per_liter(kilograms_per_liter: T) -> Self {
4598 Density{kgpm3: kilograms_per_liter * T::from(1000.0_f64)}
4599 }
4600
4601 pub fn to_gpcc(&self) -> T {
4605 return self.kgpm3.clone() * T::from(0.001_f64);
4606 }
4607
4608 pub fn from_gpcc(gpcc: T) -> Self {
4615 Density{kgpm3: gpcc * T::from(1000.0_f64)}
4616 }
4617
4618 pub fn to_grams_per_cubic_centimeter(&self) -> T {
4622 return self.kgpm3.clone() * T::from(0.001_f64);
4623 }
4624
4625 pub fn from_grams_per_cubic_centimeter(grams_per_cubic_centimeter: T) -> Self {
4632 Density{kgpm3: grams_per_cubic_centimeter * T::from(1000.0_f64)}
4633 }
4634
4635 pub fn to_gpm3(&self) -> T {
4639 return self.kgpm3.clone() * T::from(1000.0_f64);
4640 }
4641
4642 pub fn from_gpm3(gpm3: T) -> Self {
4649 Density{kgpm3: gpm3 * T::from(0.001_f64)}
4650 }
4651
4652}
4653
4654
4655#[cfg(feature="num-bigfloat")]
4657impl core::ops::Mul<Density<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
4658 type Output = Density<num_bigfloat::BigFloat>;
4659 fn mul(self, rhs: Density<num_bigfloat::BigFloat>) -> Self::Output {
4660 Density{kgpm3: self * rhs.kgpm3}
4661 }
4662}
4663#[cfg(feature="num-bigfloat")]
4665impl core::ops::Mul<Density<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
4666 type Output = Density<num_bigfloat::BigFloat>;
4667 fn mul(self, rhs: Density<num_bigfloat::BigFloat>) -> Self::Output {
4668 Density{kgpm3: self.clone() * rhs.kgpm3}
4669 }
4670}
4671#[cfg(feature="num-bigfloat")]
4673impl core::ops::Mul<&Density<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
4674 type Output = Density<num_bigfloat::BigFloat>;
4675 fn mul(self, rhs: &Density<num_bigfloat::BigFloat>) -> Self::Output {
4676 Density{kgpm3: self * rhs.kgpm3.clone()}
4677 }
4678}
4679#[cfg(feature="num-bigfloat")]
4681impl core::ops::Mul<&Density<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
4682 type Output = Density<num_bigfloat::BigFloat>;
4683 fn mul(self, rhs: &Density<num_bigfloat::BigFloat>) -> Self::Output {
4684 Density{kgpm3: self.clone() * rhs.kgpm3.clone()}
4685 }
4686}
4687
4688#[cfg(feature="num-complex")]
4690impl core::ops::Mul<Density<num_complex::Complex32>> for num_complex::Complex32 {
4691 type Output = Density<num_complex::Complex32>;
4692 fn mul(self, rhs: Density<num_complex::Complex32>) -> Self::Output {
4693 Density{kgpm3: self * rhs.kgpm3}
4694 }
4695}
4696#[cfg(feature="num-complex")]
4698impl core::ops::Mul<Density<num_complex::Complex32>> for &num_complex::Complex32 {
4699 type Output = Density<num_complex::Complex32>;
4700 fn mul(self, rhs: Density<num_complex::Complex32>) -> Self::Output {
4701 Density{kgpm3: self.clone() * rhs.kgpm3}
4702 }
4703}
4704#[cfg(feature="num-complex")]
4706impl core::ops::Mul<&Density<num_complex::Complex32>> for num_complex::Complex32 {
4707 type Output = Density<num_complex::Complex32>;
4708 fn mul(self, rhs: &Density<num_complex::Complex32>) -> Self::Output {
4709 Density{kgpm3: self * rhs.kgpm3.clone()}
4710 }
4711}
4712#[cfg(feature="num-complex")]
4714impl core::ops::Mul<&Density<num_complex::Complex32>> for &num_complex::Complex32 {
4715 type Output = Density<num_complex::Complex32>;
4716 fn mul(self, rhs: &Density<num_complex::Complex32>) -> Self::Output {
4717 Density{kgpm3: self.clone() * rhs.kgpm3.clone()}
4718 }
4719}
4720
4721#[cfg(feature="num-complex")]
4723impl core::ops::Mul<Density<num_complex::Complex64>> for num_complex::Complex64 {
4724 type Output = Density<num_complex::Complex64>;
4725 fn mul(self, rhs: Density<num_complex::Complex64>) -> Self::Output {
4726 Density{kgpm3: self * rhs.kgpm3}
4727 }
4728}
4729#[cfg(feature="num-complex")]
4731impl core::ops::Mul<Density<num_complex::Complex64>> for &num_complex::Complex64 {
4732 type Output = Density<num_complex::Complex64>;
4733 fn mul(self, rhs: Density<num_complex::Complex64>) -> Self::Output {
4734 Density{kgpm3: self.clone() * rhs.kgpm3}
4735 }
4736}
4737#[cfg(feature="num-complex")]
4739impl core::ops::Mul<&Density<num_complex::Complex64>> for num_complex::Complex64 {
4740 type Output = Density<num_complex::Complex64>;
4741 fn mul(self, rhs: &Density<num_complex::Complex64>) -> Self::Output {
4742 Density{kgpm3: self * rhs.kgpm3.clone()}
4743 }
4744}
4745#[cfg(feature="num-complex")]
4747impl core::ops::Mul<&Density<num_complex::Complex64>> for &num_complex::Complex64 {
4748 type Output = Density<num_complex::Complex64>;
4749 fn mul(self, rhs: &Density<num_complex::Complex64>) -> Self::Output {
4750 Density{kgpm3: self.clone() * rhs.kgpm3.clone()}
4751 }
4752}
4753
4754
4755
4756#[cfg(feature = "uom")]
4758impl<T> Into<uom::si::f32::MassDensity> for Density<T> where T: NumLike+Into<f32> {
4759 fn into(self) -> uom::si::f32::MassDensity {
4760 uom::si::f32::MassDensity::new::<uom::si::mass_density::kilogram_per_cubic_meter>(self.kgpm3.into())
4761 }
4762}
4763
4764#[cfg(feature = "uom")]
4766impl<T> From<uom::si::f32::MassDensity> for Density<T> where T: NumLike+From<f32> {
4767 fn from(src: uom::si::f32::MassDensity) -> Self {
4768 Density{kgpm3: T::from(src.value)}
4769 }
4770}
4771
4772#[cfg(feature = "uom")]
4774impl<T> Into<uom::si::f64::MassDensity> for Density<T> where T: NumLike+Into<f64> {
4775 fn into(self) -> uom::si::f64::MassDensity {
4776 uom::si::f64::MassDensity::new::<uom::si::mass_density::kilogram_per_cubic_meter>(self.kgpm3.into())
4777 }
4778}
4779
4780#[cfg(feature = "uom")]
4782impl<T> From<uom::si::f64::MassDensity> for Density<T> where T: NumLike+From<f64> {
4783 fn from(src: uom::si::f64::MassDensity) -> Self {
4784 Density{kgpm3: T::from(src.value)}
4785 }
4786}
4787
4788
4789impl<T> core::ops::Mul<Distance<T>> for Density<T> where T: NumLike {
4792 type Output = AreaDensity<T>;
4793 fn mul(self, rhs: Distance<T>) -> Self::Output {
4794 AreaDensity{kgpm2: self.kgpm3 * rhs.m}
4795 }
4796}
4797impl<T> core::ops::Mul<Distance<T>> for &Density<T> where T: NumLike {
4799 type Output = AreaDensity<T>;
4800 fn mul(self, rhs: Distance<T>) -> Self::Output {
4801 AreaDensity{kgpm2: self.kgpm3.clone() * rhs.m}
4802 }
4803}
4804impl<T> core::ops::Mul<&Distance<T>> for Density<T> where T: NumLike {
4806 type Output = AreaDensity<T>;
4807 fn mul(self, rhs: &Distance<T>) -> Self::Output {
4808 AreaDensity{kgpm2: self.kgpm3 * rhs.m.clone()}
4809 }
4810}
4811impl<T> core::ops::Mul<&Distance<T>> for &Density<T> where T: NumLike {
4813 type Output = AreaDensity<T>;
4814 fn mul(self, rhs: &Distance<T>) -> Self::Output {
4815 AreaDensity{kgpm2: self.kgpm3.clone() * rhs.m.clone()}
4816 }
4817}
4818
4819impl<T> core::ops::Div<InverseDistance<T>> for Density<T> where T: NumLike {
4822 type Output = AreaDensity<T>;
4823 fn div(self, rhs: InverseDistance<T>) -> Self::Output {
4824 AreaDensity{kgpm2: self.kgpm3 / rhs.per_m}
4825 }
4826}
4827impl<T> core::ops::Div<InverseDistance<T>> for &Density<T> where T: NumLike {
4829 type Output = AreaDensity<T>;
4830 fn div(self, rhs: InverseDistance<T>) -> Self::Output {
4831 AreaDensity{kgpm2: self.kgpm3.clone() / rhs.per_m}
4832 }
4833}
4834impl<T> core::ops::Div<&InverseDistance<T>> for Density<T> where T: NumLike {
4836 type Output = AreaDensity<T>;
4837 fn div(self, rhs: &InverseDistance<T>) -> Self::Output {
4838 AreaDensity{kgpm2: self.kgpm3 / rhs.per_m.clone()}
4839 }
4840}
4841impl<T> core::ops::Div<&InverseDistance<T>> for &Density<T> where T: NumLike {
4843 type Output = AreaDensity<T>;
4844 fn div(self, rhs: &InverseDistance<T>) -> Self::Output {
4845 AreaDensity{kgpm2: self.kgpm3.clone() / rhs.per_m.clone()}
4846 }
4847}
4848
4849impl<T> core::ops::Mul<InverseMass<T>> for Density<T> where T: NumLike {
4852 type Output = InverseVolume<T>;
4853 fn mul(self, rhs: InverseMass<T>) -> Self::Output {
4854 InverseVolume{per_m3: self.kgpm3 * rhs.per_kg}
4855 }
4856}
4857impl<T> core::ops::Mul<InverseMass<T>> for &Density<T> where T: NumLike {
4859 type Output = InverseVolume<T>;
4860 fn mul(self, rhs: InverseMass<T>) -> Self::Output {
4861 InverseVolume{per_m3: self.kgpm3.clone() * rhs.per_kg}
4862 }
4863}
4864impl<T> core::ops::Mul<&InverseMass<T>> for Density<T> where T: NumLike {
4866 type Output = InverseVolume<T>;
4867 fn mul(self, rhs: &InverseMass<T>) -> Self::Output {
4868 InverseVolume{per_m3: self.kgpm3 * rhs.per_kg.clone()}
4869 }
4870}
4871impl<T> core::ops::Mul<&InverseMass<T>> for &Density<T> where T: NumLike {
4873 type Output = InverseVolume<T>;
4874 fn mul(self, rhs: &InverseMass<T>) -> Self::Output {
4875 InverseVolume{per_m3: self.kgpm3.clone() * rhs.per_kg.clone()}
4876 }
4877}
4878
4879impl<T> core::ops::Div<Mass<T>> for Density<T> where T: NumLike {
4882 type Output = InverseVolume<T>;
4883 fn div(self, rhs: Mass<T>) -> Self::Output {
4884 InverseVolume{per_m3: self.kgpm3 / rhs.kg}
4885 }
4886}
4887impl<T> core::ops::Div<Mass<T>> for &Density<T> where T: NumLike {
4889 type Output = InverseVolume<T>;
4890 fn div(self, rhs: Mass<T>) -> Self::Output {
4891 InverseVolume{per_m3: self.kgpm3.clone() / rhs.kg}
4892 }
4893}
4894impl<T> core::ops::Div<&Mass<T>> for Density<T> where T: NumLike {
4896 type Output = InverseVolume<T>;
4897 fn div(self, rhs: &Mass<T>) -> Self::Output {
4898 InverseVolume{per_m3: self.kgpm3 / rhs.kg.clone()}
4899 }
4900}
4901impl<T> core::ops::Div<&Mass<T>> for &Density<T> where T: NumLike {
4903 type Output = InverseVolume<T>;
4904 fn div(self, rhs: &Mass<T>) -> Self::Output {
4905 InverseVolume{per_m3: self.kgpm3.clone() / rhs.kg.clone()}
4906 }
4907}
4908
4909impl<T> core::ops::Div<Concentration<T>> for Density<T> where T: NumLike {
4912 type Output = MolarMass<T>;
4913 fn div(self, rhs: Concentration<T>) -> Self::Output {
4914 MolarMass{kgpmol: self.kgpm3 / rhs.molpm3}
4915 }
4916}
4917impl<T> core::ops::Div<Concentration<T>> for &Density<T> where T: NumLike {
4919 type Output = MolarMass<T>;
4920 fn div(self, rhs: Concentration<T>) -> Self::Output {
4921 MolarMass{kgpmol: self.kgpm3.clone() / rhs.molpm3}
4922 }
4923}
4924impl<T> core::ops::Div<&Concentration<T>> for Density<T> where T: NumLike {
4926 type Output = MolarMass<T>;
4927 fn div(self, rhs: &Concentration<T>) -> Self::Output {
4928 MolarMass{kgpmol: self.kgpm3 / rhs.molpm3.clone()}
4929 }
4930}
4931impl<T> core::ops::Div<&Concentration<T>> for &Density<T> where T: NumLike {
4933 type Output = MolarMass<T>;
4934 fn div(self, rhs: &Concentration<T>) -> Self::Output {
4935 MolarMass{kgpmol: self.kgpm3.clone() / rhs.molpm3.clone()}
4936 }
4937}
4938
4939impl<T> core::ops::Mul<Molality<T>> for Density<T> where T: NumLike {
4942 type Output = Concentration<T>;
4943 fn mul(self, rhs: Molality<T>) -> Self::Output {
4944 Concentration{molpm3: self.kgpm3 * rhs.molpkg}
4945 }
4946}
4947impl<T> core::ops::Mul<Molality<T>> for &Density<T> where T: NumLike {
4949 type Output = Concentration<T>;
4950 fn mul(self, rhs: Molality<T>) -> Self::Output {
4951 Concentration{molpm3: self.kgpm3.clone() * rhs.molpkg}
4952 }
4953}
4954impl<T> core::ops::Mul<&Molality<T>> for Density<T> where T: NumLike {
4956 type Output = Concentration<T>;
4957 fn mul(self, rhs: &Molality<T>) -> Self::Output {
4958 Concentration{molpm3: self.kgpm3 * rhs.molpkg.clone()}
4959 }
4960}
4961impl<T> core::ops::Mul<&Molality<T>> for &Density<T> where T: NumLike {
4963 type Output = Concentration<T>;
4964 fn mul(self, rhs: &Molality<T>) -> Self::Output {
4965 Concentration{molpm3: self.kgpm3.clone() * rhs.molpkg.clone()}
4966 }
4967}
4968
4969impl<T> core::ops::Div<MolarMass<T>> for Density<T> where T: NumLike {
4972 type Output = Concentration<T>;
4973 fn div(self, rhs: MolarMass<T>) -> Self::Output {
4974 Concentration{molpm3: self.kgpm3 / rhs.kgpmol}
4975 }
4976}
4977impl<T> core::ops::Div<MolarMass<T>> for &Density<T> where T: NumLike {
4979 type Output = Concentration<T>;
4980 fn div(self, rhs: MolarMass<T>) -> Self::Output {
4981 Concentration{molpm3: self.kgpm3.clone() / rhs.kgpmol}
4982 }
4983}
4984impl<T> core::ops::Div<&MolarMass<T>> for Density<T> where T: NumLike {
4986 type Output = Concentration<T>;
4987 fn div(self, rhs: &MolarMass<T>) -> Self::Output {
4988 Concentration{molpm3: self.kgpm3 / rhs.kgpmol.clone()}
4989 }
4990}
4991impl<T> core::ops::Div<&MolarMass<T>> for &Density<T> where T: NumLike {
4993 type Output = Concentration<T>;
4994 fn div(self, rhs: &MolarMass<T>) -> Self::Output {
4995 Concentration{molpm3: self.kgpm3.clone() / rhs.kgpmol.clone()}
4996 }
4997}
4998
4999impl<T> core::ops::Mul<MolarVolume<T>> for Density<T> where T: NumLike {
5002 type Output = MolarMass<T>;
5003 fn mul(self, rhs: MolarVolume<T>) -> Self::Output {
5004 MolarMass{kgpmol: self.kgpm3 * rhs.m3_per_mol}
5005 }
5006}
5007impl<T> core::ops::Mul<MolarVolume<T>> for &Density<T> where T: NumLike {
5009 type Output = MolarMass<T>;
5010 fn mul(self, rhs: MolarVolume<T>) -> Self::Output {
5011 MolarMass{kgpmol: self.kgpm3.clone() * rhs.m3_per_mol}
5012 }
5013}
5014impl<T> core::ops::Mul<&MolarVolume<T>> for Density<T> where T: NumLike {
5016 type Output = MolarMass<T>;
5017 fn mul(self, rhs: &MolarVolume<T>) -> Self::Output {
5018 MolarMass{kgpmol: self.kgpm3 * rhs.m3_per_mol.clone()}
5019 }
5020}
5021impl<T> core::ops::Mul<&MolarVolume<T>> for &Density<T> where T: NumLike {
5023 type Output = MolarMass<T>;
5024 fn mul(self, rhs: &MolarVolume<T>) -> Self::Output {
5025 MolarMass{kgpmol: self.kgpm3.clone() * rhs.m3_per_mol.clone()}
5026 }
5027}
5028
5029impl<T> core::ops::Div<InverseVolume<T>> for Density<T> where T: NumLike {
5032 type Output = Mass<T>;
5033 fn div(self, rhs: InverseVolume<T>) -> Self::Output {
5034 Mass{kg: self.kgpm3 / rhs.per_m3}
5035 }
5036}
5037impl<T> core::ops::Div<InverseVolume<T>> for &Density<T> where T: NumLike {
5039 type Output = Mass<T>;
5040 fn div(self, rhs: InverseVolume<T>) -> Self::Output {
5041 Mass{kg: self.kgpm3.clone() / rhs.per_m3}
5042 }
5043}
5044impl<T> core::ops::Div<&InverseVolume<T>> for Density<T> where T: NumLike {
5046 type Output = Mass<T>;
5047 fn div(self, rhs: &InverseVolume<T>) -> Self::Output {
5048 Mass{kg: self.kgpm3 / rhs.per_m3.clone()}
5049 }
5050}
5051impl<T> core::ops::Div<&InverseVolume<T>> for &Density<T> where T: NumLike {
5053 type Output = Mass<T>;
5054 fn div(self, rhs: &InverseVolume<T>) -> Self::Output {
5055 Mass{kg: self.kgpm3.clone() / rhs.per_m3.clone()}
5056 }
5057}
5058
5059impl<T> core::ops::Mul<Volume<T>> for Density<T> where T: NumLike {
5062 type Output = Mass<T>;
5063 fn mul(self, rhs: Volume<T>) -> Self::Output {
5064 Mass{kg: self.kgpm3 * rhs.m3}
5065 }
5066}
5067impl<T> core::ops::Mul<Volume<T>> for &Density<T> where T: NumLike {
5069 type Output = Mass<T>;
5070 fn mul(self, rhs: Volume<T>) -> Self::Output {
5071 Mass{kg: self.kgpm3.clone() * rhs.m3}
5072 }
5073}
5074impl<T> core::ops::Mul<&Volume<T>> for Density<T> where T: NumLike {
5076 type Output = Mass<T>;
5077 fn mul(self, rhs: &Volume<T>) -> Self::Output {
5078 Mass{kg: self.kgpm3 * rhs.m3.clone()}
5079 }
5080}
5081impl<T> core::ops::Mul<&Volume<T>> for &Density<T> where T: NumLike {
5083 type Output = Mass<T>;
5084 fn mul(self, rhs: &Volume<T>) -> Self::Output {
5085 Mass{kg: self.kgpm3.clone() * rhs.m3.clone()}
5086 }
5087}
5088
5089impl<T> core::ops::Div<AreaDensity<T>> for Density<T> where T: NumLike {
5092 type Output = InverseDistance<T>;
5093 fn div(self, rhs: AreaDensity<T>) -> Self::Output {
5094 InverseDistance{per_m: self.kgpm3 / rhs.kgpm2}
5095 }
5096}
5097impl<T> core::ops::Div<AreaDensity<T>> for &Density<T> where T: NumLike {
5099 type Output = InverseDistance<T>;
5100 fn div(self, rhs: AreaDensity<T>) -> Self::Output {
5101 InverseDistance{per_m: self.kgpm3.clone() / rhs.kgpm2}
5102 }
5103}
5104impl<T> core::ops::Div<&AreaDensity<T>> for Density<T> where T: NumLike {
5106 type Output = InverseDistance<T>;
5107 fn div(self, rhs: &AreaDensity<T>) -> Self::Output {
5108 InverseDistance{per_m: self.kgpm3 / rhs.kgpm2.clone()}
5109 }
5110}
5111impl<T> core::ops::Div<&AreaDensity<T>> for &Density<T> where T: NumLike {
5113 type Output = InverseDistance<T>;
5114 fn div(self, rhs: &AreaDensity<T>) -> Self::Output {
5115 InverseDistance{per_m: self.kgpm3.clone() / rhs.kgpm2.clone()}
5116 }
5117}
5118
5119impl<T> core::ops::Mul<AreaPerMass<T>> for Density<T> where T: NumLike {
5122 type Output = InverseDistance<T>;
5123 fn mul(self, rhs: AreaPerMass<T>) -> Self::Output {
5124 InverseDistance{per_m: self.kgpm3 * rhs.m2_per_kg}
5125 }
5126}
5127impl<T> core::ops::Mul<AreaPerMass<T>> for &Density<T> where T: NumLike {
5129 type Output = InverseDistance<T>;
5130 fn mul(self, rhs: AreaPerMass<T>) -> Self::Output {
5131 InverseDistance{per_m: self.kgpm3.clone() * rhs.m2_per_kg}
5132 }
5133}
5134impl<T> core::ops::Mul<&AreaPerMass<T>> for Density<T> where T: NumLike {
5136 type Output = InverseDistance<T>;
5137 fn mul(self, rhs: &AreaPerMass<T>) -> Self::Output {
5138 InverseDistance{per_m: self.kgpm3 * rhs.m2_per_kg.clone()}
5139 }
5140}
5141impl<T> core::ops::Mul<&AreaPerMass<T>> for &Density<T> where T: NumLike {
5143 type Output = InverseDistance<T>;
5144 fn mul(self, rhs: &AreaPerMass<T>) -> Self::Output {
5145 InverseDistance{per_m: self.kgpm3.clone() * rhs.m2_per_kg.clone()}
5146 }
5147}
5148
5149impl<T> core::ops::Div<InverseAbsorbedDose<T>> for Density<T> where T: NumLike {
5152 type Output = Pressure<T>;
5153 fn div(self, rhs: InverseAbsorbedDose<T>) -> Self::Output {
5154 Pressure{Pa: self.kgpm3 / rhs.per_Gy}
5155 }
5156}
5157impl<T> core::ops::Div<InverseAbsorbedDose<T>> for &Density<T> where T: NumLike {
5159 type Output = Pressure<T>;
5160 fn div(self, rhs: InverseAbsorbedDose<T>) -> Self::Output {
5161 Pressure{Pa: self.kgpm3.clone() / rhs.per_Gy}
5162 }
5163}
5164impl<T> core::ops::Div<&InverseAbsorbedDose<T>> for Density<T> where T: NumLike {
5166 type Output = Pressure<T>;
5167 fn div(self, rhs: &InverseAbsorbedDose<T>) -> Self::Output {
5168 Pressure{Pa: self.kgpm3 / rhs.per_Gy.clone()}
5169 }
5170}
5171impl<T> core::ops::Div<&InverseAbsorbedDose<T>> for &Density<T> where T: NumLike {
5173 type Output = Pressure<T>;
5174 fn div(self, rhs: &InverseAbsorbedDose<T>) -> Self::Output {
5175 Pressure{Pa: self.kgpm3.clone() / rhs.per_Gy.clone()}
5176 }
5177}
5178
5179impl<T> core::ops::Div<InverseDoseEquivalent<T>> for Density<T> where T: NumLike {
5182 type Output = Pressure<T>;
5183 fn div(self, rhs: InverseDoseEquivalent<T>) -> Self::Output {
5184 Pressure{Pa: self.kgpm3 / rhs.per_Sv}
5185 }
5186}
5187impl<T> core::ops::Div<InverseDoseEquivalent<T>> for &Density<T> where T: NumLike {
5189 type Output = Pressure<T>;
5190 fn div(self, rhs: InverseDoseEquivalent<T>) -> Self::Output {
5191 Pressure{Pa: self.kgpm3.clone() / rhs.per_Sv}
5192 }
5193}
5194impl<T> core::ops::Div<&InverseDoseEquivalent<T>> for Density<T> where T: NumLike {
5196 type Output = Pressure<T>;
5197 fn div(self, rhs: &InverseDoseEquivalent<T>) -> Self::Output {
5198 Pressure{Pa: self.kgpm3 / rhs.per_Sv.clone()}
5199 }
5200}
5201impl<T> core::ops::Div<&InverseDoseEquivalent<T>> for &Density<T> where T: NumLike {
5203 type Output = Pressure<T>;
5204 fn div(self, rhs: &InverseDoseEquivalent<T>) -> Self::Output {
5205 Pressure{Pa: self.kgpm3.clone() / rhs.per_Sv.clone()}
5206 }
5207}
5208
5209impl<T> core::ops::Div<Density<T>> for f64 where T: NumLike+From<f64> {
5212 type Output = VolumePerMass<T>;
5213 fn div(self, rhs: Density<T>) -> Self::Output {
5214 VolumePerMass{m3_per_kg: T::from(self) / rhs.kgpm3}
5215 }
5216}
5217impl<T> core::ops::Div<Density<T>> for &f64 where T: NumLike+From<f64> {
5219 type Output = VolumePerMass<T>;
5220 fn div(self, rhs: Density<T>) -> Self::Output {
5221 VolumePerMass{m3_per_kg: T::from(self.clone()) / rhs.kgpm3}
5222 }
5223}
5224impl<T> core::ops::Div<&Density<T>> for f64 where T: NumLike+From<f64> {
5226 type Output = VolumePerMass<T>;
5227 fn div(self, rhs: &Density<T>) -> Self::Output {
5228 VolumePerMass{m3_per_kg: T::from(self) / rhs.kgpm3.clone()}
5229 }
5230}
5231impl<T> core::ops::Div<&Density<T>> for &f64 where T: NumLike+From<f64> {
5233 type Output = VolumePerMass<T>;
5234 fn div(self, rhs: &Density<T>) -> Self::Output {
5235 VolumePerMass{m3_per_kg: T::from(self.clone()) / rhs.kgpm3.clone()}
5236 }
5237}
5238
5239impl<T> core::ops::Div<Density<T>> for f32 where T: NumLike+From<f32> {
5242 type Output = VolumePerMass<T>;
5243 fn div(self, rhs: Density<T>) -> Self::Output {
5244 VolumePerMass{m3_per_kg: T::from(self) / rhs.kgpm3}
5245 }
5246}
5247impl<T> core::ops::Div<Density<T>> for &f32 where T: NumLike+From<f32> {
5249 type Output = VolumePerMass<T>;
5250 fn div(self, rhs: Density<T>) -> Self::Output {
5251 VolumePerMass{m3_per_kg: T::from(self.clone()) / rhs.kgpm3}
5252 }
5253}
5254impl<T> core::ops::Div<&Density<T>> for f32 where T: NumLike+From<f32> {
5256 type Output = VolumePerMass<T>;
5257 fn div(self, rhs: &Density<T>) -> Self::Output {
5258 VolumePerMass{m3_per_kg: T::from(self) / rhs.kgpm3.clone()}
5259 }
5260}
5261impl<T> core::ops::Div<&Density<T>> for &f32 where T: NumLike+From<f32> {
5263 type Output = VolumePerMass<T>;
5264 fn div(self, rhs: &Density<T>) -> Self::Output {
5265 VolumePerMass{m3_per_kg: T::from(self.clone()) / rhs.kgpm3.clone()}
5266 }
5267}
5268
5269impl<T> core::ops::Div<Density<T>> for i64 where T: NumLike+From<i64> {
5272 type Output = VolumePerMass<T>;
5273 fn div(self, rhs: Density<T>) -> Self::Output {
5274 VolumePerMass{m3_per_kg: T::from(self) / rhs.kgpm3}
5275 }
5276}
5277impl<T> core::ops::Div<Density<T>> for &i64 where T: NumLike+From<i64> {
5279 type Output = VolumePerMass<T>;
5280 fn div(self, rhs: Density<T>) -> Self::Output {
5281 VolumePerMass{m3_per_kg: T::from(self.clone()) / rhs.kgpm3}
5282 }
5283}
5284impl<T> core::ops::Div<&Density<T>> for i64 where T: NumLike+From<i64> {
5286 type Output = VolumePerMass<T>;
5287 fn div(self, rhs: &Density<T>) -> Self::Output {
5288 VolumePerMass{m3_per_kg: T::from(self) / rhs.kgpm3.clone()}
5289 }
5290}
5291impl<T> core::ops::Div<&Density<T>> for &i64 where T: NumLike+From<i64> {
5293 type Output = VolumePerMass<T>;
5294 fn div(self, rhs: &Density<T>) -> Self::Output {
5295 VolumePerMass{m3_per_kg: T::from(self.clone()) / rhs.kgpm3.clone()}
5296 }
5297}
5298
5299impl<T> core::ops::Div<Density<T>> for i32 where T: NumLike+From<i32> {
5302 type Output = VolumePerMass<T>;
5303 fn div(self, rhs: Density<T>) -> Self::Output {
5304 VolumePerMass{m3_per_kg: T::from(self) / rhs.kgpm3}
5305 }
5306}
5307impl<T> core::ops::Div<Density<T>> for &i32 where T: NumLike+From<i32> {
5309 type Output = VolumePerMass<T>;
5310 fn div(self, rhs: Density<T>) -> Self::Output {
5311 VolumePerMass{m3_per_kg: T::from(self.clone()) / rhs.kgpm3}
5312 }
5313}
5314impl<T> core::ops::Div<&Density<T>> for i32 where T: NumLike+From<i32> {
5316 type Output = VolumePerMass<T>;
5317 fn div(self, rhs: &Density<T>) -> Self::Output {
5318 VolumePerMass{m3_per_kg: T::from(self) / rhs.kgpm3.clone()}
5319 }
5320}
5321impl<T> core::ops::Div<&Density<T>> for &i32 where T: NumLike+From<i32> {
5323 type Output = VolumePerMass<T>;
5324 fn div(self, rhs: &Density<T>) -> Self::Output {
5325 VolumePerMass{m3_per_kg: T::from(self.clone()) / rhs.kgpm3.clone()}
5326 }
5327}
5328
5329#[cfg(feature="num-bigfloat")]
5332impl<T> core::ops::Div<Density<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
5333 type Output = VolumePerMass<T>;
5334 fn div(self, rhs: Density<T>) -> Self::Output {
5335 VolumePerMass{m3_per_kg: T::from(self) / rhs.kgpm3}
5336 }
5337}
5338#[cfg(feature="num-bigfloat")]
5340impl<T> core::ops::Div<Density<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
5341 type Output = VolumePerMass<T>;
5342 fn div(self, rhs: Density<T>) -> Self::Output {
5343 VolumePerMass{m3_per_kg: T::from(self.clone()) / rhs.kgpm3}
5344 }
5345}
5346#[cfg(feature="num-bigfloat")]
5348impl<T> core::ops::Div<&Density<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
5349 type Output = VolumePerMass<T>;
5350 fn div(self, rhs: &Density<T>) -> Self::Output {
5351 VolumePerMass{m3_per_kg: T::from(self) / rhs.kgpm3.clone()}
5352 }
5353}
5354#[cfg(feature="num-bigfloat")]
5356impl<T> core::ops::Div<&Density<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
5357 type Output = VolumePerMass<T>;
5358 fn div(self, rhs: &Density<T>) -> Self::Output {
5359 VolumePerMass{m3_per_kg: T::from(self.clone()) / rhs.kgpm3.clone()}
5360 }
5361}
5362
5363#[cfg(feature="num-complex")]
5366impl<T> core::ops::Div<Density<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
5367 type Output = VolumePerMass<T>;
5368 fn div(self, rhs: Density<T>) -> Self::Output {
5369 VolumePerMass{m3_per_kg: T::from(self) / rhs.kgpm3}
5370 }
5371}
5372#[cfg(feature="num-complex")]
5374impl<T> core::ops::Div<Density<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
5375 type Output = VolumePerMass<T>;
5376 fn div(self, rhs: Density<T>) -> Self::Output {
5377 VolumePerMass{m3_per_kg: T::from(self.clone()) / rhs.kgpm3}
5378 }
5379}
5380#[cfg(feature="num-complex")]
5382impl<T> core::ops::Div<&Density<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
5383 type Output = VolumePerMass<T>;
5384 fn div(self, rhs: &Density<T>) -> Self::Output {
5385 VolumePerMass{m3_per_kg: T::from(self) / rhs.kgpm3.clone()}
5386 }
5387}
5388#[cfg(feature="num-complex")]
5390impl<T> core::ops::Div<&Density<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
5391 type Output = VolumePerMass<T>;
5392 fn div(self, rhs: &Density<T>) -> Self::Output {
5393 VolumePerMass{m3_per_kg: T::from(self.clone()) / rhs.kgpm3.clone()}
5394 }
5395}
5396
5397#[cfg(feature="num-complex")]
5400impl<T> core::ops::Div<Density<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
5401 type Output = VolumePerMass<T>;
5402 fn div(self, rhs: Density<T>) -> Self::Output {
5403 VolumePerMass{m3_per_kg: T::from(self) / rhs.kgpm3}
5404 }
5405}
5406#[cfg(feature="num-complex")]
5408impl<T> core::ops::Div<Density<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
5409 type Output = VolumePerMass<T>;
5410 fn div(self, rhs: Density<T>) -> Self::Output {
5411 VolumePerMass{m3_per_kg: T::from(self.clone()) / rhs.kgpm3}
5412 }
5413}
5414#[cfg(feature="num-complex")]
5416impl<T> core::ops::Div<&Density<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
5417 type Output = VolumePerMass<T>;
5418 fn div(self, rhs: &Density<T>) -> Self::Output {
5419 VolumePerMass{m3_per_kg: T::from(self) / rhs.kgpm3.clone()}
5420 }
5421}
5422#[cfg(feature="num-complex")]
5424impl<T> core::ops::Div<&Density<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
5425 type Output = VolumePerMass<T>;
5426 fn div(self, rhs: &Density<T>) -> Self::Output {
5427 VolumePerMass{m3_per_kg: T::from(self.clone()) / rhs.kgpm3.clone()}
5428 }
5429}
5430
5431#[derive(UnitStruct, Debug, Clone)]
5433#[cfg_attr(feature="serde", derive(Serialize, Deserialize))]
5434pub struct Energy<T: NumLike>{
5435 pub J: T
5437}
5438
5439impl<T> Energy<T> where T: NumLike {
5440
5441 pub fn unit_name() -> &'static str { "joules" }
5443
5444 pub fn unit_symbol() -> &'static str { "J" }
5446
5447 pub fn from_J(J: T) -> Self { Energy{J: J} }
5452
5453 pub fn to_J(&self) -> T { self.J.clone() }
5455
5456 pub fn from_joules(joules: T) -> Self { Energy{J: joules} }
5461
5462 pub fn to_joules(&self) -> T { self.J.clone() }
5464
5465}
5466
5467impl<T> fmt::Display for Energy<T> where T: NumLike {
5468 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5469 write!(f, "{} {}", &self.J, Self::unit_symbol())
5470 }
5471}
5472
5473impl<T> Energy<T> where T: NumLike+From<f64> {
5474
5475 pub fn to_mJ(&self) -> T {
5479 return self.J.clone() * T::from(1000.0_f64);
5480 }
5481
5482 pub fn from_mJ(mJ: T) -> Self {
5489 Energy{J: mJ * T::from(0.001_f64)}
5490 }
5491
5492 pub fn to_uJ(&self) -> T {
5496 return self.J.clone() * T::from(1000000.0_f64);
5497 }
5498
5499 pub fn from_uJ(uJ: T) -> Self {
5506 Energy{J: uJ * T::from(1e-06_f64)}
5507 }
5508
5509 pub fn to_nJ(&self) -> T {
5513 return self.J.clone() * T::from(1000000000.0_f64);
5514 }
5515
5516 pub fn from_nJ(nJ: T) -> Self {
5523 Energy{J: nJ * T::from(1e-09_f64)}
5524 }
5525
5526 pub fn to_kJ(&self) -> T {
5530 return self.J.clone() * T::from(0.001_f64);
5531 }
5532
5533 pub fn from_kJ(kJ: T) -> Self {
5540 Energy{J: kJ * T::from(1000.0_f64)}
5541 }
5542
5543 pub fn to_MJ(&self) -> T {
5547 return self.J.clone() * T::from(1e-06_f64);
5548 }
5549
5550 pub fn from_MJ(MJ: T) -> Self {
5557 Energy{J: MJ * T::from(1000000.0_f64)}
5558 }
5559
5560 pub fn to_GJ(&self) -> T {
5564 return self.J.clone() * T::from(1e-09_f64);
5565 }
5566
5567 pub fn from_GJ(GJ: T) -> Self {
5574 Energy{J: GJ * T::from(1000000000.0_f64)}
5575 }
5576
5577 pub fn to_cal(&self) -> T {
5581 return self.J.clone() * T::from(0.239005736137667_f64);
5582 }
5583
5584 pub fn from_cal(cal: T) -> Self {
5591 Energy{J: cal * T::from(4.184_f64)}
5592 }
5593
5594 pub fn to_kcal(&self) -> T {
5598 return self.J.clone() * T::from(0.0002390057361376_f64);
5599 }
5600
5601 pub fn from_kcal(kcal: T) -> Self {
5608 Energy{J: kcal * T::from(4184.0_f64)}
5609 }
5610
5611 pub fn to_Whr(&self) -> T {
5615 return self.J.clone() * T::from(0.0002777777777777_f64);
5616 }
5617
5618 pub fn from_Whr(Whr: T) -> Self {
5625 Energy{J: Whr * T::from(3600.0_f64)}
5626 }
5627
5628 pub fn to_kWhr(&self) -> T {
5632 return self.J.clone() * T::from(2.77777777777778e-07_f64);
5633 }
5634
5635 pub fn from_kWhr(kWhr: T) -> Self {
5642 Energy{J: kWhr * T::from(3600000.0_f64)}
5643 }
5644
5645 pub fn to_eV(&self) -> T {
5649 return self.J.clone() * T::from(6.24150907446076e+18_f64);
5650 }
5651
5652 pub fn from_eV(eV: T) -> Self {
5659 Energy{J: eV * T::from(1.6021766340000001e-19_f64)}
5660 }
5661
5662 pub fn to_BTU(&self) -> T {
5666 return self.J.clone() * T::from(0.0009478672985781_f64);
5667 }
5668
5669 pub fn from_BTU(BTU: T) -> Self {
5676 Energy{J: BTU * T::from(1055.0_f64)}
5677 }
5678
5679}
5680
5681
5682#[cfg(feature="num-bigfloat")]
5684impl core::ops::Mul<Energy<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
5685 type Output = Energy<num_bigfloat::BigFloat>;
5686 fn mul(self, rhs: Energy<num_bigfloat::BigFloat>) -> Self::Output {
5687 Energy{J: self * rhs.J}
5688 }
5689}
5690#[cfg(feature="num-bigfloat")]
5692impl core::ops::Mul<Energy<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
5693 type Output = Energy<num_bigfloat::BigFloat>;
5694 fn mul(self, rhs: Energy<num_bigfloat::BigFloat>) -> Self::Output {
5695 Energy{J: self.clone() * rhs.J}
5696 }
5697}
5698#[cfg(feature="num-bigfloat")]
5700impl core::ops::Mul<&Energy<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
5701 type Output = Energy<num_bigfloat::BigFloat>;
5702 fn mul(self, rhs: &Energy<num_bigfloat::BigFloat>) -> Self::Output {
5703 Energy{J: self * rhs.J.clone()}
5704 }
5705}
5706#[cfg(feature="num-bigfloat")]
5708impl core::ops::Mul<&Energy<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
5709 type Output = Energy<num_bigfloat::BigFloat>;
5710 fn mul(self, rhs: &Energy<num_bigfloat::BigFloat>) -> Self::Output {
5711 Energy{J: self.clone() * rhs.J.clone()}
5712 }
5713}
5714
5715#[cfg(feature="num-complex")]
5717impl core::ops::Mul<Energy<num_complex::Complex32>> for num_complex::Complex32 {
5718 type Output = Energy<num_complex::Complex32>;
5719 fn mul(self, rhs: Energy<num_complex::Complex32>) -> Self::Output {
5720 Energy{J: self * rhs.J}
5721 }
5722}
5723#[cfg(feature="num-complex")]
5725impl core::ops::Mul<Energy<num_complex::Complex32>> for &num_complex::Complex32 {
5726 type Output = Energy<num_complex::Complex32>;
5727 fn mul(self, rhs: Energy<num_complex::Complex32>) -> Self::Output {
5728 Energy{J: self.clone() * rhs.J}
5729 }
5730}
5731#[cfg(feature="num-complex")]
5733impl core::ops::Mul<&Energy<num_complex::Complex32>> for num_complex::Complex32 {
5734 type Output = Energy<num_complex::Complex32>;
5735 fn mul(self, rhs: &Energy<num_complex::Complex32>) -> Self::Output {
5736 Energy{J: self * rhs.J.clone()}
5737 }
5738}
5739#[cfg(feature="num-complex")]
5741impl core::ops::Mul<&Energy<num_complex::Complex32>> for &num_complex::Complex32 {
5742 type Output = Energy<num_complex::Complex32>;
5743 fn mul(self, rhs: &Energy<num_complex::Complex32>) -> Self::Output {
5744 Energy{J: self.clone() * rhs.J.clone()}
5745 }
5746}
5747
5748#[cfg(feature="num-complex")]
5750impl core::ops::Mul<Energy<num_complex::Complex64>> for num_complex::Complex64 {
5751 type Output = Energy<num_complex::Complex64>;
5752 fn mul(self, rhs: Energy<num_complex::Complex64>) -> Self::Output {
5753 Energy{J: self * rhs.J}
5754 }
5755}
5756#[cfg(feature="num-complex")]
5758impl core::ops::Mul<Energy<num_complex::Complex64>> for &num_complex::Complex64 {
5759 type Output = Energy<num_complex::Complex64>;
5760 fn mul(self, rhs: Energy<num_complex::Complex64>) -> Self::Output {
5761 Energy{J: self.clone() * rhs.J}
5762 }
5763}
5764#[cfg(feature="num-complex")]
5766impl core::ops::Mul<&Energy<num_complex::Complex64>> for num_complex::Complex64 {
5767 type Output = Energy<num_complex::Complex64>;
5768 fn mul(self, rhs: &Energy<num_complex::Complex64>) -> Self::Output {
5769 Energy{J: self * rhs.J.clone()}
5770 }
5771}
5772#[cfg(feature="num-complex")]
5774impl core::ops::Mul<&Energy<num_complex::Complex64>> for &num_complex::Complex64 {
5775 type Output = Energy<num_complex::Complex64>;
5776 fn mul(self, rhs: &Energy<num_complex::Complex64>) -> Self::Output {
5777 Energy{J: self.clone() * rhs.J.clone()}
5778 }
5779}
5780
5781
5782
5783#[cfg(feature = "uom")]
5785impl<T> Into<uom::si::f32::Energy> for Energy<T> where T: NumLike+Into<f32> {
5786 fn into(self) -> uom::si::f32::Energy {
5787 uom::si::f32::Energy::new::<uom::si::energy::joule>(self.J.into())
5788 }
5789}
5790
5791#[cfg(feature = "uom")]
5793impl<T> From<uom::si::f32::Energy> for Energy<T> where T: NumLike+From<f32> {
5794 fn from(src: uom::si::f32::Energy) -> Self {
5795 Energy{J: T::from(src.value)}
5796 }
5797}
5798
5799#[cfg(feature = "uom")]
5801impl<T> Into<uom::si::f64::Energy> for Energy<T> where T: NumLike+Into<f64> {
5802 fn into(self) -> uom::si::f64::Energy {
5803 uom::si::f64::Energy::new::<uom::si::energy::joule>(self.J.into())
5804 }
5805}
5806
5807#[cfg(feature = "uom")]
5809impl<T> From<uom::si::f64::Energy> for Energy<T> where T: NumLike+From<f64> {
5810 fn from(src: uom::si::f64::Energy) -> Self {
5811 Energy{J: T::from(src.value)}
5812 }
5813}
5814
5815
5816impl<T> core::ops::Div<Current<T>> for Energy<T> where T: NumLike {
5819 type Output = MagneticFlux<T>;
5820 fn div(self, rhs: Current<T>) -> Self::Output {
5821 MagneticFlux{Wb: self.J / rhs.A}
5822 }
5823}
5824impl<T> core::ops::Div<Current<T>> for &Energy<T> where T: NumLike {
5826 type Output = MagneticFlux<T>;
5827 fn div(self, rhs: Current<T>) -> Self::Output {
5828 MagneticFlux{Wb: self.J.clone() / rhs.A}
5829 }
5830}
5831impl<T> core::ops::Div<&Current<T>> for Energy<T> where T: NumLike {
5833 type Output = MagneticFlux<T>;
5834 fn div(self, rhs: &Current<T>) -> Self::Output {
5835 MagneticFlux{Wb: self.J / rhs.A.clone()}
5836 }
5837}
5838impl<T> core::ops::Div<&Current<T>> for &Energy<T> where T: NumLike {
5840 type Output = MagneticFlux<T>;
5841 fn div(self, rhs: &Current<T>) -> Self::Output {
5842 MagneticFlux{Wb: self.J.clone() / rhs.A.clone()}
5843 }
5844}
5845
5846impl<T> core::ops::Div<Distance<T>> for Energy<T> where T: NumLike {
5849 type Output = Force<T>;
5850 fn div(self, rhs: Distance<T>) -> Self::Output {
5851 Force{N: self.J / rhs.m}
5852 }
5853}
5854impl<T> core::ops::Div<Distance<T>> for &Energy<T> where T: NumLike {
5856 type Output = Force<T>;
5857 fn div(self, rhs: Distance<T>) -> Self::Output {
5858 Force{N: self.J.clone() / rhs.m}
5859 }
5860}
5861impl<T> core::ops::Div<&Distance<T>> for Energy<T> where T: NumLike {
5863 type Output = Force<T>;
5864 fn div(self, rhs: &Distance<T>) -> Self::Output {
5865 Force{N: self.J / rhs.m.clone()}
5866 }
5867}
5868impl<T> core::ops::Div<&Distance<T>> for &Energy<T> where T: NumLike {
5870 type Output = Force<T>;
5871 fn div(self, rhs: &Distance<T>) -> Self::Output {
5872 Force{N: self.J.clone() / rhs.m.clone()}
5873 }
5874}
5875
5876impl<T> core::ops::Mul<InverseCurrent<T>> for Energy<T> where T: NumLike {
5879 type Output = MagneticFlux<T>;
5880 fn mul(self, rhs: InverseCurrent<T>) -> Self::Output {
5881 MagneticFlux{Wb: self.J * rhs.per_A}
5882 }
5883}
5884impl<T> core::ops::Mul<InverseCurrent<T>> for &Energy<T> where T: NumLike {
5886 type Output = MagneticFlux<T>;
5887 fn mul(self, rhs: InverseCurrent<T>) -> Self::Output {
5888 MagneticFlux{Wb: self.J.clone() * rhs.per_A}
5889 }
5890}
5891impl<T> core::ops::Mul<&InverseCurrent<T>> for Energy<T> where T: NumLike {
5893 type Output = MagneticFlux<T>;
5894 fn mul(self, rhs: &InverseCurrent<T>) -> Self::Output {
5895 MagneticFlux{Wb: self.J * rhs.per_A.clone()}
5896 }
5897}
5898impl<T> core::ops::Mul<&InverseCurrent<T>> for &Energy<T> where T: NumLike {
5900 type Output = MagneticFlux<T>;
5901 fn mul(self, rhs: &InverseCurrent<T>) -> Self::Output {
5902 MagneticFlux{Wb: self.J.clone() * rhs.per_A.clone()}
5903 }
5904}
5905
5906impl<T> core::ops::Mul<InverseDistance<T>> for Energy<T> where T: NumLike {
5909 type Output = Force<T>;
5910 fn mul(self, rhs: InverseDistance<T>) -> Self::Output {
5911 Force{N: self.J * rhs.per_m}
5912 }
5913}
5914impl<T> core::ops::Mul<InverseDistance<T>> for &Energy<T> where T: NumLike {
5916 type Output = Force<T>;
5917 fn mul(self, rhs: InverseDistance<T>) -> Self::Output {
5918 Force{N: self.J.clone() * rhs.per_m}
5919 }
5920}
5921impl<T> core::ops::Mul<&InverseDistance<T>> for Energy<T> where T: NumLike {
5923 type Output = Force<T>;
5924 fn mul(self, rhs: &InverseDistance<T>) -> Self::Output {
5925 Force{N: self.J * rhs.per_m.clone()}
5926 }
5927}
5928impl<T> core::ops::Mul<&InverseDistance<T>> for &Energy<T> where T: NumLike {
5930 type Output = Force<T>;
5931 fn mul(self, rhs: &InverseDistance<T>) -> Self::Output {
5932 Force{N: self.J.clone() * rhs.per_m.clone()}
5933 }
5934}
5935
5936impl<T> core::ops::Div<Time<T>> for Energy<T> where T: NumLike {
5939 type Output = Power<T>;
5940 fn div(self, rhs: Time<T>) -> Self::Output {
5941 Power{W: self.J / rhs.s}
5942 }
5943}
5944impl<T> core::ops::Div<Time<T>> for &Energy<T> where T: NumLike {
5946 type Output = Power<T>;
5947 fn div(self, rhs: Time<T>) -> Self::Output {
5948 Power{W: self.J.clone() / rhs.s}
5949 }
5950}
5951impl<T> core::ops::Div<&Time<T>> for Energy<T> where T: NumLike {
5953 type Output = Power<T>;
5954 fn div(self, rhs: &Time<T>) -> Self::Output {
5955 Power{W: self.J / rhs.s.clone()}
5956 }
5957}
5958impl<T> core::ops::Div<&Time<T>> for &Energy<T> where T: NumLike {
5960 type Output = Power<T>;
5961 fn div(self, rhs: &Time<T>) -> Self::Output {
5962 Power{W: self.J.clone() / rhs.s.clone()}
5963 }
5964}
5965
5966impl<T> core::ops::Div<Charge<T>> for Energy<T> where T: NumLike {
5969 type Output = Voltage<T>;
5970 fn div(self, rhs: Charge<T>) -> Self::Output {
5971 Voltage{V: self.J / rhs.C}
5972 }
5973}
5974impl<T> core::ops::Div<Charge<T>> for &Energy<T> where T: NumLike {
5976 type Output = Voltage<T>;
5977 fn div(self, rhs: Charge<T>) -> Self::Output {
5978 Voltage{V: self.J.clone() / rhs.C}
5979 }
5980}
5981impl<T> core::ops::Div<&Charge<T>> for Energy<T> where T: NumLike {
5983 type Output = Voltage<T>;
5984 fn div(self, rhs: &Charge<T>) -> Self::Output {
5985 Voltage{V: self.J / rhs.C.clone()}
5986 }
5987}
5988impl<T> core::ops::Div<&Charge<T>> for &Energy<T> where T: NumLike {
5990 type Output = Voltage<T>;
5991 fn div(self, rhs: &Charge<T>) -> Self::Output {
5992 Voltage{V: self.J.clone() / rhs.C.clone()}
5993 }
5994}
5995
5996impl<T> core::ops::Mul<InverseCharge<T>> for Energy<T> where T: NumLike {
5999 type Output = Voltage<T>;
6000 fn mul(self, rhs: InverseCharge<T>) -> Self::Output {
6001 Voltage{V: self.J * rhs.per_C}
6002 }
6003}
6004impl<T> core::ops::Mul<InverseCharge<T>> for &Energy<T> where T: NumLike {
6006 type Output = Voltage<T>;
6007 fn mul(self, rhs: InverseCharge<T>) -> Self::Output {
6008 Voltage{V: self.J.clone() * rhs.per_C}
6009 }
6010}
6011impl<T> core::ops::Mul<&InverseCharge<T>> for Energy<T> where T: NumLike {
6013 type Output = Voltage<T>;
6014 fn mul(self, rhs: &InverseCharge<T>) -> Self::Output {
6015 Voltage{V: self.J * rhs.per_C.clone()}
6016 }
6017}
6018impl<T> core::ops::Mul<&InverseCharge<T>> for &Energy<T> where T: NumLike {
6020 type Output = Voltage<T>;
6021 fn mul(self, rhs: &InverseCharge<T>) -> Self::Output {
6022 Voltage{V: self.J.clone() * rhs.per_C.clone()}
6023 }
6024}
6025
6026impl<T> core::ops::Mul<InverseMagneticFlux<T>> for Energy<T> where T: NumLike {
6029 type Output = Current<T>;
6030 fn mul(self, rhs: InverseMagneticFlux<T>) -> Self::Output {
6031 Current{A: self.J * rhs.per_Wb}
6032 }
6033}
6034impl<T> core::ops::Mul<InverseMagneticFlux<T>> for &Energy<T> where T: NumLike {
6036 type Output = Current<T>;
6037 fn mul(self, rhs: InverseMagneticFlux<T>) -> Self::Output {
6038 Current{A: self.J.clone() * rhs.per_Wb}
6039 }
6040}
6041impl<T> core::ops::Mul<&InverseMagneticFlux<T>> for Energy<T> where T: NumLike {
6043 type Output = Current<T>;
6044 fn mul(self, rhs: &InverseMagneticFlux<T>) -> Self::Output {
6045 Current{A: self.J * rhs.per_Wb.clone()}
6046 }
6047}
6048impl<T> core::ops::Mul<&InverseMagneticFlux<T>> for &Energy<T> where T: NumLike {
6050 type Output = Current<T>;
6051 fn mul(self, rhs: &InverseMagneticFlux<T>) -> Self::Output {
6052 Current{A: self.J.clone() * rhs.per_Wb.clone()}
6053 }
6054}
6055
6056impl<T> core::ops::Mul<InverseVoltage<T>> for Energy<T> where T: NumLike {
6059 type Output = Charge<T>;
6060 fn mul(self, rhs: InverseVoltage<T>) -> Self::Output {
6061 Charge{C: self.J * rhs.per_V}
6062 }
6063}
6064impl<T> core::ops::Mul<InverseVoltage<T>> for &Energy<T> where T: NumLike {
6066 type Output = Charge<T>;
6067 fn mul(self, rhs: InverseVoltage<T>) -> Self::Output {
6068 Charge{C: self.J.clone() * rhs.per_V}
6069 }
6070}
6071impl<T> core::ops::Mul<&InverseVoltage<T>> for Energy<T> where T: NumLike {
6073 type Output = Charge<T>;
6074 fn mul(self, rhs: &InverseVoltage<T>) -> Self::Output {
6075 Charge{C: self.J * rhs.per_V.clone()}
6076 }
6077}
6078impl<T> core::ops::Mul<&InverseVoltage<T>> for &Energy<T> where T: NumLike {
6080 type Output = Charge<T>;
6081 fn mul(self, rhs: &InverseVoltage<T>) -> Self::Output {
6082 Charge{C: self.J.clone() * rhs.per_V.clone()}
6083 }
6084}
6085
6086impl<T> core::ops::Div<MagneticFlux<T>> for Energy<T> where T: NumLike {
6089 type Output = Current<T>;
6090 fn div(self, rhs: MagneticFlux<T>) -> Self::Output {
6091 Current{A: self.J / rhs.Wb}
6092 }
6093}
6094impl<T> core::ops::Div<MagneticFlux<T>> for &Energy<T> where T: NumLike {
6096 type Output = Current<T>;
6097 fn div(self, rhs: MagneticFlux<T>) -> Self::Output {
6098 Current{A: self.J.clone() / rhs.Wb}
6099 }
6100}
6101impl<T> core::ops::Div<&MagneticFlux<T>> for Energy<T> where T: NumLike {
6103 type Output = Current<T>;
6104 fn div(self, rhs: &MagneticFlux<T>) -> Self::Output {
6105 Current{A: self.J / rhs.Wb.clone()}
6106 }
6107}
6108impl<T> core::ops::Div<&MagneticFlux<T>> for &Energy<T> where T: NumLike {
6110 type Output = Current<T>;
6111 fn div(self, rhs: &MagneticFlux<T>) -> Self::Output {
6112 Current{A: self.J.clone() / rhs.Wb.clone()}
6113 }
6114}
6115
6116impl<T> core::ops::Div<Voltage<T>> for Energy<T> where T: NumLike {
6119 type Output = Charge<T>;
6120 fn div(self, rhs: Voltage<T>) -> Self::Output {
6121 Charge{C: self.J / rhs.V}
6122 }
6123}
6124impl<T> core::ops::Div<Voltage<T>> for &Energy<T> where T: NumLike {
6126 type Output = Charge<T>;
6127 fn div(self, rhs: Voltage<T>) -> Self::Output {
6128 Charge{C: self.J.clone() / rhs.V}
6129 }
6130}
6131impl<T> core::ops::Div<&Voltage<T>> for Energy<T> where T: NumLike {
6133 type Output = Charge<T>;
6134 fn div(self, rhs: &Voltage<T>) -> Self::Output {
6135 Charge{C: self.J / rhs.V.clone()}
6136 }
6137}
6138impl<T> core::ops::Div<&Voltage<T>> for &Energy<T> where T: NumLike {
6140 type Output = Charge<T>;
6141 fn div(self, rhs: &Voltage<T>) -> Self::Output {
6142 Charge{C: self.J.clone() / rhs.V.clone()}
6143 }
6144}
6145
6146impl<T> core::ops::Mul<InverseVolume<T>> for Energy<T> where T: NumLike {
6149 type Output = Pressure<T>;
6150 fn mul(self, rhs: InverseVolume<T>) -> Self::Output {
6151 Pressure{Pa: self.J * rhs.per_m3}
6152 }
6153}
6154impl<T> core::ops::Mul<InverseVolume<T>> for &Energy<T> where T: NumLike {
6156 type Output = Pressure<T>;
6157 fn mul(self, rhs: InverseVolume<T>) -> Self::Output {
6158 Pressure{Pa: self.J.clone() * rhs.per_m3}
6159 }
6160}
6161impl<T> core::ops::Mul<&InverseVolume<T>> for Energy<T> where T: NumLike {
6163 type Output = Pressure<T>;
6164 fn mul(self, rhs: &InverseVolume<T>) -> Self::Output {
6165 Pressure{Pa: self.J * rhs.per_m3.clone()}
6166 }
6167}
6168impl<T> core::ops::Mul<&InverseVolume<T>> for &Energy<T> where T: NumLike {
6170 type Output = Pressure<T>;
6171 fn mul(self, rhs: &InverseVolume<T>) -> Self::Output {
6172 Pressure{Pa: self.J.clone() * rhs.per_m3.clone()}
6173 }
6174}
6175
6176impl<T> core::ops::Div<Volume<T>> for Energy<T> where T: NumLike {
6179 type Output = Pressure<T>;
6180 fn div(self, rhs: Volume<T>) -> Self::Output {
6181 Pressure{Pa: self.J / rhs.m3}
6182 }
6183}
6184impl<T> core::ops::Div<Volume<T>> for &Energy<T> where T: NumLike {
6186 type Output = Pressure<T>;
6187 fn div(self, rhs: Volume<T>) -> Self::Output {
6188 Pressure{Pa: self.J.clone() / rhs.m3}
6189 }
6190}
6191impl<T> core::ops::Div<&Volume<T>> for Energy<T> where T: NumLike {
6193 type Output = Pressure<T>;
6194 fn div(self, rhs: &Volume<T>) -> Self::Output {
6195 Pressure{Pa: self.J / rhs.m3.clone()}
6196 }
6197}
6198impl<T> core::ops::Div<&Volume<T>> for &Energy<T> where T: NumLike {
6200 type Output = Pressure<T>;
6201 fn div(self, rhs: &Volume<T>) -> Self::Output {
6202 Pressure{Pa: self.J.clone() / rhs.m3.clone()}
6203 }
6204}
6205
6206impl<T> core::ops::Div<Force<T>> for Energy<T> where T: NumLike {
6209 type Output = Distance<T>;
6210 fn div(self, rhs: Force<T>) -> Self::Output {
6211 Distance{m: self.J / rhs.N}
6212 }
6213}
6214impl<T> core::ops::Div<Force<T>> for &Energy<T> where T: NumLike {
6216 type Output = Distance<T>;
6217 fn div(self, rhs: Force<T>) -> Self::Output {
6218 Distance{m: self.J.clone() / rhs.N}
6219 }
6220}
6221impl<T> core::ops::Div<&Force<T>> for Energy<T> where T: NumLike {
6223 type Output = Distance<T>;
6224 fn div(self, rhs: &Force<T>) -> Self::Output {
6225 Distance{m: self.J / rhs.N.clone()}
6226 }
6227}
6228impl<T> core::ops::Div<&Force<T>> for &Energy<T> where T: NumLike {
6230 type Output = Distance<T>;
6231 fn div(self, rhs: &Force<T>) -> Self::Output {
6232 Distance{m: self.J.clone() / rhs.N.clone()}
6233 }
6234}
6235
6236impl<T> core::ops::Mul<Frequency<T>> for Energy<T> where T: NumLike {
6239 type Output = Power<T>;
6240 fn mul(self, rhs: Frequency<T>) -> Self::Output {
6241 Power{W: self.J * rhs.Hz}
6242 }
6243}
6244impl<T> core::ops::Mul<Frequency<T>> for &Energy<T> where T: NumLike {
6246 type Output = Power<T>;
6247 fn mul(self, rhs: Frequency<T>) -> Self::Output {
6248 Power{W: self.J.clone() * rhs.Hz}
6249 }
6250}
6251impl<T> core::ops::Mul<&Frequency<T>> for Energy<T> where T: NumLike {
6253 type Output = Power<T>;
6254 fn mul(self, rhs: &Frequency<T>) -> Self::Output {
6255 Power{W: self.J * rhs.Hz.clone()}
6256 }
6257}
6258impl<T> core::ops::Mul<&Frequency<T>> for &Energy<T> where T: NumLike {
6260 type Output = Power<T>;
6261 fn mul(self, rhs: &Frequency<T>) -> Self::Output {
6262 Power{W: self.J.clone() * rhs.Hz.clone()}
6263 }
6264}
6265
6266impl<T> core::ops::Mul<InverseForce<T>> for Energy<T> where T: NumLike {
6269 type Output = Distance<T>;
6270 fn mul(self, rhs: InverseForce<T>) -> Self::Output {
6271 Distance{m: self.J * rhs.per_N}
6272 }
6273}
6274impl<T> core::ops::Mul<InverseForce<T>> for &Energy<T> where T: NumLike {
6276 type Output = Distance<T>;
6277 fn mul(self, rhs: InverseForce<T>) -> Self::Output {
6278 Distance{m: self.J.clone() * rhs.per_N}
6279 }
6280}
6281impl<T> core::ops::Mul<&InverseForce<T>> for Energy<T> where T: NumLike {
6283 type Output = Distance<T>;
6284 fn mul(self, rhs: &InverseForce<T>) -> Self::Output {
6285 Distance{m: self.J * rhs.per_N.clone()}
6286 }
6287}
6288impl<T> core::ops::Mul<&InverseForce<T>> for &Energy<T> where T: NumLike {
6290 type Output = Distance<T>;
6291 fn mul(self, rhs: &InverseForce<T>) -> Self::Output {
6292 Distance{m: self.J.clone() * rhs.per_N.clone()}
6293 }
6294}
6295
6296impl<T> core::ops::Mul<InverseMomentum<T>> for Energy<T> where T: NumLike {
6299 type Output = Velocity<T>;
6300 fn mul(self, rhs: InverseMomentum<T>) -> Self::Output {
6301 Velocity{mps: self.J * rhs.s_per_kgm}
6302 }
6303}
6304impl<T> core::ops::Mul<InverseMomentum<T>> for &Energy<T> where T: NumLike {
6306 type Output = Velocity<T>;
6307 fn mul(self, rhs: InverseMomentum<T>) -> Self::Output {
6308 Velocity{mps: self.J.clone() * rhs.s_per_kgm}
6309 }
6310}
6311impl<T> core::ops::Mul<&InverseMomentum<T>> for Energy<T> where T: NumLike {
6313 type Output = Velocity<T>;
6314 fn mul(self, rhs: &InverseMomentum<T>) -> Self::Output {
6315 Velocity{mps: self.J * rhs.s_per_kgm.clone()}
6316 }
6317}
6318impl<T> core::ops::Mul<&InverseMomentum<T>> for &Energy<T> where T: NumLike {
6320 type Output = Velocity<T>;
6321 fn mul(self, rhs: &InverseMomentum<T>) -> Self::Output {
6322 Velocity{mps: self.J.clone() * rhs.s_per_kgm.clone()}
6323 }
6324}
6325
6326impl<T> core::ops::Mul<InversePower<T>> for Energy<T> where T: NumLike {
6329 type Output = Time<T>;
6330 fn mul(self, rhs: InversePower<T>) -> Self::Output {
6331 Time{s: self.J * rhs.per_W}
6332 }
6333}
6334impl<T> core::ops::Mul<InversePower<T>> for &Energy<T> where T: NumLike {
6336 type Output = Time<T>;
6337 fn mul(self, rhs: InversePower<T>) -> Self::Output {
6338 Time{s: self.J.clone() * rhs.per_W}
6339 }
6340}
6341impl<T> core::ops::Mul<&InversePower<T>> for Energy<T> where T: NumLike {
6343 type Output = Time<T>;
6344 fn mul(self, rhs: &InversePower<T>) -> Self::Output {
6345 Time{s: self.J * rhs.per_W.clone()}
6346 }
6347}
6348impl<T> core::ops::Mul<&InversePower<T>> for &Energy<T> where T: NumLike {
6350 type Output = Time<T>;
6351 fn mul(self, rhs: &InversePower<T>) -> Self::Output {
6352 Time{s: self.J.clone() * rhs.per_W.clone()}
6353 }
6354}
6355
6356impl<T> core::ops::Mul<InversePressure<T>> for Energy<T> where T: NumLike {
6359 type Output = Volume<T>;
6360 fn mul(self, rhs: InversePressure<T>) -> Self::Output {
6361 Volume{m3: self.J * rhs.per_Pa}
6362 }
6363}
6364impl<T> core::ops::Mul<InversePressure<T>> for &Energy<T> where T: NumLike {
6366 type Output = Volume<T>;
6367 fn mul(self, rhs: InversePressure<T>) -> Self::Output {
6368 Volume{m3: self.J.clone() * rhs.per_Pa}
6369 }
6370}
6371impl<T> core::ops::Mul<&InversePressure<T>> for Energy<T> where T: NumLike {
6373 type Output = Volume<T>;
6374 fn mul(self, rhs: &InversePressure<T>) -> Self::Output {
6375 Volume{m3: self.J * rhs.per_Pa.clone()}
6376 }
6377}
6378impl<T> core::ops::Mul<&InversePressure<T>> for &Energy<T> where T: NumLike {
6380 type Output = Volume<T>;
6381 fn mul(self, rhs: &InversePressure<T>) -> Self::Output {
6382 Volume{m3: self.J.clone() * rhs.per_Pa.clone()}
6383 }
6384}
6385
6386impl<T> core::ops::Div<Momentum<T>> for Energy<T> where T: NumLike {
6389 type Output = Velocity<T>;
6390 fn div(self, rhs: Momentum<T>) -> Self::Output {
6391 Velocity{mps: self.J / rhs.kgmps}
6392 }
6393}
6394impl<T> core::ops::Div<Momentum<T>> for &Energy<T> where T: NumLike {
6396 type Output = Velocity<T>;
6397 fn div(self, rhs: Momentum<T>) -> Self::Output {
6398 Velocity{mps: self.J.clone() / rhs.kgmps}
6399 }
6400}
6401impl<T> core::ops::Div<&Momentum<T>> for Energy<T> where T: NumLike {
6403 type Output = Velocity<T>;
6404 fn div(self, rhs: &Momentum<T>) -> Self::Output {
6405 Velocity{mps: self.J / rhs.kgmps.clone()}
6406 }
6407}
6408impl<T> core::ops::Div<&Momentum<T>> for &Energy<T> where T: NumLike {
6410 type Output = Velocity<T>;
6411 fn div(self, rhs: &Momentum<T>) -> Self::Output {
6412 Velocity{mps: self.J.clone() / rhs.kgmps.clone()}
6413 }
6414}
6415
6416impl<T> core::ops::Div<Power<T>> for Energy<T> where T: NumLike {
6419 type Output = Time<T>;
6420 fn div(self, rhs: Power<T>) -> Self::Output {
6421 Time{s: self.J / rhs.W}
6422 }
6423}
6424impl<T> core::ops::Div<Power<T>> for &Energy<T> where T: NumLike {
6426 type Output = Time<T>;
6427 fn div(self, rhs: Power<T>) -> Self::Output {
6428 Time{s: self.J.clone() / rhs.W}
6429 }
6430}
6431impl<T> core::ops::Div<&Power<T>> for Energy<T> where T: NumLike {
6433 type Output = Time<T>;
6434 fn div(self, rhs: &Power<T>) -> Self::Output {
6435 Time{s: self.J / rhs.W.clone()}
6436 }
6437}
6438impl<T> core::ops::Div<&Power<T>> for &Energy<T> where T: NumLike {
6440 type Output = Time<T>;
6441 fn div(self, rhs: &Power<T>) -> Self::Output {
6442 Time{s: self.J.clone() / rhs.W.clone()}
6443 }
6444}
6445
6446impl<T> core::ops::Div<Pressure<T>> for Energy<T> where T: NumLike {
6449 type Output = Volume<T>;
6450 fn div(self, rhs: Pressure<T>) -> Self::Output {
6451 Volume{m3: self.J / rhs.Pa}
6452 }
6453}
6454impl<T> core::ops::Div<Pressure<T>> for &Energy<T> where T: NumLike {
6456 type Output = Volume<T>;
6457 fn div(self, rhs: Pressure<T>) -> Self::Output {
6458 Volume{m3: self.J.clone() / rhs.Pa}
6459 }
6460}
6461impl<T> core::ops::Div<&Pressure<T>> for Energy<T> where T: NumLike {
6463 type Output = Volume<T>;
6464 fn div(self, rhs: &Pressure<T>) -> Self::Output {
6465 Volume{m3: self.J / rhs.Pa.clone()}
6466 }
6467}
6468impl<T> core::ops::Div<&Pressure<T>> for &Energy<T> where T: NumLike {
6470 type Output = Volume<T>;
6471 fn div(self, rhs: &Pressure<T>) -> Self::Output {
6472 Volume{m3: self.J.clone() / rhs.Pa.clone()}
6473 }
6474}
6475
6476impl<T> core::ops::Mul<TimePerDistance<T>> for Energy<T> where T: NumLike {
6479 type Output = Momentum<T>;
6480 fn mul(self, rhs: TimePerDistance<T>) -> Self::Output {
6481 Momentum{kgmps: self.J * rhs.spm}
6482 }
6483}
6484impl<T> core::ops::Mul<TimePerDistance<T>> for &Energy<T> where T: NumLike {
6486 type Output = Momentum<T>;
6487 fn mul(self, rhs: TimePerDistance<T>) -> Self::Output {
6488 Momentum{kgmps: self.J.clone() * rhs.spm}
6489 }
6490}
6491impl<T> core::ops::Mul<&TimePerDistance<T>> for Energy<T> where T: NumLike {
6493 type Output = Momentum<T>;
6494 fn mul(self, rhs: &TimePerDistance<T>) -> Self::Output {
6495 Momentum{kgmps: self.J * rhs.spm.clone()}
6496 }
6497}
6498impl<T> core::ops::Mul<&TimePerDistance<T>> for &Energy<T> where T: NumLike {
6500 type Output = Momentum<T>;
6501 fn mul(self, rhs: &TimePerDistance<T>) -> Self::Output {
6502 Momentum{kgmps: self.J.clone() * rhs.spm.clone()}
6503 }
6504}
6505
6506impl<T> core::ops::Div<Velocity<T>> for Energy<T> where T: NumLike {
6509 type Output = Momentum<T>;
6510 fn div(self, rhs: Velocity<T>) -> Self::Output {
6511 Momentum{kgmps: self.J / rhs.mps}
6512 }
6513}
6514impl<T> core::ops::Div<Velocity<T>> for &Energy<T> where T: NumLike {
6516 type Output = Momentum<T>;
6517 fn div(self, rhs: Velocity<T>) -> Self::Output {
6518 Momentum{kgmps: self.J.clone() / rhs.mps}
6519 }
6520}
6521impl<T> core::ops::Div<&Velocity<T>> for Energy<T> where T: NumLike {
6523 type Output = Momentum<T>;
6524 fn div(self, rhs: &Velocity<T>) -> Self::Output {
6525 Momentum{kgmps: self.J / rhs.mps.clone()}
6526 }
6527}
6528impl<T> core::ops::Div<&Velocity<T>> for &Energy<T> where T: NumLike {
6530 type Output = Momentum<T>;
6531 fn div(self, rhs: &Velocity<T>) -> Self::Output {
6532 Momentum{kgmps: self.J.clone() / rhs.mps.clone()}
6533 }
6534}
6535
6536impl<T> core::ops::Div<AbsorbedDose<T>> for Energy<T> where T: NumLike {
6539 type Output = Mass<T>;
6540 fn div(self, rhs: AbsorbedDose<T>) -> Self::Output {
6541 Mass{kg: self.J / rhs.Gy}
6542 }
6543}
6544impl<T> core::ops::Div<AbsorbedDose<T>> for &Energy<T> where T: NumLike {
6546 type Output = Mass<T>;
6547 fn div(self, rhs: AbsorbedDose<T>) -> Self::Output {
6548 Mass{kg: self.J.clone() / rhs.Gy}
6549 }
6550}
6551impl<T> core::ops::Div<&AbsorbedDose<T>> for Energy<T> where T: NumLike {
6553 type Output = Mass<T>;
6554 fn div(self, rhs: &AbsorbedDose<T>) -> Self::Output {
6555 Mass{kg: self.J / rhs.Gy.clone()}
6556 }
6557}
6558impl<T> core::ops::Div<&AbsorbedDose<T>> for &Energy<T> where T: NumLike {
6560 type Output = Mass<T>;
6561 fn div(self, rhs: &AbsorbedDose<T>) -> Self::Output {
6562 Mass{kg: self.J.clone() / rhs.Gy.clone()}
6563 }
6564}
6565
6566impl<T> core::ops::Div<DoseEquivalent<T>> for Energy<T> where T: NumLike {
6569 type Output = Mass<T>;
6570 fn div(self, rhs: DoseEquivalent<T>) -> Self::Output {
6571 Mass{kg: self.J / rhs.Sv}
6572 }
6573}
6574impl<T> core::ops::Div<DoseEquivalent<T>> for &Energy<T> where T: NumLike {
6576 type Output = Mass<T>;
6577 fn div(self, rhs: DoseEquivalent<T>) -> Self::Output {
6578 Mass{kg: self.J.clone() / rhs.Sv}
6579 }
6580}
6581impl<T> core::ops::Div<&DoseEquivalent<T>> for Energy<T> where T: NumLike {
6583 type Output = Mass<T>;
6584 fn div(self, rhs: &DoseEquivalent<T>) -> Self::Output {
6585 Mass{kg: self.J / rhs.Sv.clone()}
6586 }
6587}
6588impl<T> core::ops::Div<&DoseEquivalent<T>> for &Energy<T> where T: NumLike {
6590 type Output = Mass<T>;
6591 fn div(self, rhs: &DoseEquivalent<T>) -> Self::Output {
6592 Mass{kg: self.J.clone() / rhs.Sv.clone()}
6593 }
6594}
6595
6596impl<T> core::ops::Mul<InverseAbsorbedDose<T>> for Energy<T> where T: NumLike {
6599 type Output = Mass<T>;
6600 fn mul(self, rhs: InverseAbsorbedDose<T>) -> Self::Output {
6601 Mass{kg: self.J * rhs.per_Gy}
6602 }
6603}
6604impl<T> core::ops::Mul<InverseAbsorbedDose<T>> for &Energy<T> where T: NumLike {
6606 type Output = Mass<T>;
6607 fn mul(self, rhs: InverseAbsorbedDose<T>) -> Self::Output {
6608 Mass{kg: self.J.clone() * rhs.per_Gy}
6609 }
6610}
6611impl<T> core::ops::Mul<&InverseAbsorbedDose<T>> for Energy<T> where T: NumLike {
6613 type Output = Mass<T>;
6614 fn mul(self, rhs: &InverseAbsorbedDose<T>) -> Self::Output {
6615 Mass{kg: self.J * rhs.per_Gy.clone()}
6616 }
6617}
6618impl<T> core::ops::Mul<&InverseAbsorbedDose<T>> for &Energy<T> where T: NumLike {
6620 type Output = Mass<T>;
6621 fn mul(self, rhs: &InverseAbsorbedDose<T>) -> Self::Output {
6622 Mass{kg: self.J.clone() * rhs.per_Gy.clone()}
6623 }
6624}
6625
6626impl<T> core::ops::Mul<InverseDoseEquivalent<T>> for Energy<T> where T: NumLike {
6629 type Output = Mass<T>;
6630 fn mul(self, rhs: InverseDoseEquivalent<T>) -> Self::Output {
6631 Mass{kg: self.J * rhs.per_Sv}
6632 }
6633}
6634impl<T> core::ops::Mul<InverseDoseEquivalent<T>> for &Energy<T> where T: NumLike {
6636 type Output = Mass<T>;
6637 fn mul(self, rhs: InverseDoseEquivalent<T>) -> Self::Output {
6638 Mass{kg: self.J.clone() * rhs.per_Sv}
6639 }
6640}
6641impl<T> core::ops::Mul<&InverseDoseEquivalent<T>> for Energy<T> where T: NumLike {
6643 type Output = Mass<T>;
6644 fn mul(self, rhs: &InverseDoseEquivalent<T>) -> Self::Output {
6645 Mass{kg: self.J * rhs.per_Sv.clone()}
6646 }
6647}
6648impl<T> core::ops::Mul<&InverseDoseEquivalent<T>> for &Energy<T> where T: NumLike {
6650 type Output = Mass<T>;
6651 fn mul(self, rhs: &InverseDoseEquivalent<T>) -> Self::Output {
6652 Mass{kg: self.J.clone() * rhs.per_Sv.clone()}
6653 }
6654}
6655
6656impl<T> core::ops::Div<Energy<T>> for f64 where T: NumLike+From<f64> {
6659 type Output = InverseEnergy<T>;
6660 fn div(self, rhs: Energy<T>) -> Self::Output {
6661 InverseEnergy{per_J: T::from(self) / rhs.J}
6662 }
6663}
6664impl<T> core::ops::Div<Energy<T>> for &f64 where T: NumLike+From<f64> {
6666 type Output = InverseEnergy<T>;
6667 fn div(self, rhs: Energy<T>) -> Self::Output {
6668 InverseEnergy{per_J: T::from(self.clone()) / rhs.J}
6669 }
6670}
6671impl<T> core::ops::Div<&Energy<T>> for f64 where T: NumLike+From<f64> {
6673 type Output = InverseEnergy<T>;
6674 fn div(self, rhs: &Energy<T>) -> Self::Output {
6675 InverseEnergy{per_J: T::from(self) / rhs.J.clone()}
6676 }
6677}
6678impl<T> core::ops::Div<&Energy<T>> for &f64 where T: NumLike+From<f64> {
6680 type Output = InverseEnergy<T>;
6681 fn div(self, rhs: &Energy<T>) -> Self::Output {
6682 InverseEnergy{per_J: T::from(self.clone()) / rhs.J.clone()}
6683 }
6684}
6685
6686impl<T> core::ops::Div<Energy<T>> for f32 where T: NumLike+From<f32> {
6689 type Output = InverseEnergy<T>;
6690 fn div(self, rhs: Energy<T>) -> Self::Output {
6691 InverseEnergy{per_J: T::from(self) / rhs.J}
6692 }
6693}
6694impl<T> core::ops::Div<Energy<T>> for &f32 where T: NumLike+From<f32> {
6696 type Output = InverseEnergy<T>;
6697 fn div(self, rhs: Energy<T>) -> Self::Output {
6698 InverseEnergy{per_J: T::from(self.clone()) / rhs.J}
6699 }
6700}
6701impl<T> core::ops::Div<&Energy<T>> for f32 where T: NumLike+From<f32> {
6703 type Output = InverseEnergy<T>;
6704 fn div(self, rhs: &Energy<T>) -> Self::Output {
6705 InverseEnergy{per_J: T::from(self) / rhs.J.clone()}
6706 }
6707}
6708impl<T> core::ops::Div<&Energy<T>> for &f32 where T: NumLike+From<f32> {
6710 type Output = InverseEnergy<T>;
6711 fn div(self, rhs: &Energy<T>) -> Self::Output {
6712 InverseEnergy{per_J: T::from(self.clone()) / rhs.J.clone()}
6713 }
6714}
6715
6716impl<T> core::ops::Div<Energy<T>> for i64 where T: NumLike+From<i64> {
6719 type Output = InverseEnergy<T>;
6720 fn div(self, rhs: Energy<T>) -> Self::Output {
6721 InverseEnergy{per_J: T::from(self) / rhs.J}
6722 }
6723}
6724impl<T> core::ops::Div<Energy<T>> for &i64 where T: NumLike+From<i64> {
6726 type Output = InverseEnergy<T>;
6727 fn div(self, rhs: Energy<T>) -> Self::Output {
6728 InverseEnergy{per_J: T::from(self.clone()) / rhs.J}
6729 }
6730}
6731impl<T> core::ops::Div<&Energy<T>> for i64 where T: NumLike+From<i64> {
6733 type Output = InverseEnergy<T>;
6734 fn div(self, rhs: &Energy<T>) -> Self::Output {
6735 InverseEnergy{per_J: T::from(self) / rhs.J.clone()}
6736 }
6737}
6738impl<T> core::ops::Div<&Energy<T>> for &i64 where T: NumLike+From<i64> {
6740 type Output = InverseEnergy<T>;
6741 fn div(self, rhs: &Energy<T>) -> Self::Output {
6742 InverseEnergy{per_J: T::from(self.clone()) / rhs.J.clone()}
6743 }
6744}
6745
6746impl<T> core::ops::Div<Energy<T>> for i32 where T: NumLike+From<i32> {
6749 type Output = InverseEnergy<T>;
6750 fn div(self, rhs: Energy<T>) -> Self::Output {
6751 InverseEnergy{per_J: T::from(self) / rhs.J}
6752 }
6753}
6754impl<T> core::ops::Div<Energy<T>> for &i32 where T: NumLike+From<i32> {
6756 type Output = InverseEnergy<T>;
6757 fn div(self, rhs: Energy<T>) -> Self::Output {
6758 InverseEnergy{per_J: T::from(self.clone()) / rhs.J}
6759 }
6760}
6761impl<T> core::ops::Div<&Energy<T>> for i32 where T: NumLike+From<i32> {
6763 type Output = InverseEnergy<T>;
6764 fn div(self, rhs: &Energy<T>) -> Self::Output {
6765 InverseEnergy{per_J: T::from(self) / rhs.J.clone()}
6766 }
6767}
6768impl<T> core::ops::Div<&Energy<T>> for &i32 where T: NumLike+From<i32> {
6770 type Output = InverseEnergy<T>;
6771 fn div(self, rhs: &Energy<T>) -> Self::Output {
6772 InverseEnergy{per_J: T::from(self.clone()) / rhs.J.clone()}
6773 }
6774}
6775
6776#[cfg(feature="num-bigfloat")]
6779impl<T> core::ops::Div<Energy<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
6780 type Output = InverseEnergy<T>;
6781 fn div(self, rhs: Energy<T>) -> Self::Output {
6782 InverseEnergy{per_J: T::from(self) / rhs.J}
6783 }
6784}
6785#[cfg(feature="num-bigfloat")]
6787impl<T> core::ops::Div<Energy<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
6788 type Output = InverseEnergy<T>;
6789 fn div(self, rhs: Energy<T>) -> Self::Output {
6790 InverseEnergy{per_J: T::from(self.clone()) / rhs.J}
6791 }
6792}
6793#[cfg(feature="num-bigfloat")]
6795impl<T> core::ops::Div<&Energy<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
6796 type Output = InverseEnergy<T>;
6797 fn div(self, rhs: &Energy<T>) -> Self::Output {
6798 InverseEnergy{per_J: T::from(self) / rhs.J.clone()}
6799 }
6800}
6801#[cfg(feature="num-bigfloat")]
6803impl<T> core::ops::Div<&Energy<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
6804 type Output = InverseEnergy<T>;
6805 fn div(self, rhs: &Energy<T>) -> Self::Output {
6806 InverseEnergy{per_J: T::from(self.clone()) / rhs.J.clone()}
6807 }
6808}
6809
6810#[cfg(feature="num-complex")]
6813impl<T> core::ops::Div<Energy<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
6814 type Output = InverseEnergy<T>;
6815 fn div(self, rhs: Energy<T>) -> Self::Output {
6816 InverseEnergy{per_J: T::from(self) / rhs.J}
6817 }
6818}
6819#[cfg(feature="num-complex")]
6821impl<T> core::ops::Div<Energy<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
6822 type Output = InverseEnergy<T>;
6823 fn div(self, rhs: Energy<T>) -> Self::Output {
6824 InverseEnergy{per_J: T::from(self.clone()) / rhs.J}
6825 }
6826}
6827#[cfg(feature="num-complex")]
6829impl<T> core::ops::Div<&Energy<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
6830 type Output = InverseEnergy<T>;
6831 fn div(self, rhs: &Energy<T>) -> Self::Output {
6832 InverseEnergy{per_J: T::from(self) / rhs.J.clone()}
6833 }
6834}
6835#[cfg(feature="num-complex")]
6837impl<T> core::ops::Div<&Energy<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
6838 type Output = InverseEnergy<T>;
6839 fn div(self, rhs: &Energy<T>) -> Self::Output {
6840 InverseEnergy{per_J: T::from(self.clone()) / rhs.J.clone()}
6841 }
6842}
6843
6844#[cfg(feature="num-complex")]
6847impl<T> core::ops::Div<Energy<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
6848 type Output = InverseEnergy<T>;
6849 fn div(self, rhs: Energy<T>) -> Self::Output {
6850 InverseEnergy{per_J: T::from(self) / rhs.J}
6851 }
6852}
6853#[cfg(feature="num-complex")]
6855impl<T> core::ops::Div<Energy<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
6856 type Output = InverseEnergy<T>;
6857 fn div(self, rhs: Energy<T>) -> Self::Output {
6858 InverseEnergy{per_J: T::from(self.clone()) / rhs.J}
6859 }
6860}
6861#[cfg(feature="num-complex")]
6863impl<T> core::ops::Div<&Energy<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
6864 type Output = InverseEnergy<T>;
6865 fn div(self, rhs: &Energy<T>) -> Self::Output {
6866 InverseEnergy{per_J: T::from(self) / rhs.J.clone()}
6867 }
6868}
6869#[cfg(feature="num-complex")]
6871impl<T> core::ops::Div<&Energy<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
6872 type Output = InverseEnergy<T>;
6873 fn div(self, rhs: &Energy<T>) -> Self::Output {
6874 InverseEnergy{per_J: T::from(self.clone()) / rhs.J.clone()}
6875 }
6876}
6877
6878#[derive(UnitStruct, Debug, Clone)]
6880#[cfg_attr(feature="serde", derive(Serialize, Deserialize))]
6881pub struct Force<T: NumLike>{
6882 pub N: T
6884}
6885
6886impl<T> Force<T> where T: NumLike {
6887
6888 pub fn unit_name() -> &'static str { "newtons" }
6890
6891 pub fn unit_symbol() -> &'static str { "N" }
6893
6894 pub fn from_N(N: T) -> Self { Force{N: N} }
6899
6900 pub fn to_N(&self) -> T { self.N.clone() }
6902
6903 pub fn from_newtons(newtons: T) -> Self { Force{N: newtons} }
6908
6909 pub fn to_newtons(&self) -> T { self.N.clone() }
6911
6912}
6913
6914impl<T> fmt::Display for Force<T> where T: NumLike {
6915 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6916 write!(f, "{} {}", &self.N, Self::unit_symbol())
6917 }
6918}
6919
6920impl<T> Force<T> where T: NumLike+From<f64> {
6921
6922 pub fn to_lb(&self) -> T {
6926 return self.N.clone() * T::from(0.224337566199999_f64);
6927 }
6928
6929 pub fn from_lb(lb: T) -> Self {
6936 Force{N: lb * T::from(4.45756819483586_f64)}
6937 }
6938
6939 pub fn to_kgG(&self) -> T {
6943 return self.N.clone() * T::from(0.101971620999999_f64);
6944 }
6945
6946 pub fn from_kgG(kgG: T) -> Self {
6953 Force{N: kgG * T::from(9.8066500286389_f64)}
6954 }
6955
6956 pub fn to_mN(&self) -> T {
6960 return self.N.clone() * T::from(1000.0_f64);
6961 }
6962
6963 pub fn from_mN(mN: T) -> Self {
6970 Force{N: mN * T::from(0.001_f64)}
6971 }
6972
6973 pub fn to_uN(&self) -> T {
6977 return self.N.clone() * T::from(1000000.0_f64);
6978 }
6979
6980 pub fn from_uN(uN: T) -> Self {
6987 Force{N: uN * T::from(1e-06_f64)}
6988 }
6989
6990 pub fn to_nN(&self) -> T {
6994 return self.N.clone() * T::from(1000000000.0_f64);
6995 }
6996
6997 pub fn from_nN(nN: T) -> Self {
7004 Force{N: nN * T::from(1e-09_f64)}
7005 }
7006
7007 pub fn to_kN(&self) -> T {
7011 return self.N.clone() * T::from(0.001_f64);
7012 }
7013
7014 pub fn from_kN(kN: T) -> Self {
7021 Force{N: kN * T::from(1000.0_f64)}
7022 }
7023
7024 pub fn to_MN(&self) -> T {
7028 return self.N.clone() * T::from(1e-06_f64);
7029 }
7030
7031 pub fn from_MN(MN: T) -> Self {
7038 Force{N: MN * T::from(1000000.0_f64)}
7039 }
7040
7041 pub fn to_GN(&self) -> T {
7045 return self.N.clone() * T::from(1e-09_f64);
7046 }
7047
7048 pub fn from_GN(GN: T) -> Self {
7055 Force{N: GN * T::from(1000000000.0_f64)}
7056 }
7057
7058}
7059
7060
7061#[cfg(feature="num-bigfloat")]
7063impl core::ops::Mul<Force<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
7064 type Output = Force<num_bigfloat::BigFloat>;
7065 fn mul(self, rhs: Force<num_bigfloat::BigFloat>) -> Self::Output {
7066 Force{N: self * rhs.N}
7067 }
7068}
7069#[cfg(feature="num-bigfloat")]
7071impl core::ops::Mul<Force<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
7072 type Output = Force<num_bigfloat::BigFloat>;
7073 fn mul(self, rhs: Force<num_bigfloat::BigFloat>) -> Self::Output {
7074 Force{N: self.clone() * rhs.N}
7075 }
7076}
7077#[cfg(feature="num-bigfloat")]
7079impl core::ops::Mul<&Force<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
7080 type Output = Force<num_bigfloat::BigFloat>;
7081 fn mul(self, rhs: &Force<num_bigfloat::BigFloat>) -> Self::Output {
7082 Force{N: self * rhs.N.clone()}
7083 }
7084}
7085#[cfg(feature="num-bigfloat")]
7087impl core::ops::Mul<&Force<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
7088 type Output = Force<num_bigfloat::BigFloat>;
7089 fn mul(self, rhs: &Force<num_bigfloat::BigFloat>) -> Self::Output {
7090 Force{N: self.clone() * rhs.N.clone()}
7091 }
7092}
7093
7094#[cfg(feature="num-complex")]
7096impl core::ops::Mul<Force<num_complex::Complex32>> for num_complex::Complex32 {
7097 type Output = Force<num_complex::Complex32>;
7098 fn mul(self, rhs: Force<num_complex::Complex32>) -> Self::Output {
7099 Force{N: self * rhs.N}
7100 }
7101}
7102#[cfg(feature="num-complex")]
7104impl core::ops::Mul<Force<num_complex::Complex32>> for &num_complex::Complex32 {
7105 type Output = Force<num_complex::Complex32>;
7106 fn mul(self, rhs: Force<num_complex::Complex32>) -> Self::Output {
7107 Force{N: self.clone() * rhs.N}
7108 }
7109}
7110#[cfg(feature="num-complex")]
7112impl core::ops::Mul<&Force<num_complex::Complex32>> for num_complex::Complex32 {
7113 type Output = Force<num_complex::Complex32>;
7114 fn mul(self, rhs: &Force<num_complex::Complex32>) -> Self::Output {
7115 Force{N: self * rhs.N.clone()}
7116 }
7117}
7118#[cfg(feature="num-complex")]
7120impl core::ops::Mul<&Force<num_complex::Complex32>> for &num_complex::Complex32 {
7121 type Output = Force<num_complex::Complex32>;
7122 fn mul(self, rhs: &Force<num_complex::Complex32>) -> Self::Output {
7123 Force{N: self.clone() * rhs.N.clone()}
7124 }
7125}
7126
7127#[cfg(feature="num-complex")]
7129impl core::ops::Mul<Force<num_complex::Complex64>> for num_complex::Complex64 {
7130 type Output = Force<num_complex::Complex64>;
7131 fn mul(self, rhs: Force<num_complex::Complex64>) -> Self::Output {
7132 Force{N: self * rhs.N}
7133 }
7134}
7135#[cfg(feature="num-complex")]
7137impl core::ops::Mul<Force<num_complex::Complex64>> for &num_complex::Complex64 {
7138 type Output = Force<num_complex::Complex64>;
7139 fn mul(self, rhs: Force<num_complex::Complex64>) -> Self::Output {
7140 Force{N: self.clone() * rhs.N}
7141 }
7142}
7143#[cfg(feature="num-complex")]
7145impl core::ops::Mul<&Force<num_complex::Complex64>> for num_complex::Complex64 {
7146 type Output = Force<num_complex::Complex64>;
7147 fn mul(self, rhs: &Force<num_complex::Complex64>) -> Self::Output {
7148 Force{N: self * rhs.N.clone()}
7149 }
7150}
7151#[cfg(feature="num-complex")]
7153impl core::ops::Mul<&Force<num_complex::Complex64>> for &num_complex::Complex64 {
7154 type Output = Force<num_complex::Complex64>;
7155 fn mul(self, rhs: &Force<num_complex::Complex64>) -> Self::Output {
7156 Force{N: self.clone() * rhs.N.clone()}
7157 }
7158}
7159
7160
7161
7162#[cfg(feature = "uom")]
7164impl<T> Into<uom::si::f32::Force> for Force<T> where T: NumLike+Into<f32> {
7165 fn into(self) -> uom::si::f32::Force {
7166 uom::si::f32::Force::new::<uom::si::force::newton>(self.N.into())
7167 }
7168}
7169
7170#[cfg(feature = "uom")]
7172impl<T> From<uom::si::f32::Force> for Force<T> where T: NumLike+From<f32> {
7173 fn from(src: uom::si::f32::Force) -> Self {
7174 Force{N: T::from(src.value)}
7175 }
7176}
7177
7178#[cfg(feature = "uom")]
7180impl<T> Into<uom::si::f64::Force> for Force<T> where T: NumLike+Into<f64> {
7181 fn into(self) -> uom::si::f64::Force {
7182 uom::si::f64::Force::new::<uom::si::force::newton>(self.N.into())
7183 }
7184}
7185
7186#[cfg(feature = "uom")]
7188impl<T> From<uom::si::f64::Force> for Force<T> where T: NumLike+From<f64> {
7189 fn from(src: uom::si::f64::Force) -> Self {
7190 Force{N: T::from(src.value)}
7191 }
7192}
7193
7194
7195impl<T> core::ops::Mul<Distance<T>> for Force<T> where T: NumLike {
7198 type Output = Energy<T>;
7199 fn mul(self, rhs: Distance<T>) -> Self::Output {
7200 Energy{J: self.N * rhs.m}
7201 }
7202}
7203impl<T> core::ops::Mul<Distance<T>> for &Force<T> where T: NumLike {
7205 type Output = Energy<T>;
7206 fn mul(self, rhs: Distance<T>) -> Self::Output {
7207 Energy{J: self.N.clone() * rhs.m}
7208 }
7209}
7210impl<T> core::ops::Mul<&Distance<T>> for Force<T> where T: NumLike {
7212 type Output = Energy<T>;
7213 fn mul(self, rhs: &Distance<T>) -> Self::Output {
7214 Energy{J: self.N * rhs.m.clone()}
7215 }
7216}
7217impl<T> core::ops::Mul<&Distance<T>> for &Force<T> where T: NumLike {
7219 type Output = Energy<T>;
7220 fn mul(self, rhs: &Distance<T>) -> Self::Output {
7221 Energy{J: self.N.clone() * rhs.m.clone()}
7222 }
7223}
7224
7225impl<T> core::ops::Div<InverseDistance<T>> for Force<T> where T: NumLike {
7228 type Output = Energy<T>;
7229 fn div(self, rhs: InverseDistance<T>) -> Self::Output {
7230 Energy{J: self.N / rhs.per_m}
7231 }
7232}
7233impl<T> core::ops::Div<InverseDistance<T>> for &Force<T> where T: NumLike {
7235 type Output = Energy<T>;
7236 fn div(self, rhs: InverseDistance<T>) -> Self::Output {
7237 Energy{J: self.N.clone() / rhs.per_m}
7238 }
7239}
7240impl<T> core::ops::Div<&InverseDistance<T>> for Force<T> where T: NumLike {
7242 type Output = Energy<T>;
7243 fn div(self, rhs: &InverseDistance<T>) -> Self::Output {
7244 Energy{J: self.N / rhs.per_m.clone()}
7245 }
7246}
7247impl<T> core::ops::Div<&InverseDistance<T>> for &Force<T> where T: NumLike {
7249 type Output = Energy<T>;
7250 fn div(self, rhs: &InverseDistance<T>) -> Self::Output {
7251 Energy{J: self.N.clone() / rhs.per_m.clone()}
7252 }
7253}
7254
7255impl<T> core::ops::Mul<InverseMass<T>> for Force<T> where T: NumLike {
7258 type Output = Acceleration<T>;
7259 fn mul(self, rhs: InverseMass<T>) -> Self::Output {
7260 Acceleration{mps2: self.N * rhs.per_kg}
7261 }
7262}
7263impl<T> core::ops::Mul<InverseMass<T>> for &Force<T> where T: NumLike {
7265 type Output = Acceleration<T>;
7266 fn mul(self, rhs: InverseMass<T>) -> Self::Output {
7267 Acceleration{mps2: self.N.clone() * rhs.per_kg}
7268 }
7269}
7270impl<T> core::ops::Mul<&InverseMass<T>> for Force<T> where T: NumLike {
7272 type Output = Acceleration<T>;
7273 fn mul(self, rhs: &InverseMass<T>) -> Self::Output {
7274 Acceleration{mps2: self.N * rhs.per_kg.clone()}
7275 }
7276}
7277impl<T> core::ops::Mul<&InverseMass<T>> for &Force<T> where T: NumLike {
7279 type Output = Acceleration<T>;
7280 fn mul(self, rhs: &InverseMass<T>) -> Self::Output {
7281 Acceleration{mps2: self.N.clone() * rhs.per_kg.clone()}
7282 }
7283}
7284
7285impl<T> core::ops::Div<Mass<T>> for Force<T> where T: NumLike {
7288 type Output = Acceleration<T>;
7289 fn div(self, rhs: Mass<T>) -> Self::Output {
7290 Acceleration{mps2: self.N / rhs.kg}
7291 }
7292}
7293impl<T> core::ops::Div<Mass<T>> for &Force<T> where T: NumLike {
7295 type Output = Acceleration<T>;
7296 fn div(self, rhs: Mass<T>) -> Self::Output {
7297 Acceleration{mps2: self.N.clone() / rhs.kg}
7298 }
7299}
7300impl<T> core::ops::Div<&Mass<T>> for Force<T> where T: NumLike {
7302 type Output = Acceleration<T>;
7303 fn div(self, rhs: &Mass<T>) -> Self::Output {
7304 Acceleration{mps2: self.N / rhs.kg.clone()}
7305 }
7306}
7307impl<T> core::ops::Div<&Mass<T>> for &Force<T> where T: NumLike {
7309 type Output = Acceleration<T>;
7310 fn div(self, rhs: &Mass<T>) -> Self::Output {
7311 Acceleration{mps2: self.N.clone() / rhs.kg.clone()}
7312 }
7313}
7314
7315impl<T> core::ops::Mul<Time<T>> for Force<T> where T: NumLike {
7318 type Output = Momentum<T>;
7319 fn mul(self, rhs: Time<T>) -> Self::Output {
7320 Momentum{kgmps: self.N * rhs.s}
7321 }
7322}
7323impl<T> core::ops::Mul<Time<T>> for &Force<T> where T: NumLike {
7325 type Output = Momentum<T>;
7326 fn mul(self, rhs: Time<T>) -> Self::Output {
7327 Momentum{kgmps: self.N.clone() * rhs.s}
7328 }
7329}
7330impl<T> core::ops::Mul<&Time<T>> for Force<T> where T: NumLike {
7332 type Output = Momentum<T>;
7333 fn mul(self, rhs: &Time<T>) -> Self::Output {
7334 Momentum{kgmps: self.N * rhs.s.clone()}
7335 }
7336}
7337impl<T> core::ops::Mul<&Time<T>> for &Force<T> where T: NumLike {
7339 type Output = Momentum<T>;
7340 fn mul(self, rhs: &Time<T>) -> Self::Output {
7341 Momentum{kgmps: self.N.clone() * rhs.s.clone()}
7342 }
7343}
7344
7345impl<T> core::ops::Div<Area<T>> for Force<T> where T: NumLike {
7348 type Output = Pressure<T>;
7349 fn div(self, rhs: Area<T>) -> Self::Output {
7350 Pressure{Pa: self.N / rhs.m2}
7351 }
7352}
7353impl<T> core::ops::Div<Area<T>> for &Force<T> where T: NumLike {
7355 type Output = Pressure<T>;
7356 fn div(self, rhs: Area<T>) -> Self::Output {
7357 Pressure{Pa: self.N.clone() / rhs.m2}
7358 }
7359}
7360impl<T> core::ops::Div<&Area<T>> for Force<T> where T: NumLike {
7362 type Output = Pressure<T>;
7363 fn div(self, rhs: &Area<T>) -> Self::Output {
7364 Pressure{Pa: self.N / rhs.m2.clone()}
7365 }
7366}
7367impl<T> core::ops::Div<&Area<T>> for &Force<T> where T: NumLike {
7369 type Output = Pressure<T>;
7370 fn div(self, rhs: &Area<T>) -> Self::Output {
7371 Pressure{Pa: self.N.clone() / rhs.m2.clone()}
7372 }
7373}
7374
7375impl<T> core::ops::Mul<InverseArea<T>> for Force<T> where T: NumLike {
7378 type Output = Pressure<T>;
7379 fn mul(self, rhs: InverseArea<T>) -> Self::Output {
7380 Pressure{Pa: self.N * rhs.per_m2}
7381 }
7382}
7383impl<T> core::ops::Mul<InverseArea<T>> for &Force<T> where T: NumLike {
7385 type Output = Pressure<T>;
7386 fn mul(self, rhs: InverseArea<T>) -> Self::Output {
7387 Pressure{Pa: self.N.clone() * rhs.per_m2}
7388 }
7389}
7390impl<T> core::ops::Mul<&InverseArea<T>> for Force<T> where T: NumLike {
7392 type Output = Pressure<T>;
7393 fn mul(self, rhs: &InverseArea<T>) -> Self::Output {
7394 Pressure{Pa: self.N * rhs.per_m2.clone()}
7395 }
7396}
7397impl<T> core::ops::Mul<&InverseArea<T>> for &Force<T> where T: NumLike {
7399 type Output = Pressure<T>;
7400 fn mul(self, rhs: &InverseArea<T>) -> Self::Output {
7401 Pressure{Pa: self.N.clone() * rhs.per_m2.clone()}
7402 }
7403}
7404
7405impl<T> core::ops::Div<Acceleration<T>> for Force<T> where T: NumLike {
7408 type Output = Mass<T>;
7409 fn div(self, rhs: Acceleration<T>) -> Self::Output {
7410 Mass{kg: self.N / rhs.mps2}
7411 }
7412}
7413impl<T> core::ops::Div<Acceleration<T>> for &Force<T> where T: NumLike {
7415 type Output = Mass<T>;
7416 fn div(self, rhs: Acceleration<T>) -> Self::Output {
7417 Mass{kg: self.N.clone() / rhs.mps2}
7418 }
7419}
7420impl<T> core::ops::Div<&Acceleration<T>> for Force<T> where T: NumLike {
7422 type Output = Mass<T>;
7423 fn div(self, rhs: &Acceleration<T>) -> Self::Output {
7424 Mass{kg: self.N / rhs.mps2.clone()}
7425 }
7426}
7427impl<T> core::ops::Div<&Acceleration<T>> for &Force<T> where T: NumLike {
7429 type Output = Mass<T>;
7430 fn div(self, rhs: &Acceleration<T>) -> Self::Output {
7431 Mass{kg: self.N.clone() / rhs.mps2.clone()}
7432 }
7433}
7434
7435impl<T> core::ops::Div<Energy<T>> for Force<T> where T: NumLike {
7438 type Output = InverseDistance<T>;
7439 fn div(self, rhs: Energy<T>) -> Self::Output {
7440 InverseDistance{per_m: self.N / rhs.J}
7441 }
7442}
7443impl<T> core::ops::Div<Energy<T>> for &Force<T> where T: NumLike {
7445 type Output = InverseDistance<T>;
7446 fn div(self, rhs: Energy<T>) -> Self::Output {
7447 InverseDistance{per_m: self.N.clone() / rhs.J}
7448 }
7449}
7450impl<T> core::ops::Div<&Energy<T>> for Force<T> where T: NumLike {
7452 type Output = InverseDistance<T>;
7453 fn div(self, rhs: &Energy<T>) -> Self::Output {
7454 InverseDistance{per_m: self.N / rhs.J.clone()}
7455 }
7456}
7457impl<T> core::ops::Div<&Energy<T>> for &Force<T> where T: NumLike {
7459 type Output = InverseDistance<T>;
7460 fn div(self, rhs: &Energy<T>) -> Self::Output {
7461 InverseDistance{per_m: self.N.clone() / rhs.J.clone()}
7462 }
7463}
7464
7465impl<T> core::ops::Div<Torque<T>> for Force<T> where T: NumLike {
7468 type Output = InverseDistance<T>;
7469 fn div(self, rhs: Torque<T>) -> Self::Output {
7470 InverseDistance{per_m: self.N / rhs.Nm}
7471 }
7472}
7473impl<T> core::ops::Div<Torque<T>> for &Force<T> where T: NumLike {
7475 type Output = InverseDistance<T>;
7476 fn div(self, rhs: Torque<T>) -> Self::Output {
7477 InverseDistance{per_m: self.N.clone() / rhs.Nm}
7478 }
7479}
7480impl<T> core::ops::Div<&Torque<T>> for Force<T> where T: NumLike {
7482 type Output = InverseDistance<T>;
7483 fn div(self, rhs: &Torque<T>) -> Self::Output {
7484 InverseDistance{per_m: self.N / rhs.Nm.clone()}
7485 }
7486}
7487impl<T> core::ops::Div<&Torque<T>> for &Force<T> where T: NumLike {
7489 type Output = InverseDistance<T>;
7490 fn div(self, rhs: &Torque<T>) -> Self::Output {
7491 InverseDistance{per_m: self.N.clone() / rhs.Nm.clone()}
7492 }
7493}
7494
7495impl<T> core::ops::Div<Frequency<T>> for Force<T> where T: NumLike {
7498 type Output = Momentum<T>;
7499 fn div(self, rhs: Frequency<T>) -> Self::Output {
7500 Momentum{kgmps: self.N / rhs.Hz}
7501 }
7502}
7503impl<T> core::ops::Div<Frequency<T>> for &Force<T> where T: NumLike {
7505 type Output = Momentum<T>;
7506 fn div(self, rhs: Frequency<T>) -> Self::Output {
7507 Momentum{kgmps: self.N.clone() / rhs.Hz}
7508 }
7509}
7510impl<T> core::ops::Div<&Frequency<T>> for Force<T> where T: NumLike {
7512 type Output = Momentum<T>;
7513 fn div(self, rhs: &Frequency<T>) -> Self::Output {
7514 Momentum{kgmps: self.N / rhs.Hz.clone()}
7515 }
7516}
7517impl<T> core::ops::Div<&Frequency<T>> for &Force<T> where T: NumLike {
7519 type Output = Momentum<T>;
7520 fn div(self, rhs: &Frequency<T>) -> Self::Output {
7521 Momentum{kgmps: self.N.clone() / rhs.Hz.clone()}
7522 }
7523}
7524
7525impl<T> core::ops::Mul<InverseAcceleration<T>> for Force<T> where T: NumLike {
7528 type Output = Mass<T>;
7529 fn mul(self, rhs: InverseAcceleration<T>) -> Self::Output {
7530 Mass{kg: self.N * rhs.s2pm}
7531 }
7532}
7533impl<T> core::ops::Mul<InverseAcceleration<T>> for &Force<T> where T: NumLike {
7535 type Output = Mass<T>;
7536 fn mul(self, rhs: InverseAcceleration<T>) -> Self::Output {
7537 Mass{kg: self.N.clone() * rhs.s2pm}
7538 }
7539}
7540impl<T> core::ops::Mul<&InverseAcceleration<T>> for Force<T> where T: NumLike {
7542 type Output = Mass<T>;
7543 fn mul(self, rhs: &InverseAcceleration<T>) -> Self::Output {
7544 Mass{kg: self.N * rhs.s2pm.clone()}
7545 }
7546}
7547impl<T> core::ops::Mul<&InverseAcceleration<T>> for &Force<T> where T: NumLike {
7549 type Output = Mass<T>;
7550 fn mul(self, rhs: &InverseAcceleration<T>) -> Self::Output {
7551 Mass{kg: self.N.clone() * rhs.s2pm.clone()}
7552 }
7553}
7554
7555impl<T> core::ops::Mul<InverseEnergy<T>> for Force<T> where T: NumLike {
7558 type Output = InverseDistance<T>;
7559 fn mul(self, rhs: InverseEnergy<T>) -> Self::Output {
7560 InverseDistance{per_m: self.N * rhs.per_J}
7561 }
7562}
7563impl<T> core::ops::Mul<InverseEnergy<T>> for &Force<T> where T: NumLike {
7565 type Output = InverseDistance<T>;
7566 fn mul(self, rhs: InverseEnergy<T>) -> Self::Output {
7567 InverseDistance{per_m: self.N.clone() * rhs.per_J}
7568 }
7569}
7570impl<T> core::ops::Mul<&InverseEnergy<T>> for Force<T> where T: NumLike {
7572 type Output = InverseDistance<T>;
7573 fn mul(self, rhs: &InverseEnergy<T>) -> Self::Output {
7574 InverseDistance{per_m: self.N * rhs.per_J.clone()}
7575 }
7576}
7577impl<T> core::ops::Mul<&InverseEnergy<T>> for &Force<T> where T: NumLike {
7579 type Output = InverseDistance<T>;
7580 fn mul(self, rhs: &InverseEnergy<T>) -> Self::Output {
7581 InverseDistance{per_m: self.N.clone() * rhs.per_J.clone()}
7582 }
7583}
7584
7585impl<T> core::ops::Mul<InverseTorque<T>> for Force<T> where T: NumLike {
7588 type Output = InverseDistance<T>;
7589 fn mul(self, rhs: InverseTorque<T>) -> Self::Output {
7590 InverseDistance{per_m: self.N * rhs.per_Nm}
7591 }
7592}
7593impl<T> core::ops::Mul<InverseTorque<T>> for &Force<T> where T: NumLike {
7595 type Output = InverseDistance<T>;
7596 fn mul(self, rhs: InverseTorque<T>) -> Self::Output {
7597 InverseDistance{per_m: self.N.clone() * rhs.per_Nm}
7598 }
7599}
7600impl<T> core::ops::Mul<&InverseTorque<T>> for Force<T> where T: NumLike {
7602 type Output = InverseDistance<T>;
7603 fn mul(self, rhs: &InverseTorque<T>) -> Self::Output {
7604 InverseDistance{per_m: self.N * rhs.per_Nm.clone()}
7605 }
7606}
7607impl<T> core::ops::Mul<&InverseTorque<T>> for &Force<T> where T: NumLike {
7609 type Output = InverseDistance<T>;
7610 fn mul(self, rhs: &InverseTorque<T>) -> Self::Output {
7611 InverseDistance{per_m: self.N.clone() * rhs.per_Nm.clone()}
7612 }
7613}
7614
7615impl<T> core::ops::Mul<InverseMomentum<T>> for Force<T> where T: NumLike {
7618 type Output = Frequency<T>;
7619 fn mul(self, rhs: InverseMomentum<T>) -> Self::Output {
7620 Frequency{Hz: self.N * rhs.s_per_kgm}
7621 }
7622}
7623impl<T> core::ops::Mul<InverseMomentum<T>> for &Force<T> where T: NumLike {
7625 type Output = Frequency<T>;
7626 fn mul(self, rhs: InverseMomentum<T>) -> Self::Output {
7627 Frequency{Hz: self.N.clone() * rhs.s_per_kgm}
7628 }
7629}
7630impl<T> core::ops::Mul<&InverseMomentum<T>> for Force<T> where T: NumLike {
7632 type Output = Frequency<T>;
7633 fn mul(self, rhs: &InverseMomentum<T>) -> Self::Output {
7634 Frequency{Hz: self.N * rhs.s_per_kgm.clone()}
7635 }
7636}
7637impl<T> core::ops::Mul<&InverseMomentum<T>> for &Force<T> where T: NumLike {
7639 type Output = Frequency<T>;
7640 fn mul(self, rhs: &InverseMomentum<T>) -> Self::Output {
7641 Frequency{Hz: self.N.clone() * rhs.s_per_kgm.clone()}
7642 }
7643}
7644
7645impl<T> core::ops::Mul<InversePower<T>> for Force<T> where T: NumLike {
7648 type Output = TimePerDistance<T>;
7649 fn mul(self, rhs: InversePower<T>) -> Self::Output {
7650 TimePerDistance{spm: self.N * rhs.per_W}
7651 }
7652}
7653impl<T> core::ops::Mul<InversePower<T>> for &Force<T> where T: NumLike {
7655 type Output = TimePerDistance<T>;
7656 fn mul(self, rhs: InversePower<T>) -> Self::Output {
7657 TimePerDistance{spm: self.N.clone() * rhs.per_W}
7658 }
7659}
7660impl<T> core::ops::Mul<&InversePower<T>> for Force<T> where T: NumLike {
7662 type Output = TimePerDistance<T>;
7663 fn mul(self, rhs: &InversePower<T>) -> Self::Output {
7664 TimePerDistance{spm: self.N * rhs.per_W.clone()}
7665 }
7666}
7667impl<T> core::ops::Mul<&InversePower<T>> for &Force<T> where T: NumLike {
7669 type Output = TimePerDistance<T>;
7670 fn mul(self, rhs: &InversePower<T>) -> Self::Output {
7671 TimePerDistance{spm: self.N.clone() * rhs.per_W.clone()}
7672 }
7673}
7674
7675impl<T> core::ops::Mul<InversePressure<T>> for Force<T> where T: NumLike {
7678 type Output = Area<T>;
7679 fn mul(self, rhs: InversePressure<T>) -> Self::Output {
7680 Area{m2: self.N * rhs.per_Pa}
7681 }
7682}
7683impl<T> core::ops::Mul<InversePressure<T>> for &Force<T> where T: NumLike {
7685 type Output = Area<T>;
7686 fn mul(self, rhs: InversePressure<T>) -> Self::Output {
7687 Area{m2: self.N.clone() * rhs.per_Pa}
7688 }
7689}
7690impl<T> core::ops::Mul<&InversePressure<T>> for Force<T> where T: NumLike {
7692 type Output = Area<T>;
7693 fn mul(self, rhs: &InversePressure<T>) -> Self::Output {
7694 Area{m2: self.N * rhs.per_Pa.clone()}
7695 }
7696}
7697impl<T> core::ops::Mul<&InversePressure<T>> for &Force<T> where T: NumLike {
7699 type Output = Area<T>;
7700 fn mul(self, rhs: &InversePressure<T>) -> Self::Output {
7701 Area{m2: self.N.clone() * rhs.per_Pa.clone()}
7702 }
7703}
7704
7705impl<T> core::ops::Div<Momentum<T>> for Force<T> where T: NumLike {
7708 type Output = Frequency<T>;
7709 fn div(self, rhs: Momentum<T>) -> Self::Output {
7710 Frequency{Hz: self.N / rhs.kgmps}
7711 }
7712}
7713impl<T> core::ops::Div<Momentum<T>> for &Force<T> where T: NumLike {
7715 type Output = Frequency<T>;
7716 fn div(self, rhs: Momentum<T>) -> Self::Output {
7717 Frequency{Hz: self.N.clone() / rhs.kgmps}
7718 }
7719}
7720impl<T> core::ops::Div<&Momentum<T>> for Force<T> where T: NumLike {
7722 type Output = Frequency<T>;
7723 fn div(self, rhs: &Momentum<T>) -> Self::Output {
7724 Frequency{Hz: self.N / rhs.kgmps.clone()}
7725 }
7726}
7727impl<T> core::ops::Div<&Momentum<T>> for &Force<T> where T: NumLike {
7729 type Output = Frequency<T>;
7730 fn div(self, rhs: &Momentum<T>) -> Self::Output {
7731 Frequency{Hz: self.N.clone() / rhs.kgmps.clone()}
7732 }
7733}
7734
7735impl<T> core::ops::Div<Power<T>> for Force<T> where T: NumLike {
7738 type Output = TimePerDistance<T>;
7739 fn div(self, rhs: Power<T>) -> Self::Output {
7740 TimePerDistance{spm: self.N / rhs.W}
7741 }
7742}
7743impl<T> core::ops::Div<Power<T>> for &Force<T> where T: NumLike {
7745 type Output = TimePerDistance<T>;
7746 fn div(self, rhs: Power<T>) -> Self::Output {
7747 TimePerDistance{spm: self.N.clone() / rhs.W}
7748 }
7749}
7750impl<T> core::ops::Div<&Power<T>> for Force<T> where T: NumLike {
7752 type Output = TimePerDistance<T>;
7753 fn div(self, rhs: &Power<T>) -> Self::Output {
7754 TimePerDistance{spm: self.N / rhs.W.clone()}
7755 }
7756}
7757impl<T> core::ops::Div<&Power<T>> for &Force<T> where T: NumLike {
7759 type Output = TimePerDistance<T>;
7760 fn div(self, rhs: &Power<T>) -> Self::Output {
7761 TimePerDistance{spm: self.N.clone() / rhs.W.clone()}
7762 }
7763}
7764
7765impl<T> core::ops::Div<Pressure<T>> for Force<T> where T: NumLike {
7768 type Output = Area<T>;
7769 fn div(self, rhs: Pressure<T>) -> Self::Output {
7770 Area{m2: self.N / rhs.Pa}
7771 }
7772}
7773impl<T> core::ops::Div<Pressure<T>> for &Force<T> where T: NumLike {
7775 type Output = Area<T>;
7776 fn div(self, rhs: Pressure<T>) -> Self::Output {
7777 Area{m2: self.N.clone() / rhs.Pa}
7778 }
7779}
7780impl<T> core::ops::Div<&Pressure<T>> for Force<T> where T: NumLike {
7782 type Output = Area<T>;
7783 fn div(self, rhs: &Pressure<T>) -> Self::Output {
7784 Area{m2: self.N / rhs.Pa.clone()}
7785 }
7786}
7787impl<T> core::ops::Div<&Pressure<T>> for &Force<T> where T: NumLike {
7789 type Output = Area<T>;
7790 fn div(self, rhs: &Pressure<T>) -> Self::Output {
7791 Area{m2: self.N.clone() / rhs.Pa.clone()}
7792 }
7793}
7794
7795impl<T> core::ops::Div<TimePerDistance<T>> for Force<T> where T: NumLike {
7798 type Output = Power<T>;
7799 fn div(self, rhs: TimePerDistance<T>) -> Self::Output {
7800 Power{W: self.N / rhs.spm}
7801 }
7802}
7803impl<T> core::ops::Div<TimePerDistance<T>> for &Force<T> where T: NumLike {
7805 type Output = Power<T>;
7806 fn div(self, rhs: TimePerDistance<T>) -> Self::Output {
7807 Power{W: self.N.clone() / rhs.spm}
7808 }
7809}
7810impl<T> core::ops::Div<&TimePerDistance<T>> for Force<T> where T: NumLike {
7812 type Output = Power<T>;
7813 fn div(self, rhs: &TimePerDistance<T>) -> Self::Output {
7814 Power{W: self.N / rhs.spm.clone()}
7815 }
7816}
7817impl<T> core::ops::Div<&TimePerDistance<T>> for &Force<T> where T: NumLike {
7819 type Output = Power<T>;
7820 fn div(self, rhs: &TimePerDistance<T>) -> Self::Output {
7821 Power{W: self.N.clone() / rhs.spm.clone()}
7822 }
7823}
7824
7825impl<T> core::ops::Mul<Velocity<T>> for Force<T> where T: NumLike {
7828 type Output = Power<T>;
7829 fn mul(self, rhs: Velocity<T>) -> Self::Output {
7830 Power{W: self.N * rhs.mps}
7831 }
7832}
7833impl<T> core::ops::Mul<Velocity<T>> for &Force<T> where T: NumLike {
7835 type Output = Power<T>;
7836 fn mul(self, rhs: Velocity<T>) -> Self::Output {
7837 Power{W: self.N.clone() * rhs.mps}
7838 }
7839}
7840impl<T> core::ops::Mul<&Velocity<T>> for Force<T> where T: NumLike {
7842 type Output = Power<T>;
7843 fn mul(self, rhs: &Velocity<T>) -> Self::Output {
7844 Power{W: self.N * rhs.mps.clone()}
7845 }
7846}
7847impl<T> core::ops::Mul<&Velocity<T>> for &Force<T> where T: NumLike {
7849 type Output = Power<T>;
7850 fn mul(self, rhs: &Velocity<T>) -> Self::Output {
7851 Power{W: self.N.clone() * rhs.mps.clone()}
7852 }
7853}
7854
7855impl<T> core::ops::Div<Force<T>> for f64 where T: NumLike+From<f64> {
7858 type Output = InverseForce<T>;
7859 fn div(self, rhs: Force<T>) -> Self::Output {
7860 InverseForce{per_N: T::from(self) / rhs.N}
7861 }
7862}
7863impl<T> core::ops::Div<Force<T>> for &f64 where T: NumLike+From<f64> {
7865 type Output = InverseForce<T>;
7866 fn div(self, rhs: Force<T>) -> Self::Output {
7867 InverseForce{per_N: T::from(self.clone()) / rhs.N}
7868 }
7869}
7870impl<T> core::ops::Div<&Force<T>> for f64 where T: NumLike+From<f64> {
7872 type Output = InverseForce<T>;
7873 fn div(self, rhs: &Force<T>) -> Self::Output {
7874 InverseForce{per_N: T::from(self) / rhs.N.clone()}
7875 }
7876}
7877impl<T> core::ops::Div<&Force<T>> for &f64 where T: NumLike+From<f64> {
7879 type Output = InverseForce<T>;
7880 fn div(self, rhs: &Force<T>) -> Self::Output {
7881 InverseForce{per_N: T::from(self.clone()) / rhs.N.clone()}
7882 }
7883}
7884
7885impl<T> core::ops::Div<Force<T>> for f32 where T: NumLike+From<f32> {
7888 type Output = InverseForce<T>;
7889 fn div(self, rhs: Force<T>) -> Self::Output {
7890 InverseForce{per_N: T::from(self) / rhs.N}
7891 }
7892}
7893impl<T> core::ops::Div<Force<T>> for &f32 where T: NumLike+From<f32> {
7895 type Output = InverseForce<T>;
7896 fn div(self, rhs: Force<T>) -> Self::Output {
7897 InverseForce{per_N: T::from(self.clone()) / rhs.N}
7898 }
7899}
7900impl<T> core::ops::Div<&Force<T>> for f32 where T: NumLike+From<f32> {
7902 type Output = InverseForce<T>;
7903 fn div(self, rhs: &Force<T>) -> Self::Output {
7904 InverseForce{per_N: T::from(self) / rhs.N.clone()}
7905 }
7906}
7907impl<T> core::ops::Div<&Force<T>> for &f32 where T: NumLike+From<f32> {
7909 type Output = InverseForce<T>;
7910 fn div(self, rhs: &Force<T>) -> Self::Output {
7911 InverseForce{per_N: T::from(self.clone()) / rhs.N.clone()}
7912 }
7913}
7914
7915impl<T> core::ops::Div<Force<T>> for i64 where T: NumLike+From<i64> {
7918 type Output = InverseForce<T>;
7919 fn div(self, rhs: Force<T>) -> Self::Output {
7920 InverseForce{per_N: T::from(self) / rhs.N}
7921 }
7922}
7923impl<T> core::ops::Div<Force<T>> for &i64 where T: NumLike+From<i64> {
7925 type Output = InverseForce<T>;
7926 fn div(self, rhs: Force<T>) -> Self::Output {
7927 InverseForce{per_N: T::from(self.clone()) / rhs.N}
7928 }
7929}
7930impl<T> core::ops::Div<&Force<T>> for i64 where T: NumLike+From<i64> {
7932 type Output = InverseForce<T>;
7933 fn div(self, rhs: &Force<T>) -> Self::Output {
7934 InverseForce{per_N: T::from(self) / rhs.N.clone()}
7935 }
7936}
7937impl<T> core::ops::Div<&Force<T>> for &i64 where T: NumLike+From<i64> {
7939 type Output = InverseForce<T>;
7940 fn div(self, rhs: &Force<T>) -> Self::Output {
7941 InverseForce{per_N: T::from(self.clone()) / rhs.N.clone()}
7942 }
7943}
7944
7945impl<T> core::ops::Div<Force<T>> for i32 where T: NumLike+From<i32> {
7948 type Output = InverseForce<T>;
7949 fn div(self, rhs: Force<T>) -> Self::Output {
7950 InverseForce{per_N: T::from(self) / rhs.N}
7951 }
7952}
7953impl<T> core::ops::Div<Force<T>> for &i32 where T: NumLike+From<i32> {
7955 type Output = InverseForce<T>;
7956 fn div(self, rhs: Force<T>) -> Self::Output {
7957 InverseForce{per_N: T::from(self.clone()) / rhs.N}
7958 }
7959}
7960impl<T> core::ops::Div<&Force<T>> for i32 where T: NumLike+From<i32> {
7962 type Output = InverseForce<T>;
7963 fn div(self, rhs: &Force<T>) -> Self::Output {
7964 InverseForce{per_N: T::from(self) / rhs.N.clone()}
7965 }
7966}
7967impl<T> core::ops::Div<&Force<T>> for &i32 where T: NumLike+From<i32> {
7969 type Output = InverseForce<T>;
7970 fn div(self, rhs: &Force<T>) -> Self::Output {
7971 InverseForce{per_N: T::from(self.clone()) / rhs.N.clone()}
7972 }
7973}
7974
7975#[cfg(feature="num-bigfloat")]
7978impl<T> core::ops::Div<Force<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
7979 type Output = InverseForce<T>;
7980 fn div(self, rhs: Force<T>) -> Self::Output {
7981 InverseForce{per_N: T::from(self) / rhs.N}
7982 }
7983}
7984#[cfg(feature="num-bigfloat")]
7986impl<T> core::ops::Div<Force<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
7987 type Output = InverseForce<T>;
7988 fn div(self, rhs: Force<T>) -> Self::Output {
7989 InverseForce{per_N: T::from(self.clone()) / rhs.N}
7990 }
7991}
7992#[cfg(feature="num-bigfloat")]
7994impl<T> core::ops::Div<&Force<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
7995 type Output = InverseForce<T>;
7996 fn div(self, rhs: &Force<T>) -> Self::Output {
7997 InverseForce{per_N: T::from(self) / rhs.N.clone()}
7998 }
7999}
8000#[cfg(feature="num-bigfloat")]
8002impl<T> core::ops::Div<&Force<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
8003 type Output = InverseForce<T>;
8004 fn div(self, rhs: &Force<T>) -> Self::Output {
8005 InverseForce{per_N: T::from(self.clone()) / rhs.N.clone()}
8006 }
8007}
8008
8009#[cfg(feature="num-complex")]
8012impl<T> core::ops::Div<Force<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
8013 type Output = InverseForce<T>;
8014 fn div(self, rhs: Force<T>) -> Self::Output {
8015 InverseForce{per_N: T::from(self) / rhs.N}
8016 }
8017}
8018#[cfg(feature="num-complex")]
8020impl<T> core::ops::Div<Force<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
8021 type Output = InverseForce<T>;
8022 fn div(self, rhs: Force<T>) -> Self::Output {
8023 InverseForce{per_N: T::from(self.clone()) / rhs.N}
8024 }
8025}
8026#[cfg(feature="num-complex")]
8028impl<T> core::ops::Div<&Force<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
8029 type Output = InverseForce<T>;
8030 fn div(self, rhs: &Force<T>) -> Self::Output {
8031 InverseForce{per_N: T::from(self) / rhs.N.clone()}
8032 }
8033}
8034#[cfg(feature="num-complex")]
8036impl<T> core::ops::Div<&Force<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
8037 type Output = InverseForce<T>;
8038 fn div(self, rhs: &Force<T>) -> Self::Output {
8039 InverseForce{per_N: T::from(self.clone()) / rhs.N.clone()}
8040 }
8041}
8042
8043#[cfg(feature="num-complex")]
8046impl<T> core::ops::Div<Force<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
8047 type Output = InverseForce<T>;
8048 fn div(self, rhs: Force<T>) -> Self::Output {
8049 InverseForce{per_N: T::from(self) / rhs.N}
8050 }
8051}
8052#[cfg(feature="num-complex")]
8054impl<T> core::ops::Div<Force<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
8055 type Output = InverseForce<T>;
8056 fn div(self, rhs: Force<T>) -> Self::Output {
8057 InverseForce{per_N: T::from(self.clone()) / rhs.N}
8058 }
8059}
8060#[cfg(feature="num-complex")]
8062impl<T> core::ops::Div<&Force<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
8063 type Output = InverseForce<T>;
8064 fn div(self, rhs: &Force<T>) -> Self::Output {
8065 InverseForce{per_N: T::from(self) / rhs.N.clone()}
8066 }
8067}
8068#[cfg(feature="num-complex")]
8070impl<T> core::ops::Div<&Force<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
8071 type Output = InverseForce<T>;
8072 fn div(self, rhs: &Force<T>) -> Self::Output {
8073 InverseForce{per_N: T::from(self.clone()) / rhs.N.clone()}
8074 }
8075}
8076
8077#[derive(UnitStruct, Debug, Clone)]
8079#[cfg_attr(feature="serde", derive(Serialize, Deserialize))]
8080pub struct Frequency<T: NumLike>{
8081 pub Hz: T
8083}
8084
8085impl<T> Frequency<T> where T: NumLike {
8086
8087 pub fn unit_name() -> &'static str { "hertz" }
8089
8090 pub fn unit_symbol() -> &'static str { "Hz" }
8092
8093 pub fn from_Hz(Hz: T) -> Self { Frequency{Hz: Hz} }
8098
8099 pub fn to_Hz(&self) -> T { self.Hz.clone() }
8101
8102 pub fn from_hertz(hertz: T) -> Self { Frequency{Hz: hertz} }
8107
8108 pub fn to_hertz(&self) -> T { self.Hz.clone() }
8110
8111}
8112
8113impl<T> fmt::Display for Frequency<T> where T: NumLike {
8114 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
8115 write!(f, "{} {}", &self.Hz, Self::unit_symbol())
8116 }
8117}
8118
8119impl<T> Frequency<T> where T: NumLike+From<f64> {
8120
8121 pub fn to_kHz(&self) -> T {
8125 return self.Hz.clone() * T::from(0.001_f64);
8126 }
8127
8128 pub fn from_kHz(kHz: T) -> Self {
8135 Frequency{Hz: kHz * T::from(1000.0_f64)}
8136 }
8137
8138 pub fn to_MHz(&self) -> T {
8142 return self.Hz.clone() * T::from(1e-06_f64);
8143 }
8144
8145 pub fn from_MHz(MHz: T) -> Self {
8152 Frequency{Hz: MHz * T::from(1000000.0_f64)}
8153 }
8154
8155 pub fn to_GHz(&self) -> T {
8159 return self.Hz.clone() * T::from(1e-09_f64);
8160 }
8161
8162 pub fn from_GHz(GHz: T) -> Self {
8169 Frequency{Hz: GHz * T::from(1000000000.0_f64)}
8170 }
8171
8172 pub fn to_THz(&self) -> T {
8176 return self.Hz.clone() * T::from(1e-12_f64);
8177 }
8178
8179 pub fn from_THz(THz: T) -> Self {
8186 Frequency{Hz: THz * T::from(1000000000000.0_f64)}
8187 }
8188
8189}
8190
8191
8192#[cfg(feature="num-bigfloat")]
8194impl core::ops::Mul<Frequency<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
8195 type Output = Frequency<num_bigfloat::BigFloat>;
8196 fn mul(self, rhs: Frequency<num_bigfloat::BigFloat>) -> Self::Output {
8197 Frequency{Hz: self * rhs.Hz}
8198 }
8199}
8200#[cfg(feature="num-bigfloat")]
8202impl core::ops::Mul<Frequency<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
8203 type Output = Frequency<num_bigfloat::BigFloat>;
8204 fn mul(self, rhs: Frequency<num_bigfloat::BigFloat>) -> Self::Output {
8205 Frequency{Hz: self.clone() * rhs.Hz}
8206 }
8207}
8208#[cfg(feature="num-bigfloat")]
8210impl core::ops::Mul<&Frequency<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
8211 type Output = Frequency<num_bigfloat::BigFloat>;
8212 fn mul(self, rhs: &Frequency<num_bigfloat::BigFloat>) -> Self::Output {
8213 Frequency{Hz: self * rhs.Hz.clone()}
8214 }
8215}
8216#[cfg(feature="num-bigfloat")]
8218impl core::ops::Mul<&Frequency<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
8219 type Output = Frequency<num_bigfloat::BigFloat>;
8220 fn mul(self, rhs: &Frequency<num_bigfloat::BigFloat>) -> Self::Output {
8221 Frequency{Hz: self.clone() * rhs.Hz.clone()}
8222 }
8223}
8224
8225#[cfg(feature="num-complex")]
8227impl core::ops::Mul<Frequency<num_complex::Complex32>> for num_complex::Complex32 {
8228 type Output = Frequency<num_complex::Complex32>;
8229 fn mul(self, rhs: Frequency<num_complex::Complex32>) -> Self::Output {
8230 Frequency{Hz: self * rhs.Hz}
8231 }
8232}
8233#[cfg(feature="num-complex")]
8235impl core::ops::Mul<Frequency<num_complex::Complex32>> for &num_complex::Complex32 {
8236 type Output = Frequency<num_complex::Complex32>;
8237 fn mul(self, rhs: Frequency<num_complex::Complex32>) -> Self::Output {
8238 Frequency{Hz: self.clone() * rhs.Hz}
8239 }
8240}
8241#[cfg(feature="num-complex")]
8243impl core::ops::Mul<&Frequency<num_complex::Complex32>> for num_complex::Complex32 {
8244 type Output = Frequency<num_complex::Complex32>;
8245 fn mul(self, rhs: &Frequency<num_complex::Complex32>) -> Self::Output {
8246 Frequency{Hz: self * rhs.Hz.clone()}
8247 }
8248}
8249#[cfg(feature="num-complex")]
8251impl core::ops::Mul<&Frequency<num_complex::Complex32>> for &num_complex::Complex32 {
8252 type Output = Frequency<num_complex::Complex32>;
8253 fn mul(self, rhs: &Frequency<num_complex::Complex32>) -> Self::Output {
8254 Frequency{Hz: self.clone() * rhs.Hz.clone()}
8255 }
8256}
8257
8258#[cfg(feature="num-complex")]
8260impl core::ops::Mul<Frequency<num_complex::Complex64>> for num_complex::Complex64 {
8261 type Output = Frequency<num_complex::Complex64>;
8262 fn mul(self, rhs: Frequency<num_complex::Complex64>) -> Self::Output {
8263 Frequency{Hz: self * rhs.Hz}
8264 }
8265}
8266#[cfg(feature="num-complex")]
8268impl core::ops::Mul<Frequency<num_complex::Complex64>> for &num_complex::Complex64 {
8269 type Output = Frequency<num_complex::Complex64>;
8270 fn mul(self, rhs: Frequency<num_complex::Complex64>) -> Self::Output {
8271 Frequency{Hz: self.clone() * rhs.Hz}
8272 }
8273}
8274#[cfg(feature="num-complex")]
8276impl core::ops::Mul<&Frequency<num_complex::Complex64>> for num_complex::Complex64 {
8277 type Output = Frequency<num_complex::Complex64>;
8278 fn mul(self, rhs: &Frequency<num_complex::Complex64>) -> Self::Output {
8279 Frequency{Hz: self * rhs.Hz.clone()}
8280 }
8281}
8282#[cfg(feature="num-complex")]
8284impl core::ops::Mul<&Frequency<num_complex::Complex64>> for &num_complex::Complex64 {
8285 type Output = Frequency<num_complex::Complex64>;
8286 fn mul(self, rhs: &Frequency<num_complex::Complex64>) -> Self::Output {
8287 Frequency{Hz: self.clone() * rhs.Hz.clone()}
8288 }
8289}
8290
8291
8292
8293#[cfg(feature = "uom")]
8295impl<T> Into<uom::si::f32::Frequency> for Frequency<T> where T: NumLike+Into<f32> {
8296 fn into(self) -> uom::si::f32::Frequency {
8297 uom::si::f32::Frequency::new::<uom::si::frequency::hertz>(self.Hz.into())
8298 }
8299}
8300
8301#[cfg(feature = "uom")]
8303impl<T> From<uom::si::f32::Frequency> for Frequency<T> where T: NumLike+From<f32> {
8304 fn from(src: uom::si::f32::Frequency) -> Self {
8305 Frequency{Hz: T::from(src.value)}
8306 }
8307}
8308
8309#[cfg(feature = "uom")]
8311impl<T> Into<uom::si::f64::Frequency> for Frequency<T> where T: NumLike+Into<f64> {
8312 fn into(self) -> uom::si::f64::Frequency {
8313 uom::si::f64::Frequency::new::<uom::si::frequency::hertz>(self.Hz.into())
8314 }
8315}
8316
8317#[cfg(feature = "uom")]
8319impl<T> From<uom::si::f64::Frequency> for Frequency<T> where T: NumLike+From<f64> {
8320 fn from(src: uom::si::f64::Frequency) -> Self {
8321 Frequency{Hz: T::from(src.value)}
8322 }
8323}
8324
8325
8326impl<T> core::ops::Mul<Amount<T>> for Frequency<T> where T: NumLike {
8329 type Output = CatalyticActivity<T>;
8330 fn mul(self, rhs: Amount<T>) -> Self::Output {
8331 CatalyticActivity{molps: self.Hz * rhs.mol}
8332 }
8333}
8334impl<T> core::ops::Mul<Amount<T>> for &Frequency<T> where T: NumLike {
8336 type Output = CatalyticActivity<T>;
8337 fn mul(self, rhs: Amount<T>) -> Self::Output {
8338 CatalyticActivity{molps: self.Hz.clone() * rhs.mol}
8339 }
8340}
8341impl<T> core::ops::Mul<&Amount<T>> for Frequency<T> where T: NumLike {
8343 type Output = CatalyticActivity<T>;
8344 fn mul(self, rhs: &Amount<T>) -> Self::Output {
8345 CatalyticActivity{molps: self.Hz * rhs.mol.clone()}
8346 }
8347}
8348impl<T> core::ops::Mul<&Amount<T>> for &Frequency<T> where T: NumLike {
8350 type Output = CatalyticActivity<T>;
8351 fn mul(self, rhs: &Amount<T>) -> Self::Output {
8352 CatalyticActivity{molps: self.Hz.clone() * rhs.mol.clone()}
8353 }
8354}
8355
8356impl<T> core::ops::Div<Current<T>> for Frequency<T> where T: NumLike {
8359 type Output = InverseCharge<T>;
8360 fn div(self, rhs: Current<T>) -> Self::Output {
8361 InverseCharge{per_C: self.Hz / rhs.A}
8362 }
8363}
8364impl<T> core::ops::Div<Current<T>> for &Frequency<T> where T: NumLike {
8366 type Output = InverseCharge<T>;
8367 fn div(self, rhs: Current<T>) -> Self::Output {
8368 InverseCharge{per_C: self.Hz.clone() / rhs.A}
8369 }
8370}
8371impl<T> core::ops::Div<&Current<T>> for Frequency<T> where T: NumLike {
8373 type Output = InverseCharge<T>;
8374 fn div(self, rhs: &Current<T>) -> Self::Output {
8375 InverseCharge{per_C: self.Hz / rhs.A.clone()}
8376 }
8377}
8378impl<T> core::ops::Div<&Current<T>> for &Frequency<T> where T: NumLike {
8380 type Output = InverseCharge<T>;
8381 fn div(self, rhs: &Current<T>) -> Self::Output {
8382 InverseCharge{per_C: self.Hz.clone() / rhs.A.clone()}
8383 }
8384}
8385
8386impl<T> core::ops::Mul<Distance<T>> for Frequency<T> where T: NumLike {
8389 type Output = Velocity<T>;
8390 fn mul(self, rhs: Distance<T>) -> Self::Output {
8391 Velocity{mps: self.Hz * rhs.m}
8392 }
8393}
8394impl<T> core::ops::Mul<Distance<T>> for &Frequency<T> where T: NumLike {
8396 type Output = Velocity<T>;
8397 fn mul(self, rhs: Distance<T>) -> Self::Output {
8398 Velocity{mps: self.Hz.clone() * rhs.m}
8399 }
8400}
8401impl<T> core::ops::Mul<&Distance<T>> for Frequency<T> where T: NumLike {
8403 type Output = Velocity<T>;
8404 fn mul(self, rhs: &Distance<T>) -> Self::Output {
8405 Velocity{mps: self.Hz * rhs.m.clone()}
8406 }
8407}
8408impl<T> core::ops::Mul<&Distance<T>> for &Frequency<T> where T: NumLike {
8410 type Output = Velocity<T>;
8411 fn mul(self, rhs: &Distance<T>) -> Self::Output {
8412 Velocity{mps: self.Hz.clone() * rhs.m.clone()}
8413 }
8414}
8415
8416impl<T> core::ops::Div<InverseAmount<T>> for Frequency<T> where T: NumLike {
8419 type Output = CatalyticActivity<T>;
8420 fn div(self, rhs: InverseAmount<T>) -> Self::Output {
8421 CatalyticActivity{molps: self.Hz / rhs.per_mol}
8422 }
8423}
8424impl<T> core::ops::Div<InverseAmount<T>> for &Frequency<T> where T: NumLike {
8426 type Output = CatalyticActivity<T>;
8427 fn div(self, rhs: InverseAmount<T>) -> Self::Output {
8428 CatalyticActivity{molps: self.Hz.clone() / rhs.per_mol}
8429 }
8430}
8431impl<T> core::ops::Div<&InverseAmount<T>> for Frequency<T> where T: NumLike {
8433 type Output = CatalyticActivity<T>;
8434 fn div(self, rhs: &InverseAmount<T>) -> Self::Output {
8435 CatalyticActivity{molps: self.Hz / rhs.per_mol.clone()}
8436 }
8437}
8438impl<T> core::ops::Div<&InverseAmount<T>> for &Frequency<T> where T: NumLike {
8440 type Output = CatalyticActivity<T>;
8441 fn div(self, rhs: &InverseAmount<T>) -> Self::Output {
8442 CatalyticActivity{molps: self.Hz.clone() / rhs.per_mol.clone()}
8443 }
8444}
8445
8446impl<T> core::ops::Mul<InverseCurrent<T>> for Frequency<T> where T: NumLike {
8449 type Output = InverseCharge<T>;
8450 fn mul(self, rhs: InverseCurrent<T>) -> Self::Output {
8451 InverseCharge{per_C: self.Hz * rhs.per_A}
8452 }
8453}
8454impl<T> core::ops::Mul<InverseCurrent<T>> for &Frequency<T> where T: NumLike {
8456 type Output = InverseCharge<T>;
8457 fn mul(self, rhs: InverseCurrent<T>) -> Self::Output {
8458 InverseCharge{per_C: self.Hz.clone() * rhs.per_A}
8459 }
8460}
8461impl<T> core::ops::Mul<&InverseCurrent<T>> for Frequency<T> where T: NumLike {
8463 type Output = InverseCharge<T>;
8464 fn mul(self, rhs: &InverseCurrent<T>) -> Self::Output {
8465 InverseCharge{per_C: self.Hz * rhs.per_A.clone()}
8466 }
8467}
8468impl<T> core::ops::Mul<&InverseCurrent<T>> for &Frequency<T> where T: NumLike {
8470 type Output = InverseCharge<T>;
8471 fn mul(self, rhs: &InverseCurrent<T>) -> Self::Output {
8472 InverseCharge{per_C: self.Hz.clone() * rhs.per_A.clone()}
8473 }
8474}
8475
8476impl<T> core::ops::Div<InverseDistance<T>> for Frequency<T> where T: NumLike {
8479 type Output = Velocity<T>;
8480 fn div(self, rhs: InverseDistance<T>) -> Self::Output {
8481 Velocity{mps: self.Hz / rhs.per_m}
8482 }
8483}
8484impl<T> core::ops::Div<InverseDistance<T>> for &Frequency<T> where T: NumLike {
8486 type Output = Velocity<T>;
8487 fn div(self, rhs: InverseDistance<T>) -> Self::Output {
8488 Velocity{mps: self.Hz.clone() / rhs.per_m}
8489 }
8490}
8491impl<T> core::ops::Div<&InverseDistance<T>> for Frequency<T> where T: NumLike {
8493 type Output = Velocity<T>;
8494 fn div(self, rhs: &InverseDistance<T>) -> Self::Output {
8495 Velocity{mps: self.Hz / rhs.per_m.clone()}
8496 }
8497}
8498impl<T> core::ops::Div<&InverseDistance<T>> for &Frequency<T> where T: NumLike {
8500 type Output = Velocity<T>;
8501 fn div(self, rhs: &InverseDistance<T>) -> Self::Output {
8502 Velocity{mps: self.Hz.clone() / rhs.per_m.clone()}
8503 }
8504}
8505
8506impl<T> core::ops::Div<CatalyticActivity<T>> for Frequency<T> where T: NumLike {
8509 type Output = InverseAmount<T>;
8510 fn div(self, rhs: CatalyticActivity<T>) -> Self::Output {
8511 InverseAmount{per_mol: self.Hz / rhs.molps}
8512 }
8513}
8514impl<T> core::ops::Div<CatalyticActivity<T>> for &Frequency<T> where T: NumLike {
8516 type Output = InverseAmount<T>;
8517 fn div(self, rhs: CatalyticActivity<T>) -> Self::Output {
8518 InverseAmount{per_mol: self.Hz.clone() / rhs.molps}
8519 }
8520}
8521impl<T> core::ops::Div<&CatalyticActivity<T>> for Frequency<T> where T: NumLike {
8523 type Output = InverseAmount<T>;
8524 fn div(self, rhs: &CatalyticActivity<T>) -> Self::Output {
8525 InverseAmount{per_mol: self.Hz / rhs.molps.clone()}
8526 }
8527}
8528impl<T> core::ops::Div<&CatalyticActivity<T>> for &Frequency<T> where T: NumLike {
8530 type Output = InverseAmount<T>;
8531 fn div(self, rhs: &CatalyticActivity<T>) -> Self::Output {
8532 InverseAmount{per_mol: self.Hz.clone() / rhs.molps.clone()}
8533 }
8534}
8535
8536impl<T> core::ops::Mul<InverseCatalyticActivity<T>> for Frequency<T> where T: NumLike {
8539 type Output = InverseAmount<T>;
8540 fn mul(self, rhs: InverseCatalyticActivity<T>) -> Self::Output {
8541 InverseAmount{per_mol: self.Hz * rhs.s_per_mol}
8542 }
8543}
8544impl<T> core::ops::Mul<InverseCatalyticActivity<T>> for &Frequency<T> where T: NumLike {
8546 type Output = InverseAmount<T>;
8547 fn mul(self, rhs: InverseCatalyticActivity<T>) -> Self::Output {
8548 InverseAmount{per_mol: self.Hz.clone() * rhs.s_per_mol}
8549 }
8550}
8551impl<T> core::ops::Mul<&InverseCatalyticActivity<T>> for Frequency<T> where T: NumLike {
8553 type Output = InverseAmount<T>;
8554 fn mul(self, rhs: &InverseCatalyticActivity<T>) -> Self::Output {
8555 InverseAmount{per_mol: self.Hz * rhs.s_per_mol.clone()}
8556 }
8557}
8558impl<T> core::ops::Mul<&InverseCatalyticActivity<T>> for &Frequency<T> where T: NumLike {
8560 type Output = InverseAmount<T>;
8561 fn mul(self, rhs: &InverseCatalyticActivity<T>) -> Self::Output {
8562 InverseAmount{per_mol: self.Hz.clone() * rhs.s_per_mol.clone()}
8563 }
8564}
8565
8566impl<T> core::ops::Mul<Capacitance<T>> for Frequency<T> where T: NumLike {
8569 type Output = Conductance<T>;
8570 fn mul(self, rhs: Capacitance<T>) -> Self::Output {
8571 Conductance{S: self.Hz * rhs.F}
8572 }
8573}
8574impl<T> core::ops::Mul<Capacitance<T>> for &Frequency<T> where T: NumLike {
8576 type Output = Conductance<T>;
8577 fn mul(self, rhs: Capacitance<T>) -> Self::Output {
8578 Conductance{S: self.Hz.clone() * rhs.F}
8579 }
8580}
8581impl<T> core::ops::Mul<&Capacitance<T>> for Frequency<T> where T: NumLike {
8583 type Output = Conductance<T>;
8584 fn mul(self, rhs: &Capacitance<T>) -> Self::Output {
8585 Conductance{S: self.Hz * rhs.F.clone()}
8586 }
8587}
8588impl<T> core::ops::Mul<&Capacitance<T>> for &Frequency<T> where T: NumLike {
8590 type Output = Conductance<T>;
8591 fn mul(self, rhs: &Capacitance<T>) -> Self::Output {
8592 Conductance{S: self.Hz.clone() * rhs.F.clone()}
8593 }
8594}
8595
8596impl<T> core::ops::Mul<Charge<T>> for Frequency<T> where T: NumLike {
8599 type Output = Current<T>;
8600 fn mul(self, rhs: Charge<T>) -> Self::Output {
8601 Current{A: self.Hz * rhs.C}
8602 }
8603}
8604impl<T> core::ops::Mul<Charge<T>> for &Frequency<T> where T: NumLike {
8606 type Output = Current<T>;
8607 fn mul(self, rhs: Charge<T>) -> Self::Output {
8608 Current{A: self.Hz.clone() * rhs.C}
8609 }
8610}
8611impl<T> core::ops::Mul<&Charge<T>> for Frequency<T> where T: NumLike {
8613 type Output = Current<T>;
8614 fn mul(self, rhs: &Charge<T>) -> Self::Output {
8615 Current{A: self.Hz * rhs.C.clone()}
8616 }
8617}
8618impl<T> core::ops::Mul<&Charge<T>> for &Frequency<T> where T: NumLike {
8620 type Output = Current<T>;
8621 fn mul(self, rhs: &Charge<T>) -> Self::Output {
8622 Current{A: self.Hz.clone() * rhs.C.clone()}
8623 }
8624}
8625
8626impl<T> core::ops::Mul<Conductance<T>> for Frequency<T> where T: NumLike {
8629 type Output = InverseInductance<T>;
8630 fn mul(self, rhs: Conductance<T>) -> Self::Output {
8631 InverseInductance{per_H: self.Hz * rhs.S}
8632 }
8633}
8634impl<T> core::ops::Mul<Conductance<T>> for &Frequency<T> where T: NumLike {
8636 type Output = InverseInductance<T>;
8637 fn mul(self, rhs: Conductance<T>) -> Self::Output {
8638 InverseInductance{per_H: self.Hz.clone() * rhs.S}
8639 }
8640}
8641impl<T> core::ops::Mul<&Conductance<T>> for Frequency<T> where T: NumLike {
8643 type Output = InverseInductance<T>;
8644 fn mul(self, rhs: &Conductance<T>) -> Self::Output {
8645 InverseInductance{per_H: self.Hz * rhs.S.clone()}
8646 }
8647}
8648impl<T> core::ops::Mul<&Conductance<T>> for &Frequency<T> where T: NumLike {
8650 type Output = InverseInductance<T>;
8651 fn mul(self, rhs: &Conductance<T>) -> Self::Output {
8652 InverseInductance{per_H: self.Hz.clone() * rhs.S.clone()}
8653 }
8654}
8655
8656impl<T> core::ops::Div<Conductance<T>> for Frequency<T> where T: NumLike {
8659 type Output = Elastance<T>;
8660 fn div(self, rhs: Conductance<T>) -> Self::Output {
8661 Elastance{per_F: self.Hz / rhs.S}
8662 }
8663}
8664impl<T> core::ops::Div<Conductance<T>> for &Frequency<T> where T: NumLike {
8666 type Output = Elastance<T>;
8667 fn div(self, rhs: Conductance<T>) -> Self::Output {
8668 Elastance{per_F: self.Hz.clone() / rhs.S}
8669 }
8670}
8671impl<T> core::ops::Div<&Conductance<T>> for Frequency<T> where T: NumLike {
8673 type Output = Elastance<T>;
8674 fn div(self, rhs: &Conductance<T>) -> Self::Output {
8675 Elastance{per_F: self.Hz / rhs.S.clone()}
8676 }
8677}
8678impl<T> core::ops::Div<&Conductance<T>> for &Frequency<T> where T: NumLike {
8680 type Output = Elastance<T>;
8681 fn div(self, rhs: &Conductance<T>) -> Self::Output {
8682 Elastance{per_F: self.Hz.clone() / rhs.S.clone()}
8683 }
8684}
8685
8686impl<T> core::ops::Div<Elastance<T>> for Frequency<T> where T: NumLike {
8689 type Output = Conductance<T>;
8690 fn div(self, rhs: Elastance<T>) -> Self::Output {
8691 Conductance{S: self.Hz / rhs.per_F}
8692 }
8693}
8694impl<T> core::ops::Div<Elastance<T>> for &Frequency<T> where T: NumLike {
8696 type Output = Conductance<T>;
8697 fn div(self, rhs: Elastance<T>) -> Self::Output {
8698 Conductance{S: self.Hz.clone() / rhs.per_F}
8699 }
8700}
8701impl<T> core::ops::Div<&Elastance<T>> for Frequency<T> where T: NumLike {
8703 type Output = Conductance<T>;
8704 fn div(self, rhs: &Elastance<T>) -> Self::Output {
8705 Conductance{S: self.Hz / rhs.per_F.clone()}
8706 }
8707}
8708impl<T> core::ops::Div<&Elastance<T>> for &Frequency<T> where T: NumLike {
8710 type Output = Conductance<T>;
8711 fn div(self, rhs: &Elastance<T>) -> Self::Output {
8712 Conductance{S: self.Hz.clone() / rhs.per_F.clone()}
8713 }
8714}
8715
8716impl<T> core::ops::Mul<Inductance<T>> for Frequency<T> where T: NumLike {
8719 type Output = Resistance<T>;
8720 fn mul(self, rhs: Inductance<T>) -> Self::Output {
8721 Resistance{Ohm: self.Hz * rhs.H}
8722 }
8723}
8724impl<T> core::ops::Mul<Inductance<T>> for &Frequency<T> where T: NumLike {
8726 type Output = Resistance<T>;
8727 fn mul(self, rhs: Inductance<T>) -> Self::Output {
8728 Resistance{Ohm: self.Hz.clone() * rhs.H}
8729 }
8730}
8731impl<T> core::ops::Mul<&Inductance<T>> for Frequency<T> where T: NumLike {
8733 type Output = Resistance<T>;
8734 fn mul(self, rhs: &Inductance<T>) -> Self::Output {
8735 Resistance{Ohm: self.Hz * rhs.H.clone()}
8736 }
8737}
8738impl<T> core::ops::Mul<&Inductance<T>> for &Frequency<T> where T: NumLike {
8740 type Output = Resistance<T>;
8741 fn mul(self, rhs: &Inductance<T>) -> Self::Output {
8742 Resistance{Ohm: self.Hz.clone() * rhs.H.clone()}
8743 }
8744}
8745
8746impl<T> core::ops::Div<InverseCharge<T>> for Frequency<T> where T: NumLike {
8749 type Output = Current<T>;
8750 fn div(self, rhs: InverseCharge<T>) -> Self::Output {
8751 Current{A: self.Hz / rhs.per_C}
8752 }
8753}
8754impl<T> core::ops::Div<InverseCharge<T>> for &Frequency<T> where T: NumLike {
8756 type Output = Current<T>;
8757 fn div(self, rhs: InverseCharge<T>) -> Self::Output {
8758 Current{A: self.Hz.clone() / rhs.per_C}
8759 }
8760}
8761impl<T> core::ops::Div<&InverseCharge<T>> for Frequency<T> where T: NumLike {
8763 type Output = Current<T>;
8764 fn div(self, rhs: &InverseCharge<T>) -> Self::Output {
8765 Current{A: self.Hz / rhs.per_C.clone()}
8766 }
8767}
8768impl<T> core::ops::Div<&InverseCharge<T>> for &Frequency<T> where T: NumLike {
8770 type Output = Current<T>;
8771 fn div(self, rhs: &InverseCharge<T>) -> Self::Output {
8772 Current{A: self.Hz.clone() / rhs.per_C.clone()}
8773 }
8774}
8775
8776impl<T> core::ops::Div<InverseInductance<T>> for Frequency<T> where T: NumLike {
8779 type Output = Resistance<T>;
8780 fn div(self, rhs: InverseInductance<T>) -> Self::Output {
8781 Resistance{Ohm: self.Hz / rhs.per_H}
8782 }
8783}
8784impl<T> core::ops::Div<InverseInductance<T>> for &Frequency<T> where T: NumLike {
8786 type Output = Resistance<T>;
8787 fn div(self, rhs: InverseInductance<T>) -> Self::Output {
8788 Resistance{Ohm: self.Hz.clone() / rhs.per_H}
8789 }
8790}
8791impl<T> core::ops::Div<&InverseInductance<T>> for Frequency<T> where T: NumLike {
8793 type Output = Resistance<T>;
8794 fn div(self, rhs: &InverseInductance<T>) -> Self::Output {
8795 Resistance{Ohm: self.Hz / rhs.per_H.clone()}
8796 }
8797}
8798impl<T> core::ops::Div<&InverseInductance<T>> for &Frequency<T> where T: NumLike {
8800 type Output = Resistance<T>;
8801 fn div(self, rhs: &InverseInductance<T>) -> Self::Output {
8802 Resistance{Ohm: self.Hz.clone() / rhs.per_H.clone()}
8803 }
8804}
8805
8806impl<T> core::ops::Div<InverseMagneticFlux<T>> for Frequency<T> where T: NumLike {
8809 type Output = Voltage<T>;
8810 fn div(self, rhs: InverseMagneticFlux<T>) -> Self::Output {
8811 Voltage{V: self.Hz / rhs.per_Wb}
8812 }
8813}
8814impl<T> core::ops::Div<InverseMagneticFlux<T>> for &Frequency<T> where T: NumLike {
8816 type Output = Voltage<T>;
8817 fn div(self, rhs: InverseMagneticFlux<T>) -> Self::Output {
8818 Voltage{V: self.Hz.clone() / rhs.per_Wb}
8819 }
8820}
8821impl<T> core::ops::Div<&InverseMagneticFlux<T>> for Frequency<T> where T: NumLike {
8823 type Output = Voltage<T>;
8824 fn div(self, rhs: &InverseMagneticFlux<T>) -> Self::Output {
8825 Voltage{V: self.Hz / rhs.per_Wb.clone()}
8826 }
8827}
8828impl<T> core::ops::Div<&InverseMagneticFlux<T>> for &Frequency<T> where T: NumLike {
8830 type Output = Voltage<T>;
8831 fn div(self, rhs: &InverseMagneticFlux<T>) -> Self::Output {
8832 Voltage{V: self.Hz.clone() / rhs.per_Wb.clone()}
8833 }
8834}
8835
8836impl<T> core::ops::Mul<InverseVoltage<T>> for Frequency<T> where T: NumLike {
8839 type Output = InverseMagneticFlux<T>;
8840 fn mul(self, rhs: InverseVoltage<T>) -> Self::Output {
8841 InverseMagneticFlux{per_Wb: self.Hz * rhs.per_V}
8842 }
8843}
8844impl<T> core::ops::Mul<InverseVoltage<T>> for &Frequency<T> where T: NumLike {
8846 type Output = InverseMagneticFlux<T>;
8847 fn mul(self, rhs: InverseVoltage<T>) -> Self::Output {
8848 InverseMagneticFlux{per_Wb: self.Hz.clone() * rhs.per_V}
8849 }
8850}
8851impl<T> core::ops::Mul<&InverseVoltage<T>> for Frequency<T> where T: NumLike {
8853 type Output = InverseMagneticFlux<T>;
8854 fn mul(self, rhs: &InverseVoltage<T>) -> Self::Output {
8855 InverseMagneticFlux{per_Wb: self.Hz * rhs.per_V.clone()}
8856 }
8857}
8858impl<T> core::ops::Mul<&InverseVoltage<T>> for &Frequency<T> where T: NumLike {
8860 type Output = InverseMagneticFlux<T>;
8861 fn mul(self, rhs: &InverseVoltage<T>) -> Self::Output {
8862 InverseMagneticFlux{per_Wb: self.Hz.clone() * rhs.per_V.clone()}
8863 }
8864}
8865
8866impl<T> core::ops::Mul<MagneticFlux<T>> for Frequency<T> where T: NumLike {
8869 type Output = Voltage<T>;
8870 fn mul(self, rhs: MagneticFlux<T>) -> Self::Output {
8871 Voltage{V: self.Hz * rhs.Wb}
8872 }
8873}
8874impl<T> core::ops::Mul<MagneticFlux<T>> for &Frequency<T> where T: NumLike {
8876 type Output = Voltage<T>;
8877 fn mul(self, rhs: MagneticFlux<T>) -> Self::Output {
8878 Voltage{V: self.Hz.clone() * rhs.Wb}
8879 }
8880}
8881impl<T> core::ops::Mul<&MagneticFlux<T>> for Frequency<T> where T: NumLike {
8883 type Output = Voltage<T>;
8884 fn mul(self, rhs: &MagneticFlux<T>) -> Self::Output {
8885 Voltage{V: self.Hz * rhs.Wb.clone()}
8886 }
8887}
8888impl<T> core::ops::Mul<&MagneticFlux<T>> for &Frequency<T> where T: NumLike {
8890 type Output = Voltage<T>;
8891 fn mul(self, rhs: &MagneticFlux<T>) -> Self::Output {
8892 Voltage{V: self.Hz.clone() * rhs.Wb.clone()}
8893 }
8894}
8895
8896impl<T> core::ops::Mul<Resistance<T>> for Frequency<T> where T: NumLike {
8899 type Output = Elastance<T>;
8900 fn mul(self, rhs: Resistance<T>) -> Self::Output {
8901 Elastance{per_F: self.Hz * rhs.Ohm}
8902 }
8903}
8904impl<T> core::ops::Mul<Resistance<T>> for &Frequency<T> where T: NumLike {
8906 type Output = Elastance<T>;
8907 fn mul(self, rhs: Resistance<T>) -> Self::Output {
8908 Elastance{per_F: self.Hz.clone() * rhs.Ohm}
8909 }
8910}
8911impl<T> core::ops::Mul<&Resistance<T>> for Frequency<T> where T: NumLike {
8913 type Output = Elastance<T>;
8914 fn mul(self, rhs: &Resistance<T>) -> Self::Output {
8915 Elastance{per_F: self.Hz * rhs.Ohm.clone()}
8916 }
8917}
8918impl<T> core::ops::Mul<&Resistance<T>> for &Frequency<T> where T: NumLike {
8920 type Output = Elastance<T>;
8921 fn mul(self, rhs: &Resistance<T>) -> Self::Output {
8922 Elastance{per_F: self.Hz.clone() * rhs.Ohm.clone()}
8923 }
8924}
8925
8926impl<T> core::ops::Div<Resistance<T>> for Frequency<T> where T: NumLike {
8929 type Output = InverseInductance<T>;
8930 fn div(self, rhs: Resistance<T>) -> Self::Output {
8931 InverseInductance{per_H: self.Hz / rhs.Ohm}
8932 }
8933}
8934impl<T> core::ops::Div<Resistance<T>> for &Frequency<T> where T: NumLike {
8936 type Output = InverseInductance<T>;
8937 fn div(self, rhs: Resistance<T>) -> Self::Output {
8938 InverseInductance{per_H: self.Hz.clone() / rhs.Ohm}
8939 }
8940}
8941impl<T> core::ops::Div<&Resistance<T>> for Frequency<T> where T: NumLike {
8943 type Output = InverseInductance<T>;
8944 fn div(self, rhs: &Resistance<T>) -> Self::Output {
8945 InverseInductance{per_H: self.Hz / rhs.Ohm.clone()}
8946 }
8947}
8948impl<T> core::ops::Div<&Resistance<T>> for &Frequency<T> where T: NumLike {
8950 type Output = InverseInductance<T>;
8951 fn div(self, rhs: &Resistance<T>) -> Self::Output {
8952 InverseInductance{per_H: self.Hz.clone() / rhs.Ohm.clone()}
8953 }
8954}
8955
8956impl<T> core::ops::Div<Voltage<T>> for Frequency<T> where T: NumLike {
8959 type Output = InverseMagneticFlux<T>;
8960 fn div(self, rhs: Voltage<T>) -> Self::Output {
8961 InverseMagneticFlux{per_Wb: self.Hz / rhs.V}
8962 }
8963}
8964impl<T> core::ops::Div<Voltage<T>> for &Frequency<T> where T: NumLike {
8966 type Output = InverseMagneticFlux<T>;
8967 fn div(self, rhs: Voltage<T>) -> Self::Output {
8968 InverseMagneticFlux{per_Wb: self.Hz.clone() / rhs.V}
8969 }
8970}
8971impl<T> core::ops::Div<&Voltage<T>> for Frequency<T> where T: NumLike {
8973 type Output = InverseMagneticFlux<T>;
8974 fn div(self, rhs: &Voltage<T>) -> Self::Output {
8975 InverseMagneticFlux{per_Wb: self.Hz / rhs.V.clone()}
8976 }
8977}
8978impl<T> core::ops::Div<&Voltage<T>> for &Frequency<T> where T: NumLike {
8980 type Output = InverseMagneticFlux<T>;
8981 fn div(self, rhs: &Voltage<T>) -> Self::Output {
8982 InverseMagneticFlux{per_Wb: self.Hz.clone() / rhs.V.clone()}
8983 }
8984}
8985
8986impl<T> core::ops::Mul<Angle<T>> for Frequency<T> where T: NumLike {
8989 type Output = AngularVelocity<T>;
8990 fn mul(self, rhs: Angle<T>) -> Self::Output {
8991 AngularVelocity{radps: self.Hz * rhs.rad}
8992 }
8993}
8994impl<T> core::ops::Mul<Angle<T>> for &Frequency<T> where T: NumLike {
8996 type Output = AngularVelocity<T>;
8997 fn mul(self, rhs: Angle<T>) -> Self::Output {
8998 AngularVelocity{radps: self.Hz.clone() * rhs.rad}
8999 }
9000}
9001impl<T> core::ops::Mul<&Angle<T>> for Frequency<T> where T: NumLike {
9003 type Output = AngularVelocity<T>;
9004 fn mul(self, rhs: &Angle<T>) -> Self::Output {
9005 AngularVelocity{radps: self.Hz * rhs.rad.clone()}
9006 }
9007}
9008impl<T> core::ops::Mul<&Angle<T>> for &Frequency<T> where T: NumLike {
9010 type Output = AngularVelocity<T>;
9011 fn mul(self, rhs: &Angle<T>) -> Self::Output {
9012 AngularVelocity{radps: self.Hz.clone() * rhs.rad.clone()}
9013 }
9014}
9015
9016impl<T> core::ops::Div<InverseAngle<T>> for Frequency<T> where T: NumLike {
9019 type Output = AngularVelocity<T>;
9020 fn div(self, rhs: InverseAngle<T>) -> Self::Output {
9021 AngularVelocity{radps: self.Hz / rhs.per_rad}
9022 }
9023}
9024impl<T> core::ops::Div<InverseAngle<T>> for &Frequency<T> where T: NumLike {
9026 type Output = AngularVelocity<T>;
9027 fn div(self, rhs: InverseAngle<T>) -> Self::Output {
9028 AngularVelocity{radps: self.Hz.clone() / rhs.per_rad}
9029 }
9030}
9031impl<T> core::ops::Div<&InverseAngle<T>> for Frequency<T> where T: NumLike {
9033 type Output = AngularVelocity<T>;
9034 fn div(self, rhs: &InverseAngle<T>) -> Self::Output {
9035 AngularVelocity{radps: self.Hz / rhs.per_rad.clone()}
9036 }
9037}
9038impl<T> core::ops::Div<&InverseAngle<T>> for &Frequency<T> where T: NumLike {
9040 type Output = AngularVelocity<T>;
9041 fn div(self, rhs: &InverseAngle<T>) -> Self::Output {
9042 AngularVelocity{radps: self.Hz.clone() / rhs.per_rad.clone()}
9043 }
9044}
9045
9046impl<T> core::ops::Div<Acceleration<T>> for Frequency<T> where T: NumLike {
9049 type Output = TimePerDistance<T>;
9050 fn div(self, rhs: Acceleration<T>) -> Self::Output {
9051 TimePerDistance{spm: self.Hz / rhs.mps2}
9052 }
9053}
9054impl<T> core::ops::Div<Acceleration<T>> for &Frequency<T> where T: NumLike {
9056 type Output = TimePerDistance<T>;
9057 fn div(self, rhs: Acceleration<T>) -> Self::Output {
9058 TimePerDistance{spm: self.Hz.clone() / rhs.mps2}
9059 }
9060}
9061impl<T> core::ops::Div<&Acceleration<T>> for Frequency<T> where T: NumLike {
9063 type Output = TimePerDistance<T>;
9064 fn div(self, rhs: &Acceleration<T>) -> Self::Output {
9065 TimePerDistance{spm: self.Hz / rhs.mps2.clone()}
9066 }
9067}
9068impl<T> core::ops::Div<&Acceleration<T>> for &Frequency<T> where T: NumLike {
9070 type Output = TimePerDistance<T>;
9071 fn div(self, rhs: &Acceleration<T>) -> Self::Output {
9072 TimePerDistance{spm: self.Hz.clone() / rhs.mps2.clone()}
9073 }
9074}
9075
9076impl<T> core::ops::Div<AngularAcceleration<T>> for Frequency<T> where T: NumLike {
9079 type Output = InverseAngularVelocity<T>;
9080 fn div(self, rhs: AngularAcceleration<T>) -> Self::Output {
9081 InverseAngularVelocity{s_per_rad: self.Hz / rhs.radps2}
9082 }
9083}
9084impl<T> core::ops::Div<AngularAcceleration<T>> for &Frequency<T> where T: NumLike {
9086 type Output = InverseAngularVelocity<T>;
9087 fn div(self, rhs: AngularAcceleration<T>) -> Self::Output {
9088 InverseAngularVelocity{s_per_rad: self.Hz.clone() / rhs.radps2}
9089 }
9090}
9091impl<T> core::ops::Div<&AngularAcceleration<T>> for Frequency<T> where T: NumLike {
9093 type Output = InverseAngularVelocity<T>;
9094 fn div(self, rhs: &AngularAcceleration<T>) -> Self::Output {
9095 InverseAngularVelocity{s_per_rad: self.Hz / rhs.radps2.clone()}
9096 }
9097}
9098impl<T> core::ops::Div<&AngularAcceleration<T>> for &Frequency<T> where T: NumLike {
9100 type Output = InverseAngularVelocity<T>;
9101 fn div(self, rhs: &AngularAcceleration<T>) -> Self::Output {
9102 InverseAngularVelocity{s_per_rad: self.Hz.clone() / rhs.radps2.clone()}
9103 }
9104}
9105
9106impl<T> core::ops::Mul<AngularVelocity<T>> for Frequency<T> where T: NumLike {
9109 type Output = AngularAcceleration<T>;
9110 fn mul(self, rhs: AngularVelocity<T>) -> Self::Output {
9111 AngularAcceleration{radps2: self.Hz * rhs.radps}
9112 }
9113}
9114impl<T> core::ops::Mul<AngularVelocity<T>> for &Frequency<T> where T: NumLike {
9116 type Output = AngularAcceleration<T>;
9117 fn mul(self, rhs: AngularVelocity<T>) -> Self::Output {
9118 AngularAcceleration{radps2: self.Hz.clone() * rhs.radps}
9119 }
9120}
9121impl<T> core::ops::Mul<&AngularVelocity<T>> for Frequency<T> where T: NumLike {
9123 type Output = AngularAcceleration<T>;
9124 fn mul(self, rhs: &AngularVelocity<T>) -> Self::Output {
9125 AngularAcceleration{radps2: self.Hz * rhs.radps.clone()}
9126 }
9127}
9128impl<T> core::ops::Mul<&AngularVelocity<T>> for &Frequency<T> where T: NumLike {
9130 type Output = AngularAcceleration<T>;
9131 fn mul(self, rhs: &AngularVelocity<T>) -> Self::Output {
9132 AngularAcceleration{radps2: self.Hz.clone() * rhs.radps.clone()}
9133 }
9134}
9135
9136impl<T> core::ops::Div<AngularVelocity<T>> for Frequency<T> where T: NumLike {
9139 type Output = InverseAngle<T>;
9140 fn div(self, rhs: AngularVelocity<T>) -> Self::Output {
9141 InverseAngle{per_rad: self.Hz / rhs.radps}
9142 }
9143}
9144impl<T> core::ops::Div<AngularVelocity<T>> for &Frequency<T> where T: NumLike {
9146 type Output = InverseAngle<T>;
9147 fn div(self, rhs: AngularVelocity<T>) -> Self::Output {
9148 InverseAngle{per_rad: self.Hz.clone() / rhs.radps}
9149 }
9150}
9151impl<T> core::ops::Div<&AngularVelocity<T>> for Frequency<T> where T: NumLike {
9153 type Output = InverseAngle<T>;
9154 fn div(self, rhs: &AngularVelocity<T>) -> Self::Output {
9155 InverseAngle{per_rad: self.Hz / rhs.radps.clone()}
9156 }
9157}
9158impl<T> core::ops::Div<&AngularVelocity<T>> for &Frequency<T> where T: NumLike {
9160 type Output = InverseAngle<T>;
9161 fn div(self, rhs: &AngularVelocity<T>) -> Self::Output {
9162 InverseAngle{per_rad: self.Hz.clone() / rhs.radps.clone()}
9163 }
9164}
9165
9166impl<T> core::ops::Mul<Energy<T>> for Frequency<T> where T: NumLike {
9169 type Output = Power<T>;
9170 fn mul(self, rhs: Energy<T>) -> Self::Output {
9171 Power{W: self.Hz * rhs.J}
9172 }
9173}
9174impl<T> core::ops::Mul<Energy<T>> for &Frequency<T> where T: NumLike {
9176 type Output = Power<T>;
9177 fn mul(self, rhs: Energy<T>) -> Self::Output {
9178 Power{W: self.Hz.clone() * rhs.J}
9179 }
9180}
9181impl<T> core::ops::Mul<&Energy<T>> for Frequency<T> where T: NumLike {
9183 type Output = Power<T>;
9184 fn mul(self, rhs: &Energy<T>) -> Self::Output {
9185 Power{W: self.Hz * rhs.J.clone()}
9186 }
9187}
9188impl<T> core::ops::Mul<&Energy<T>> for &Frequency<T> where T: NumLike {
9190 type Output = Power<T>;
9191 fn mul(self, rhs: &Energy<T>) -> Self::Output {
9192 Power{W: self.Hz.clone() * rhs.J.clone()}
9193 }
9194}
9195
9196impl<T> core::ops::Mul<Torque<T>> for Frequency<T> where T: NumLike {
9199 type Output = Power<T>;
9200 fn mul(self, rhs: Torque<T>) -> Self::Output {
9201 Power{W: self.Hz * rhs.Nm}
9202 }
9203}
9204impl<T> core::ops::Mul<Torque<T>> for &Frequency<T> where T: NumLike {
9206 type Output = Power<T>;
9207 fn mul(self, rhs: Torque<T>) -> Self::Output {
9208 Power{W: self.Hz.clone() * rhs.Nm}
9209 }
9210}
9211impl<T> core::ops::Mul<&Torque<T>> for Frequency<T> where T: NumLike {
9213 type Output = Power<T>;
9214 fn mul(self, rhs: &Torque<T>) -> Self::Output {
9215 Power{W: self.Hz * rhs.Nm.clone()}
9216 }
9217}
9218impl<T> core::ops::Mul<&Torque<T>> for &Frequency<T> where T: NumLike {
9220 type Output = Power<T>;
9221 fn mul(self, rhs: &Torque<T>) -> Self::Output {
9222 Power{W: self.Hz.clone() * rhs.Nm.clone()}
9223 }
9224}
9225
9226impl<T> core::ops::Div<Force<T>> for Frequency<T> where T: NumLike {
9229 type Output = InverseMomentum<T>;
9230 fn div(self, rhs: Force<T>) -> Self::Output {
9231 InverseMomentum{s_per_kgm: self.Hz / rhs.N}
9232 }
9233}
9234impl<T> core::ops::Div<Force<T>> for &Frequency<T> where T: NumLike {
9236 type Output = InverseMomentum<T>;
9237 fn div(self, rhs: Force<T>) -> Self::Output {
9238 InverseMomentum{s_per_kgm: self.Hz.clone() / rhs.N}
9239 }
9240}
9241impl<T> core::ops::Div<&Force<T>> for Frequency<T> where T: NumLike {
9243 type Output = InverseMomentum<T>;
9244 fn div(self, rhs: &Force<T>) -> Self::Output {
9245 InverseMomentum{s_per_kgm: self.Hz / rhs.N.clone()}
9246 }
9247}
9248impl<T> core::ops::Div<&Force<T>> for &Frequency<T> where T: NumLike {
9250 type Output = InverseMomentum<T>;
9251 fn div(self, rhs: &Force<T>) -> Self::Output {
9252 InverseMomentum{s_per_kgm: self.Hz.clone() / rhs.N.clone()}
9253 }
9254}
9255
9256impl<T> core::ops::Mul<InverseAcceleration<T>> for Frequency<T> where T: NumLike {
9259 type Output = TimePerDistance<T>;
9260 fn mul(self, rhs: InverseAcceleration<T>) -> Self::Output {
9261 TimePerDistance{spm: self.Hz * rhs.s2pm}
9262 }
9263}
9264impl<T> core::ops::Mul<InverseAcceleration<T>> for &Frequency<T> where T: NumLike {
9266 type Output = TimePerDistance<T>;
9267 fn mul(self, rhs: InverseAcceleration<T>) -> Self::Output {
9268 TimePerDistance{spm: self.Hz.clone() * rhs.s2pm}
9269 }
9270}
9271impl<T> core::ops::Mul<&InverseAcceleration<T>> for Frequency<T> where T: NumLike {
9273 type Output = TimePerDistance<T>;
9274 fn mul(self, rhs: &InverseAcceleration<T>) -> Self::Output {
9275 TimePerDistance{spm: self.Hz * rhs.s2pm.clone()}
9276 }
9277}
9278impl<T> core::ops::Mul<&InverseAcceleration<T>> for &Frequency<T> where T: NumLike {
9280 type Output = TimePerDistance<T>;
9281 fn mul(self, rhs: &InverseAcceleration<T>) -> Self::Output {
9282 TimePerDistance{spm: self.Hz.clone() * rhs.s2pm.clone()}
9283 }
9284}
9285
9286impl<T> core::ops::Mul<InverseAngularAcceleration<T>> for Frequency<T> where T: NumLike {
9289 type Output = InverseAngularVelocity<T>;
9290 fn mul(self, rhs: InverseAngularAcceleration<T>) -> Self::Output {
9291 InverseAngularVelocity{s_per_rad: self.Hz * rhs.s2prad}
9292 }
9293}
9294impl<T> core::ops::Mul<InverseAngularAcceleration<T>> for &Frequency<T> where T: NumLike {
9296 type Output = InverseAngularVelocity<T>;
9297 fn mul(self, rhs: InverseAngularAcceleration<T>) -> Self::Output {
9298 InverseAngularVelocity{s_per_rad: self.Hz.clone() * rhs.s2prad}
9299 }
9300}
9301impl<T> core::ops::Mul<&InverseAngularAcceleration<T>> for Frequency<T> where T: NumLike {
9303 type Output = InverseAngularVelocity<T>;
9304 fn mul(self, rhs: &InverseAngularAcceleration<T>) -> Self::Output {
9305 InverseAngularVelocity{s_per_rad: self.Hz * rhs.s2prad.clone()}
9306 }
9307}
9308impl<T> core::ops::Mul<&InverseAngularAcceleration<T>> for &Frequency<T> where T: NumLike {
9310 type Output = InverseAngularVelocity<T>;
9311 fn mul(self, rhs: &InverseAngularAcceleration<T>) -> Self::Output {
9312 InverseAngularVelocity{s_per_rad: self.Hz.clone() * rhs.s2prad.clone()}
9313 }
9314}
9315
9316impl<T> core::ops::Mul<InverseAngularVelocity<T>> for Frequency<T> where T: NumLike {
9319 type Output = InverseAngle<T>;
9320 fn mul(self, rhs: InverseAngularVelocity<T>) -> Self::Output {
9321 InverseAngle{per_rad: self.Hz * rhs.s_per_rad}
9322 }
9323}
9324impl<T> core::ops::Mul<InverseAngularVelocity<T>> for &Frequency<T> where T: NumLike {
9326 type Output = InverseAngle<T>;
9327 fn mul(self, rhs: InverseAngularVelocity<T>) -> Self::Output {
9328 InverseAngle{per_rad: self.Hz.clone() * rhs.s_per_rad}
9329 }
9330}
9331impl<T> core::ops::Mul<&InverseAngularVelocity<T>> for Frequency<T> where T: NumLike {
9333 type Output = InverseAngle<T>;
9334 fn mul(self, rhs: &InverseAngularVelocity<T>) -> Self::Output {
9335 InverseAngle{per_rad: self.Hz * rhs.s_per_rad.clone()}
9336 }
9337}
9338impl<T> core::ops::Mul<&InverseAngularVelocity<T>> for &Frequency<T> where T: NumLike {
9340 type Output = InverseAngle<T>;
9341 fn mul(self, rhs: &InverseAngularVelocity<T>) -> Self::Output {
9342 InverseAngle{per_rad: self.Hz.clone() * rhs.s_per_rad.clone()}
9343 }
9344}
9345
9346impl<T> core::ops::Div<InverseAngularVelocity<T>> for Frequency<T> where T: NumLike {
9349 type Output = AngularAcceleration<T>;
9350 fn div(self, rhs: InverseAngularVelocity<T>) -> Self::Output {
9351 AngularAcceleration{radps2: self.Hz / rhs.s_per_rad}
9352 }
9353}
9354impl<T> core::ops::Div<InverseAngularVelocity<T>> for &Frequency<T> where T: NumLike {
9356 type Output = AngularAcceleration<T>;
9357 fn div(self, rhs: InverseAngularVelocity<T>) -> Self::Output {
9358 AngularAcceleration{radps2: self.Hz.clone() / rhs.s_per_rad}
9359 }
9360}
9361impl<T> core::ops::Div<&InverseAngularVelocity<T>> for Frequency<T> where T: NumLike {
9363 type Output = AngularAcceleration<T>;
9364 fn div(self, rhs: &InverseAngularVelocity<T>) -> Self::Output {
9365 AngularAcceleration{radps2: self.Hz / rhs.s_per_rad.clone()}
9366 }
9367}
9368impl<T> core::ops::Div<&InverseAngularVelocity<T>> for &Frequency<T> where T: NumLike {
9370 type Output = AngularAcceleration<T>;
9371 fn div(self, rhs: &InverseAngularVelocity<T>) -> Self::Output {
9372 AngularAcceleration{radps2: self.Hz.clone() / rhs.s_per_rad.clone()}
9373 }
9374}
9375
9376impl<T> core::ops::Div<InverseEnergy<T>> for Frequency<T> where T: NumLike {
9379 type Output = Power<T>;
9380 fn div(self, rhs: InverseEnergy<T>) -> Self::Output {
9381 Power{W: self.Hz / rhs.per_J}
9382 }
9383}
9384impl<T> core::ops::Div<InverseEnergy<T>> for &Frequency<T> where T: NumLike {
9386 type Output = Power<T>;
9387 fn div(self, rhs: InverseEnergy<T>) -> Self::Output {
9388 Power{W: self.Hz.clone() / rhs.per_J}
9389 }
9390}
9391impl<T> core::ops::Div<&InverseEnergy<T>> for Frequency<T> where T: NumLike {
9393 type Output = Power<T>;
9394 fn div(self, rhs: &InverseEnergy<T>) -> Self::Output {
9395 Power{W: self.Hz / rhs.per_J.clone()}
9396 }
9397}
9398impl<T> core::ops::Div<&InverseEnergy<T>> for &Frequency<T> where T: NumLike {
9400 type Output = Power<T>;
9401 fn div(self, rhs: &InverseEnergy<T>) -> Self::Output {
9402 Power{W: self.Hz.clone() / rhs.per_J.clone()}
9403 }
9404}
9405
9406impl<T> core::ops::Div<InverseTorque<T>> for Frequency<T> where T: NumLike {
9409 type Output = Power<T>;
9410 fn div(self, rhs: InverseTorque<T>) -> Self::Output {
9411 Power{W: self.Hz / rhs.per_Nm}
9412 }
9413}
9414impl<T> core::ops::Div<InverseTorque<T>> for &Frequency<T> where T: NumLike {
9416 type Output = Power<T>;
9417 fn div(self, rhs: InverseTorque<T>) -> Self::Output {
9418 Power{W: self.Hz.clone() / rhs.per_Nm}
9419 }
9420}
9421impl<T> core::ops::Div<&InverseTorque<T>> for Frequency<T> where T: NumLike {
9423 type Output = Power<T>;
9424 fn div(self, rhs: &InverseTorque<T>) -> Self::Output {
9425 Power{W: self.Hz / rhs.per_Nm.clone()}
9426 }
9427}
9428impl<T> core::ops::Div<&InverseTorque<T>> for &Frequency<T> where T: NumLike {
9430 type Output = Power<T>;
9431 fn div(self, rhs: &InverseTorque<T>) -> Self::Output {
9432 Power{W: self.Hz.clone() / rhs.per_Nm.clone()}
9433 }
9434}
9435
9436impl<T> core::ops::Mul<InverseForce<T>> for Frequency<T> where T: NumLike {
9439 type Output = InverseMomentum<T>;
9440 fn mul(self, rhs: InverseForce<T>) -> Self::Output {
9441 InverseMomentum{s_per_kgm: self.Hz * rhs.per_N}
9442 }
9443}
9444impl<T> core::ops::Mul<InverseForce<T>> for &Frequency<T> where T: NumLike {
9446 type Output = InverseMomentum<T>;
9447 fn mul(self, rhs: InverseForce<T>) -> Self::Output {
9448 InverseMomentum{s_per_kgm: self.Hz.clone() * rhs.per_N}
9449 }
9450}
9451impl<T> core::ops::Mul<&InverseForce<T>> for Frequency<T> where T: NumLike {
9453 type Output = InverseMomentum<T>;
9454 fn mul(self, rhs: &InverseForce<T>) -> Self::Output {
9455 InverseMomentum{s_per_kgm: self.Hz * rhs.per_N.clone()}
9456 }
9457}
9458impl<T> core::ops::Mul<&InverseForce<T>> for &Frequency<T> where T: NumLike {
9460 type Output = InverseMomentum<T>;
9461 fn mul(self, rhs: &InverseForce<T>) -> Self::Output {
9462 InverseMomentum{s_per_kgm: self.Hz.clone() * rhs.per_N.clone()}
9463 }
9464}
9465
9466impl<T> core::ops::Div<InverseMomentum<T>> for Frequency<T> where T: NumLike {
9469 type Output = Force<T>;
9470 fn div(self, rhs: InverseMomentum<T>) -> Self::Output {
9471 Force{N: self.Hz / rhs.s_per_kgm}
9472 }
9473}
9474impl<T> core::ops::Div<InverseMomentum<T>> for &Frequency<T> where T: NumLike {
9476 type Output = Force<T>;
9477 fn div(self, rhs: InverseMomentum<T>) -> Self::Output {
9478 Force{N: self.Hz.clone() / rhs.s_per_kgm}
9479 }
9480}
9481impl<T> core::ops::Div<&InverseMomentum<T>> for Frequency<T> where T: NumLike {
9483 type Output = Force<T>;
9484 fn div(self, rhs: &InverseMomentum<T>) -> Self::Output {
9485 Force{N: self.Hz / rhs.s_per_kgm.clone()}
9486 }
9487}
9488impl<T> core::ops::Div<&InverseMomentum<T>> for &Frequency<T> where T: NumLike {
9490 type Output = Force<T>;
9491 fn div(self, rhs: &InverseMomentum<T>) -> Self::Output {
9492 Force{N: self.Hz.clone() / rhs.s_per_kgm.clone()}
9493 }
9494}
9495
9496impl<T> core::ops::Mul<InversePower<T>> for Frequency<T> where T: NumLike {
9499 type Output = InverseEnergy<T>;
9500 fn mul(self, rhs: InversePower<T>) -> Self::Output {
9501 InverseEnergy{per_J: self.Hz * rhs.per_W}
9502 }
9503}
9504impl<T> core::ops::Mul<InversePower<T>> for &Frequency<T> where T: NumLike {
9506 type Output = InverseEnergy<T>;
9507 fn mul(self, rhs: InversePower<T>) -> Self::Output {
9508 InverseEnergy{per_J: self.Hz.clone() * rhs.per_W}
9509 }
9510}
9511impl<T> core::ops::Mul<&InversePower<T>> for Frequency<T> where T: NumLike {
9513 type Output = InverseEnergy<T>;
9514 fn mul(self, rhs: &InversePower<T>) -> Self::Output {
9515 InverseEnergy{per_J: self.Hz * rhs.per_W.clone()}
9516 }
9517}
9518impl<T> core::ops::Mul<&InversePower<T>> for &Frequency<T> where T: NumLike {
9520 type Output = InverseEnergy<T>;
9521 fn mul(self, rhs: &InversePower<T>) -> Self::Output {
9522 InverseEnergy{per_J: self.Hz.clone() * rhs.per_W.clone()}
9523 }
9524}
9525
9526impl<T> core::ops::Mul<Momentum<T>> for Frequency<T> where T: NumLike {
9529 type Output = Force<T>;
9530 fn mul(self, rhs: Momentum<T>) -> Self::Output {
9531 Force{N: self.Hz * rhs.kgmps}
9532 }
9533}
9534impl<T> core::ops::Mul<Momentum<T>> for &Frequency<T> where T: NumLike {
9536 type Output = Force<T>;
9537 fn mul(self, rhs: Momentum<T>) -> Self::Output {
9538 Force{N: self.Hz.clone() * rhs.kgmps}
9539 }
9540}
9541impl<T> core::ops::Mul<&Momentum<T>> for Frequency<T> where T: NumLike {
9543 type Output = Force<T>;
9544 fn mul(self, rhs: &Momentum<T>) -> Self::Output {
9545 Force{N: self.Hz * rhs.kgmps.clone()}
9546 }
9547}
9548impl<T> core::ops::Mul<&Momentum<T>> for &Frequency<T> where T: NumLike {
9550 type Output = Force<T>;
9551 fn mul(self, rhs: &Momentum<T>) -> Self::Output {
9552 Force{N: self.Hz.clone() * rhs.kgmps.clone()}
9553 }
9554}
9555
9556impl<T> core::ops::Div<Power<T>> for Frequency<T> where T: NumLike {
9559 type Output = InverseEnergy<T>;
9560 fn div(self, rhs: Power<T>) -> Self::Output {
9561 InverseEnergy{per_J: self.Hz / rhs.W}
9562 }
9563}
9564impl<T> core::ops::Div<Power<T>> for &Frequency<T> where T: NumLike {
9566 type Output = InverseEnergy<T>;
9567 fn div(self, rhs: Power<T>) -> Self::Output {
9568 InverseEnergy{per_J: self.Hz.clone() / rhs.W}
9569 }
9570}
9571impl<T> core::ops::Div<&Power<T>> for Frequency<T> where T: NumLike {
9573 type Output = InverseEnergy<T>;
9574 fn div(self, rhs: &Power<T>) -> Self::Output {
9575 InverseEnergy{per_J: self.Hz / rhs.W.clone()}
9576 }
9577}
9578impl<T> core::ops::Div<&Power<T>> for &Frequency<T> where T: NumLike {
9580 type Output = InverseEnergy<T>;
9581 fn div(self, rhs: &Power<T>) -> Self::Output {
9582 InverseEnergy{per_J: self.Hz.clone() / rhs.W.clone()}
9583 }
9584}
9585
9586impl<T> core::ops::Mul<TimePerDistance<T>> for Frequency<T> where T: NumLike {
9589 type Output = InverseDistance<T>;
9590 fn mul(self, rhs: TimePerDistance<T>) -> Self::Output {
9591 InverseDistance{per_m: self.Hz * rhs.spm}
9592 }
9593}
9594impl<T> core::ops::Mul<TimePerDistance<T>> for &Frequency<T> where T: NumLike {
9596 type Output = InverseDistance<T>;
9597 fn mul(self, rhs: TimePerDistance<T>) -> Self::Output {
9598 InverseDistance{per_m: self.Hz.clone() * rhs.spm}
9599 }
9600}
9601impl<T> core::ops::Mul<&TimePerDistance<T>> for Frequency<T> where T: NumLike {
9603 type Output = InverseDistance<T>;
9604 fn mul(self, rhs: &TimePerDistance<T>) -> Self::Output {
9605 InverseDistance{per_m: self.Hz * rhs.spm.clone()}
9606 }
9607}
9608impl<T> core::ops::Mul<&TimePerDistance<T>> for &Frequency<T> where T: NumLike {
9610 type Output = InverseDistance<T>;
9611 fn mul(self, rhs: &TimePerDistance<T>) -> Self::Output {
9612 InverseDistance{per_m: self.Hz.clone() * rhs.spm.clone()}
9613 }
9614}
9615
9616impl<T> core::ops::Div<TimePerDistance<T>> for Frequency<T> where T: NumLike {
9619 type Output = Acceleration<T>;
9620 fn div(self, rhs: TimePerDistance<T>) -> Self::Output {
9621 Acceleration{mps2: self.Hz / rhs.spm}
9622 }
9623}
9624impl<T> core::ops::Div<TimePerDistance<T>> for &Frequency<T> where T: NumLike {
9626 type Output = Acceleration<T>;
9627 fn div(self, rhs: TimePerDistance<T>) -> Self::Output {
9628 Acceleration{mps2: self.Hz.clone() / rhs.spm}
9629 }
9630}
9631impl<T> core::ops::Div<&TimePerDistance<T>> for Frequency<T> where T: NumLike {
9633 type Output = Acceleration<T>;
9634 fn div(self, rhs: &TimePerDistance<T>) -> Self::Output {
9635 Acceleration{mps2: self.Hz / rhs.spm.clone()}
9636 }
9637}
9638impl<T> core::ops::Div<&TimePerDistance<T>> for &Frequency<T> where T: NumLike {
9640 type Output = Acceleration<T>;
9641 fn div(self, rhs: &TimePerDistance<T>) -> Self::Output {
9642 Acceleration{mps2: self.Hz.clone() / rhs.spm.clone()}
9643 }
9644}
9645
9646impl<T> core::ops::Mul<Velocity<T>> for Frequency<T> where T: NumLike {
9649 type Output = Acceleration<T>;
9650 fn mul(self, rhs: Velocity<T>) -> Self::Output {
9651 Acceleration{mps2: self.Hz * rhs.mps}
9652 }
9653}
9654impl<T> core::ops::Mul<Velocity<T>> for &Frequency<T> where T: NumLike {
9656 type Output = Acceleration<T>;
9657 fn mul(self, rhs: Velocity<T>) -> Self::Output {
9658 Acceleration{mps2: self.Hz.clone() * rhs.mps}
9659 }
9660}
9661impl<T> core::ops::Mul<&Velocity<T>> for Frequency<T> where T: NumLike {
9663 type Output = Acceleration<T>;
9664 fn mul(self, rhs: &Velocity<T>) -> Self::Output {
9665 Acceleration{mps2: self.Hz * rhs.mps.clone()}
9666 }
9667}
9668impl<T> core::ops::Mul<&Velocity<T>> for &Frequency<T> where T: NumLike {
9670 type Output = Acceleration<T>;
9671 fn mul(self, rhs: &Velocity<T>) -> Self::Output {
9672 Acceleration{mps2: self.Hz.clone() * rhs.mps.clone()}
9673 }
9674}
9675
9676impl<T> core::ops::Div<Velocity<T>> for Frequency<T> where T: NumLike {
9679 type Output = InverseDistance<T>;
9680 fn div(self, rhs: Velocity<T>) -> Self::Output {
9681 InverseDistance{per_m: self.Hz / rhs.mps}
9682 }
9683}
9684impl<T> core::ops::Div<Velocity<T>> for &Frequency<T> where T: NumLike {
9686 type Output = InverseDistance<T>;
9687 fn div(self, rhs: Velocity<T>) -> Self::Output {
9688 InverseDistance{per_m: self.Hz.clone() / rhs.mps}
9689 }
9690}
9691impl<T> core::ops::Div<&Velocity<T>> for Frequency<T> where T: NumLike {
9693 type Output = InverseDistance<T>;
9694 fn div(self, rhs: &Velocity<T>) -> Self::Output {
9695 InverseDistance{per_m: self.Hz / rhs.mps.clone()}
9696 }
9697}
9698impl<T> core::ops::Div<&Velocity<T>> for &Frequency<T> where T: NumLike {
9700 type Output = InverseDistance<T>;
9701 fn div(self, rhs: &Velocity<T>) -> Self::Output {
9702 InverseDistance{per_m: self.Hz.clone() / rhs.mps.clone()}
9703 }
9704}
9705
9706impl<T> core::ops::Div<Frequency<T>> for f64 where T: NumLike+From<f64> {
9709 type Output = Time<T>;
9710 fn div(self, rhs: Frequency<T>) -> Self::Output {
9711 Time{s: T::from(self) / rhs.Hz}
9712 }
9713}
9714impl<T> core::ops::Div<Frequency<T>> for &f64 where T: NumLike+From<f64> {
9716 type Output = Time<T>;
9717 fn div(self, rhs: Frequency<T>) -> Self::Output {
9718 Time{s: T::from(self.clone()) / rhs.Hz}
9719 }
9720}
9721impl<T> core::ops::Div<&Frequency<T>> for f64 where T: NumLike+From<f64> {
9723 type Output = Time<T>;
9724 fn div(self, rhs: &Frequency<T>) -> Self::Output {
9725 Time{s: T::from(self) / rhs.Hz.clone()}
9726 }
9727}
9728impl<T> core::ops::Div<&Frequency<T>> for &f64 where T: NumLike+From<f64> {
9730 type Output = Time<T>;
9731 fn div(self, rhs: &Frequency<T>) -> Self::Output {
9732 Time{s: T::from(self.clone()) / rhs.Hz.clone()}
9733 }
9734}
9735
9736impl<T> core::ops::Div<Frequency<T>> for f32 where T: NumLike+From<f32> {
9739 type Output = Time<T>;
9740 fn div(self, rhs: Frequency<T>) -> Self::Output {
9741 Time{s: T::from(self) / rhs.Hz}
9742 }
9743}
9744impl<T> core::ops::Div<Frequency<T>> for &f32 where T: NumLike+From<f32> {
9746 type Output = Time<T>;
9747 fn div(self, rhs: Frequency<T>) -> Self::Output {
9748 Time{s: T::from(self.clone()) / rhs.Hz}
9749 }
9750}
9751impl<T> core::ops::Div<&Frequency<T>> for f32 where T: NumLike+From<f32> {
9753 type Output = Time<T>;
9754 fn div(self, rhs: &Frequency<T>) -> Self::Output {
9755 Time{s: T::from(self) / rhs.Hz.clone()}
9756 }
9757}
9758impl<T> core::ops::Div<&Frequency<T>> for &f32 where T: NumLike+From<f32> {
9760 type Output = Time<T>;
9761 fn div(self, rhs: &Frequency<T>) -> Self::Output {
9762 Time{s: T::from(self.clone()) / rhs.Hz.clone()}
9763 }
9764}
9765
9766impl<T> core::ops::Div<Frequency<T>> for i64 where T: NumLike+From<i64> {
9769 type Output = Time<T>;
9770 fn div(self, rhs: Frequency<T>) -> Self::Output {
9771 Time{s: T::from(self) / rhs.Hz}
9772 }
9773}
9774impl<T> core::ops::Div<Frequency<T>> for &i64 where T: NumLike+From<i64> {
9776 type Output = Time<T>;
9777 fn div(self, rhs: Frequency<T>) -> Self::Output {
9778 Time{s: T::from(self.clone()) / rhs.Hz}
9779 }
9780}
9781impl<T> core::ops::Div<&Frequency<T>> for i64 where T: NumLike+From<i64> {
9783 type Output = Time<T>;
9784 fn div(self, rhs: &Frequency<T>) -> Self::Output {
9785 Time{s: T::from(self) / rhs.Hz.clone()}
9786 }
9787}
9788impl<T> core::ops::Div<&Frequency<T>> for &i64 where T: NumLike+From<i64> {
9790 type Output = Time<T>;
9791 fn div(self, rhs: &Frequency<T>) -> Self::Output {
9792 Time{s: T::from(self.clone()) / rhs.Hz.clone()}
9793 }
9794}
9795
9796impl<T> core::ops::Div<Frequency<T>> for i32 where T: NumLike+From<i32> {
9799 type Output = Time<T>;
9800 fn div(self, rhs: Frequency<T>) -> Self::Output {
9801 Time{s: T::from(self) / rhs.Hz}
9802 }
9803}
9804impl<T> core::ops::Div<Frequency<T>> for &i32 where T: NumLike+From<i32> {
9806 type Output = Time<T>;
9807 fn div(self, rhs: Frequency<T>) -> Self::Output {
9808 Time{s: T::from(self.clone()) / rhs.Hz}
9809 }
9810}
9811impl<T> core::ops::Div<&Frequency<T>> for i32 where T: NumLike+From<i32> {
9813 type Output = Time<T>;
9814 fn div(self, rhs: &Frequency<T>) -> Self::Output {
9815 Time{s: T::from(self) / rhs.Hz.clone()}
9816 }
9817}
9818impl<T> core::ops::Div<&Frequency<T>> for &i32 where T: NumLike+From<i32> {
9820 type Output = Time<T>;
9821 fn div(self, rhs: &Frequency<T>) -> Self::Output {
9822 Time{s: T::from(self.clone()) / rhs.Hz.clone()}
9823 }
9824}
9825
9826#[cfg(feature="num-bigfloat")]
9829impl<T> core::ops::Div<Frequency<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
9830 type Output = Time<T>;
9831 fn div(self, rhs: Frequency<T>) -> Self::Output {
9832 Time{s: T::from(self) / rhs.Hz}
9833 }
9834}
9835#[cfg(feature="num-bigfloat")]
9837impl<T> core::ops::Div<Frequency<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
9838 type Output = Time<T>;
9839 fn div(self, rhs: Frequency<T>) -> Self::Output {
9840 Time{s: T::from(self.clone()) / rhs.Hz}
9841 }
9842}
9843#[cfg(feature="num-bigfloat")]
9845impl<T> core::ops::Div<&Frequency<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
9846 type Output = Time<T>;
9847 fn div(self, rhs: &Frequency<T>) -> Self::Output {
9848 Time{s: T::from(self) / rhs.Hz.clone()}
9849 }
9850}
9851#[cfg(feature="num-bigfloat")]
9853impl<T> core::ops::Div<&Frequency<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
9854 type Output = Time<T>;
9855 fn div(self, rhs: &Frequency<T>) -> Self::Output {
9856 Time{s: T::from(self.clone()) / rhs.Hz.clone()}
9857 }
9858}
9859
9860#[cfg(feature="num-complex")]
9863impl<T> core::ops::Div<Frequency<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
9864 type Output = Time<T>;
9865 fn div(self, rhs: Frequency<T>) -> Self::Output {
9866 Time{s: T::from(self) / rhs.Hz}
9867 }
9868}
9869#[cfg(feature="num-complex")]
9871impl<T> core::ops::Div<Frequency<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
9872 type Output = Time<T>;
9873 fn div(self, rhs: Frequency<T>) -> Self::Output {
9874 Time{s: T::from(self.clone()) / rhs.Hz}
9875 }
9876}
9877#[cfg(feature="num-complex")]
9879impl<T> core::ops::Div<&Frequency<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
9880 type Output = Time<T>;
9881 fn div(self, rhs: &Frequency<T>) -> Self::Output {
9882 Time{s: T::from(self) / rhs.Hz.clone()}
9883 }
9884}
9885#[cfg(feature="num-complex")]
9887impl<T> core::ops::Div<&Frequency<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
9888 type Output = Time<T>;
9889 fn div(self, rhs: &Frequency<T>) -> Self::Output {
9890 Time{s: T::from(self.clone()) / rhs.Hz.clone()}
9891 }
9892}
9893
9894#[cfg(feature="num-complex")]
9897impl<T> core::ops::Div<Frequency<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
9898 type Output = Time<T>;
9899 fn div(self, rhs: Frequency<T>) -> Self::Output {
9900 Time{s: T::from(self) / rhs.Hz}
9901 }
9902}
9903#[cfg(feature="num-complex")]
9905impl<T> core::ops::Div<Frequency<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
9906 type Output = Time<T>;
9907 fn div(self, rhs: Frequency<T>) -> Self::Output {
9908 Time{s: T::from(self.clone()) / rhs.Hz}
9909 }
9910}
9911#[cfg(feature="num-complex")]
9913impl<T> core::ops::Div<&Frequency<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
9914 type Output = Time<T>;
9915 fn div(self, rhs: &Frequency<T>) -> Self::Output {
9916 Time{s: T::from(self) / rhs.Hz.clone()}
9917 }
9918}
9919#[cfg(feature="num-complex")]
9921impl<T> core::ops::Div<&Frequency<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
9922 type Output = Time<T>;
9923 fn div(self, rhs: &Frequency<T>) -> Self::Output {
9924 Time{s: T::from(self.clone()) / rhs.Hz.clone()}
9925 }
9926}
9927
9928#[derive(UnitStruct, Debug, Clone)]
9930#[cfg_attr(feature="serde", derive(Serialize, Deserialize))]
9931pub struct InverseAcceleration<T: NumLike>{
9932 pub s2pm: T
9934}
9935
9936impl<T> InverseAcceleration<T> where T: NumLike {
9937
9938 pub fn unit_name() -> &'static str { "seconds squared per meter" }
9940
9941 pub fn unit_symbol() -> &'static str { "s²/m" }
9943
9944 pub fn from_s2pm(s2pm: T) -> Self { InverseAcceleration{s2pm: s2pm} }
9949
9950 pub fn to_s2pm(&self) -> T { self.s2pm.clone() }
9952
9953 pub fn from_seconds_squared_per_meter(seconds_squared_per_meter: T) -> Self { InverseAcceleration{s2pm: seconds_squared_per_meter} }
9958
9959 pub fn to_seconds_squared_per_meter(&self) -> T { self.s2pm.clone() }
9961
9962}
9963
9964impl<T> fmt::Display for InverseAcceleration<T> where T: NumLike {
9965 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
9966 write!(f, "{} {}", &self.s2pm, Self::unit_symbol())
9967 }
9968}
9969
9970impl<T> InverseAcceleration<T> where T: NumLike+From<f64> {
9971
9972 pub fn to_s2pmm(&self) -> T {
9976 return self.s2pm.clone() * T::from(0.001_f64);
9977 }
9978
9979 pub fn from_s2pmm(s2pmm: T) -> Self {
9986 InverseAcceleration{s2pm: s2pmm * T::from(1000.0_f64)}
9987 }
9988
9989 pub fn to_hours_squared_per_kilometers(&self) -> T {
9993 return self.s2pm.clone() * T::from(1e-06_f64);
9994 }
9995
9996 pub fn from_hours_squared_per_kilometers(hours_squared_per_kilometers: T) -> Self {
10003 InverseAcceleration{s2pm: hours_squared_per_kilometers * T::from(1000000.0_f64)}
10004 }
10005
10006 pub fn to_hr2_per_km(&self) -> T {
10010 return self.s2pm.clone() * T::from(7.72e-05_f64);
10011 }
10012
10013 pub fn from_hr2_per_km(hr2_per_km: T) -> Self {
10020 InverseAcceleration{s2pm: hr2_per_km * T::from(12960.0_f64)}
10021 }
10022
10023}
10024
10025
10026#[cfg(feature="num-bigfloat")]
10028impl core::ops::Mul<InverseAcceleration<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
10029 type Output = InverseAcceleration<num_bigfloat::BigFloat>;
10030 fn mul(self, rhs: InverseAcceleration<num_bigfloat::BigFloat>) -> Self::Output {
10031 InverseAcceleration{s2pm: self * rhs.s2pm}
10032 }
10033}
10034#[cfg(feature="num-bigfloat")]
10036impl core::ops::Mul<InverseAcceleration<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
10037 type Output = InverseAcceleration<num_bigfloat::BigFloat>;
10038 fn mul(self, rhs: InverseAcceleration<num_bigfloat::BigFloat>) -> Self::Output {
10039 InverseAcceleration{s2pm: self.clone() * rhs.s2pm}
10040 }
10041}
10042#[cfg(feature="num-bigfloat")]
10044impl core::ops::Mul<&InverseAcceleration<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
10045 type Output = InverseAcceleration<num_bigfloat::BigFloat>;
10046 fn mul(self, rhs: &InverseAcceleration<num_bigfloat::BigFloat>) -> Self::Output {
10047 InverseAcceleration{s2pm: self * rhs.s2pm.clone()}
10048 }
10049}
10050#[cfg(feature="num-bigfloat")]
10052impl core::ops::Mul<&InverseAcceleration<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
10053 type Output = InverseAcceleration<num_bigfloat::BigFloat>;
10054 fn mul(self, rhs: &InverseAcceleration<num_bigfloat::BigFloat>) -> Self::Output {
10055 InverseAcceleration{s2pm: self.clone() * rhs.s2pm.clone()}
10056 }
10057}
10058
10059#[cfg(feature="num-complex")]
10061impl core::ops::Mul<InverseAcceleration<num_complex::Complex32>> for num_complex::Complex32 {
10062 type Output = InverseAcceleration<num_complex::Complex32>;
10063 fn mul(self, rhs: InverseAcceleration<num_complex::Complex32>) -> Self::Output {
10064 InverseAcceleration{s2pm: self * rhs.s2pm}
10065 }
10066}
10067#[cfg(feature="num-complex")]
10069impl core::ops::Mul<InverseAcceleration<num_complex::Complex32>> for &num_complex::Complex32 {
10070 type Output = InverseAcceleration<num_complex::Complex32>;
10071 fn mul(self, rhs: InverseAcceleration<num_complex::Complex32>) -> Self::Output {
10072 InverseAcceleration{s2pm: self.clone() * rhs.s2pm}
10073 }
10074}
10075#[cfg(feature="num-complex")]
10077impl core::ops::Mul<&InverseAcceleration<num_complex::Complex32>> for num_complex::Complex32 {
10078 type Output = InverseAcceleration<num_complex::Complex32>;
10079 fn mul(self, rhs: &InverseAcceleration<num_complex::Complex32>) -> Self::Output {
10080 InverseAcceleration{s2pm: self * rhs.s2pm.clone()}
10081 }
10082}
10083#[cfg(feature="num-complex")]
10085impl core::ops::Mul<&InverseAcceleration<num_complex::Complex32>> for &num_complex::Complex32 {
10086 type Output = InverseAcceleration<num_complex::Complex32>;
10087 fn mul(self, rhs: &InverseAcceleration<num_complex::Complex32>) -> Self::Output {
10088 InverseAcceleration{s2pm: self.clone() * rhs.s2pm.clone()}
10089 }
10090}
10091
10092#[cfg(feature="num-complex")]
10094impl core::ops::Mul<InverseAcceleration<num_complex::Complex64>> for num_complex::Complex64 {
10095 type Output = InverseAcceleration<num_complex::Complex64>;
10096 fn mul(self, rhs: InverseAcceleration<num_complex::Complex64>) -> Self::Output {
10097 InverseAcceleration{s2pm: self * rhs.s2pm}
10098 }
10099}
10100#[cfg(feature="num-complex")]
10102impl core::ops::Mul<InverseAcceleration<num_complex::Complex64>> for &num_complex::Complex64 {
10103 type Output = InverseAcceleration<num_complex::Complex64>;
10104 fn mul(self, rhs: InverseAcceleration<num_complex::Complex64>) -> Self::Output {
10105 InverseAcceleration{s2pm: self.clone() * rhs.s2pm}
10106 }
10107}
10108#[cfg(feature="num-complex")]
10110impl core::ops::Mul<&InverseAcceleration<num_complex::Complex64>> for num_complex::Complex64 {
10111 type Output = InverseAcceleration<num_complex::Complex64>;
10112 fn mul(self, rhs: &InverseAcceleration<num_complex::Complex64>) -> Self::Output {
10113 InverseAcceleration{s2pm: self * rhs.s2pm.clone()}
10114 }
10115}
10116#[cfg(feature="num-complex")]
10118impl core::ops::Mul<&InverseAcceleration<num_complex::Complex64>> for &num_complex::Complex64 {
10119 type Output = InverseAcceleration<num_complex::Complex64>;
10120 fn mul(self, rhs: &InverseAcceleration<num_complex::Complex64>) -> Self::Output {
10121 InverseAcceleration{s2pm: self.clone() * rhs.s2pm.clone()}
10122 }
10123}
10124
10125
10126
10127
10128impl<T> core::ops::Mul<InverseMass<T>> for InverseAcceleration<T> where T: NumLike {
10131 type Output = InverseForce<T>;
10132 fn mul(self, rhs: InverseMass<T>) -> Self::Output {
10133 InverseForce{per_N: self.s2pm * rhs.per_kg}
10134 }
10135}
10136impl<T> core::ops::Mul<InverseMass<T>> for &InverseAcceleration<T> where T: NumLike {
10138 type Output = InverseForce<T>;
10139 fn mul(self, rhs: InverseMass<T>) -> Self::Output {
10140 InverseForce{per_N: self.s2pm.clone() * rhs.per_kg}
10141 }
10142}
10143impl<T> core::ops::Mul<&InverseMass<T>> for InverseAcceleration<T> where T: NumLike {
10145 type Output = InverseForce<T>;
10146 fn mul(self, rhs: &InverseMass<T>) -> Self::Output {
10147 InverseForce{per_N: self.s2pm * rhs.per_kg.clone()}
10148 }
10149}
10150impl<T> core::ops::Mul<&InverseMass<T>> for &InverseAcceleration<T> where T: NumLike {
10152 type Output = InverseForce<T>;
10153 fn mul(self, rhs: &InverseMass<T>) -> Self::Output {
10154 InverseForce{per_N: self.s2pm.clone() * rhs.per_kg.clone()}
10155 }
10156}
10157
10158impl<T> core::ops::Div<Mass<T>> for InverseAcceleration<T> where T: NumLike {
10161 type Output = InverseForce<T>;
10162 fn div(self, rhs: Mass<T>) -> Self::Output {
10163 InverseForce{per_N: self.s2pm / rhs.kg}
10164 }
10165}
10166impl<T> core::ops::Div<Mass<T>> for &InverseAcceleration<T> where T: NumLike {
10168 type Output = InverseForce<T>;
10169 fn div(self, rhs: Mass<T>) -> Self::Output {
10170 InverseForce{per_N: self.s2pm.clone() / rhs.kg}
10171 }
10172}
10173impl<T> core::ops::Div<&Mass<T>> for InverseAcceleration<T> where T: NumLike {
10175 type Output = InverseForce<T>;
10176 fn div(self, rhs: &Mass<T>) -> Self::Output {
10177 InverseForce{per_N: self.s2pm / rhs.kg.clone()}
10178 }
10179}
10180impl<T> core::ops::Div<&Mass<T>> for &InverseAcceleration<T> where T: NumLike {
10182 type Output = InverseForce<T>;
10183 fn div(self, rhs: &Mass<T>) -> Self::Output {
10184 InverseForce{per_N: self.s2pm.clone() / rhs.kg.clone()}
10185 }
10186}
10187
10188impl<T> core::ops::Div<Time<T>> for InverseAcceleration<T> where T: NumLike {
10191 type Output = TimePerDistance<T>;
10192 fn div(self, rhs: Time<T>) -> Self::Output {
10193 TimePerDistance{spm: self.s2pm / rhs.s}
10194 }
10195}
10196impl<T> core::ops::Div<Time<T>> for &InverseAcceleration<T> where T: NumLike {
10198 type Output = TimePerDistance<T>;
10199 fn div(self, rhs: Time<T>) -> Self::Output {
10200 TimePerDistance{spm: self.s2pm.clone() / rhs.s}
10201 }
10202}
10203impl<T> core::ops::Div<&Time<T>> for InverseAcceleration<T> where T: NumLike {
10205 type Output = TimePerDistance<T>;
10206 fn div(self, rhs: &Time<T>) -> Self::Output {
10207 TimePerDistance{spm: self.s2pm / rhs.s.clone()}
10208 }
10209}
10210impl<T> core::ops::Div<&Time<T>> for &InverseAcceleration<T> where T: NumLike {
10212 type Output = TimePerDistance<T>;
10213 fn div(self, rhs: &Time<T>) -> Self::Output {
10214 TimePerDistance{spm: self.s2pm.clone() / rhs.s.clone()}
10215 }
10216}
10217
10218impl<T> core::ops::Div<AreaDensity<T>> for InverseAcceleration<T> where T: NumLike {
10221 type Output = InversePressure<T>;
10222 fn div(self, rhs: AreaDensity<T>) -> Self::Output {
10223 InversePressure{per_Pa: self.s2pm / rhs.kgpm2}
10224 }
10225}
10226impl<T> core::ops::Div<AreaDensity<T>> for &InverseAcceleration<T> where T: NumLike {
10228 type Output = InversePressure<T>;
10229 fn div(self, rhs: AreaDensity<T>) -> Self::Output {
10230 InversePressure{per_Pa: self.s2pm.clone() / rhs.kgpm2}
10231 }
10232}
10233impl<T> core::ops::Div<&AreaDensity<T>> for InverseAcceleration<T> where T: NumLike {
10235 type Output = InversePressure<T>;
10236 fn div(self, rhs: &AreaDensity<T>) -> Self::Output {
10237 InversePressure{per_Pa: self.s2pm / rhs.kgpm2.clone()}
10238 }
10239}
10240impl<T> core::ops::Div<&AreaDensity<T>> for &InverseAcceleration<T> where T: NumLike {
10242 type Output = InversePressure<T>;
10243 fn div(self, rhs: &AreaDensity<T>) -> Self::Output {
10244 InversePressure{per_Pa: self.s2pm.clone() / rhs.kgpm2.clone()}
10245 }
10246}
10247
10248impl<T> core::ops::Mul<AreaPerMass<T>> for InverseAcceleration<T> where T: NumLike {
10251 type Output = InversePressure<T>;
10252 fn mul(self, rhs: AreaPerMass<T>) -> Self::Output {
10253 InversePressure{per_Pa: self.s2pm * rhs.m2_per_kg}
10254 }
10255}
10256impl<T> core::ops::Mul<AreaPerMass<T>> for &InverseAcceleration<T> where T: NumLike {
10258 type Output = InversePressure<T>;
10259 fn mul(self, rhs: AreaPerMass<T>) -> Self::Output {
10260 InversePressure{per_Pa: self.s2pm.clone() * rhs.m2_per_kg}
10261 }
10262}
10263impl<T> core::ops::Mul<&AreaPerMass<T>> for InverseAcceleration<T> where T: NumLike {
10265 type Output = InversePressure<T>;
10266 fn mul(self, rhs: &AreaPerMass<T>) -> Self::Output {
10267 InversePressure{per_Pa: self.s2pm * rhs.m2_per_kg.clone()}
10268 }
10269}
10270impl<T> core::ops::Mul<&AreaPerMass<T>> for &InverseAcceleration<T> where T: NumLike {
10272 type Output = InversePressure<T>;
10273 fn mul(self, rhs: &AreaPerMass<T>) -> Self::Output {
10274 InversePressure{per_Pa: self.s2pm.clone() * rhs.m2_per_kg.clone()}
10275 }
10276}
10277
10278impl<T> core::ops::Mul<Force<T>> for InverseAcceleration<T> where T: NumLike {
10281 type Output = Mass<T>;
10282 fn mul(self, rhs: Force<T>) -> Self::Output {
10283 Mass{kg: self.s2pm * rhs.N}
10284 }
10285}
10286impl<T> core::ops::Mul<Force<T>> for &InverseAcceleration<T> where T: NumLike {
10288 type Output = Mass<T>;
10289 fn mul(self, rhs: Force<T>) -> Self::Output {
10290 Mass{kg: self.s2pm.clone() * rhs.N}
10291 }
10292}
10293impl<T> core::ops::Mul<&Force<T>> for InverseAcceleration<T> where T: NumLike {
10295 type Output = Mass<T>;
10296 fn mul(self, rhs: &Force<T>) -> Self::Output {
10297 Mass{kg: self.s2pm * rhs.N.clone()}
10298 }
10299}
10300impl<T> core::ops::Mul<&Force<T>> for &InverseAcceleration<T> where T: NumLike {
10302 type Output = Mass<T>;
10303 fn mul(self, rhs: &Force<T>) -> Self::Output {
10304 Mass{kg: self.s2pm.clone() * rhs.N.clone()}
10305 }
10306}
10307
10308impl<T> core::ops::Mul<Frequency<T>> for InverseAcceleration<T> where T: NumLike {
10311 type Output = TimePerDistance<T>;
10312 fn mul(self, rhs: Frequency<T>) -> Self::Output {
10313 TimePerDistance{spm: self.s2pm * rhs.Hz}
10314 }
10315}
10316impl<T> core::ops::Mul<Frequency<T>> for &InverseAcceleration<T> where T: NumLike {
10318 type Output = TimePerDistance<T>;
10319 fn mul(self, rhs: Frequency<T>) -> Self::Output {
10320 TimePerDistance{spm: self.s2pm.clone() * rhs.Hz}
10321 }
10322}
10323impl<T> core::ops::Mul<&Frequency<T>> for InverseAcceleration<T> where T: NumLike {
10325 type Output = TimePerDistance<T>;
10326 fn mul(self, rhs: &Frequency<T>) -> Self::Output {
10327 TimePerDistance{spm: self.s2pm * rhs.Hz.clone()}
10328 }
10329}
10330impl<T> core::ops::Mul<&Frequency<T>> for &InverseAcceleration<T> where T: NumLike {
10332 type Output = TimePerDistance<T>;
10333 fn mul(self, rhs: &Frequency<T>) -> Self::Output {
10334 TimePerDistance{spm: self.s2pm.clone() * rhs.Hz.clone()}
10335 }
10336}
10337
10338impl<T> core::ops::Div<InverseForce<T>> for InverseAcceleration<T> where T: NumLike {
10341 type Output = Mass<T>;
10342 fn div(self, rhs: InverseForce<T>) -> Self::Output {
10343 Mass{kg: self.s2pm / rhs.per_N}
10344 }
10345}
10346impl<T> core::ops::Div<InverseForce<T>> for &InverseAcceleration<T> where T: NumLike {
10348 type Output = Mass<T>;
10349 fn div(self, rhs: InverseForce<T>) -> Self::Output {
10350 Mass{kg: self.s2pm.clone() / rhs.per_N}
10351 }
10352}
10353impl<T> core::ops::Div<&InverseForce<T>> for InverseAcceleration<T> where T: NumLike {
10355 type Output = Mass<T>;
10356 fn div(self, rhs: &InverseForce<T>) -> Self::Output {
10357 Mass{kg: self.s2pm / rhs.per_N.clone()}
10358 }
10359}
10360impl<T> core::ops::Div<&InverseForce<T>> for &InverseAcceleration<T> where T: NumLike {
10362 type Output = Mass<T>;
10363 fn div(self, rhs: &InverseForce<T>) -> Self::Output {
10364 Mass{kg: self.s2pm.clone() / rhs.per_N.clone()}
10365 }
10366}
10367
10368impl<T> core::ops::Mul<InverseMomentum<T>> for InverseAcceleration<T> where T: NumLike {
10371 type Output = InversePower<T>;
10372 fn mul(self, rhs: InverseMomentum<T>) -> Self::Output {
10373 InversePower{per_W: self.s2pm * rhs.s_per_kgm}
10374 }
10375}
10376impl<T> core::ops::Mul<InverseMomentum<T>> for &InverseAcceleration<T> where T: NumLike {
10378 type Output = InversePower<T>;
10379 fn mul(self, rhs: InverseMomentum<T>) -> Self::Output {
10380 InversePower{per_W: self.s2pm.clone() * rhs.s_per_kgm}
10381 }
10382}
10383impl<T> core::ops::Mul<&InverseMomentum<T>> for InverseAcceleration<T> where T: NumLike {
10385 type Output = InversePower<T>;
10386 fn mul(self, rhs: &InverseMomentum<T>) -> Self::Output {
10387 InversePower{per_W: self.s2pm * rhs.s_per_kgm.clone()}
10388 }
10389}
10390impl<T> core::ops::Mul<&InverseMomentum<T>> for &InverseAcceleration<T> where T: NumLike {
10392 type Output = InversePower<T>;
10393 fn mul(self, rhs: &InverseMomentum<T>) -> Self::Output {
10394 InversePower{per_W: self.s2pm.clone() * rhs.s_per_kgm.clone()}
10395 }
10396}
10397
10398impl<T> core::ops::Div<InversePower<T>> for InverseAcceleration<T> where T: NumLike {
10401 type Output = Momentum<T>;
10402 fn div(self, rhs: InversePower<T>) -> Self::Output {
10403 Momentum{kgmps: self.s2pm / rhs.per_W}
10404 }
10405}
10406impl<T> core::ops::Div<InversePower<T>> for &InverseAcceleration<T> where T: NumLike {
10408 type Output = Momentum<T>;
10409 fn div(self, rhs: InversePower<T>) -> Self::Output {
10410 Momentum{kgmps: self.s2pm.clone() / rhs.per_W}
10411 }
10412}
10413impl<T> core::ops::Div<&InversePower<T>> for InverseAcceleration<T> where T: NumLike {
10415 type Output = Momentum<T>;
10416 fn div(self, rhs: &InversePower<T>) -> Self::Output {
10417 Momentum{kgmps: self.s2pm / rhs.per_W.clone()}
10418 }
10419}
10420impl<T> core::ops::Div<&InversePower<T>> for &InverseAcceleration<T> where T: NumLike {
10422 type Output = Momentum<T>;
10423 fn div(self, rhs: &InversePower<T>) -> Self::Output {
10424 Momentum{kgmps: self.s2pm.clone() / rhs.per_W.clone()}
10425 }
10426}
10427
10428impl<T> core::ops::Div<InversePressure<T>> for InverseAcceleration<T> where T: NumLike {
10431 type Output = AreaDensity<T>;
10432 fn div(self, rhs: InversePressure<T>) -> Self::Output {
10433 AreaDensity{kgpm2: self.s2pm / rhs.per_Pa}
10434 }
10435}
10436impl<T> core::ops::Div<InversePressure<T>> for &InverseAcceleration<T> where T: NumLike {
10438 type Output = AreaDensity<T>;
10439 fn div(self, rhs: InversePressure<T>) -> Self::Output {
10440 AreaDensity{kgpm2: self.s2pm.clone() / rhs.per_Pa}
10441 }
10442}
10443impl<T> core::ops::Div<&InversePressure<T>> for InverseAcceleration<T> where T: NumLike {
10445 type Output = AreaDensity<T>;
10446 fn div(self, rhs: &InversePressure<T>) -> Self::Output {
10447 AreaDensity{kgpm2: self.s2pm / rhs.per_Pa.clone()}
10448 }
10449}
10450impl<T> core::ops::Div<&InversePressure<T>> for &InverseAcceleration<T> where T: NumLike {
10452 type Output = AreaDensity<T>;
10453 fn div(self, rhs: &InversePressure<T>) -> Self::Output {
10454 AreaDensity{kgpm2: self.s2pm.clone() / rhs.per_Pa.clone()}
10455 }
10456}
10457
10458impl<T> core::ops::Div<Momentum<T>> for InverseAcceleration<T> where T: NumLike {
10461 type Output = InversePower<T>;
10462 fn div(self, rhs: Momentum<T>) -> Self::Output {
10463 InversePower{per_W: self.s2pm / rhs.kgmps}
10464 }
10465}
10466impl<T> core::ops::Div<Momentum<T>> for &InverseAcceleration<T> where T: NumLike {
10468 type Output = InversePower<T>;
10469 fn div(self, rhs: Momentum<T>) -> Self::Output {
10470 InversePower{per_W: self.s2pm.clone() / rhs.kgmps}
10471 }
10472}
10473impl<T> core::ops::Div<&Momentum<T>> for InverseAcceleration<T> where T: NumLike {
10475 type Output = InversePower<T>;
10476 fn div(self, rhs: &Momentum<T>) -> Self::Output {
10477 InversePower{per_W: self.s2pm / rhs.kgmps.clone()}
10478 }
10479}
10480impl<T> core::ops::Div<&Momentum<T>> for &InverseAcceleration<T> where T: NumLike {
10482 type Output = InversePower<T>;
10483 fn div(self, rhs: &Momentum<T>) -> Self::Output {
10484 InversePower{per_W: self.s2pm.clone() / rhs.kgmps.clone()}
10485 }
10486}
10487
10488impl<T> core::ops::Mul<Power<T>> for InverseAcceleration<T> where T: NumLike {
10491 type Output = Momentum<T>;
10492 fn mul(self, rhs: Power<T>) -> Self::Output {
10493 Momentum{kgmps: self.s2pm * rhs.W}
10494 }
10495}
10496impl<T> core::ops::Mul<Power<T>> for &InverseAcceleration<T> where T: NumLike {
10498 type Output = Momentum<T>;
10499 fn mul(self, rhs: Power<T>) -> Self::Output {
10500 Momentum{kgmps: self.s2pm.clone() * rhs.W}
10501 }
10502}
10503impl<T> core::ops::Mul<&Power<T>> for InverseAcceleration<T> where T: NumLike {
10505 type Output = Momentum<T>;
10506 fn mul(self, rhs: &Power<T>) -> Self::Output {
10507 Momentum{kgmps: self.s2pm * rhs.W.clone()}
10508 }
10509}
10510impl<T> core::ops::Mul<&Power<T>> for &InverseAcceleration<T> where T: NumLike {
10512 type Output = Momentum<T>;
10513 fn mul(self, rhs: &Power<T>) -> Self::Output {
10514 Momentum{kgmps: self.s2pm.clone() * rhs.W.clone()}
10515 }
10516}
10517
10518impl<T> core::ops::Mul<Pressure<T>> for InverseAcceleration<T> where T: NumLike {
10521 type Output = AreaDensity<T>;
10522 fn mul(self, rhs: Pressure<T>) -> Self::Output {
10523 AreaDensity{kgpm2: self.s2pm * rhs.Pa}
10524 }
10525}
10526impl<T> core::ops::Mul<Pressure<T>> for &InverseAcceleration<T> where T: NumLike {
10528 type Output = AreaDensity<T>;
10529 fn mul(self, rhs: Pressure<T>) -> Self::Output {
10530 AreaDensity{kgpm2: self.s2pm.clone() * rhs.Pa}
10531 }
10532}
10533impl<T> core::ops::Mul<&Pressure<T>> for InverseAcceleration<T> where T: NumLike {
10535 type Output = AreaDensity<T>;
10536 fn mul(self, rhs: &Pressure<T>) -> Self::Output {
10537 AreaDensity{kgpm2: self.s2pm * rhs.Pa.clone()}
10538 }
10539}
10540impl<T> core::ops::Mul<&Pressure<T>> for &InverseAcceleration<T> where T: NumLike {
10542 type Output = AreaDensity<T>;
10543 fn mul(self, rhs: &Pressure<T>) -> Self::Output {
10544 AreaDensity{kgpm2: self.s2pm.clone() * rhs.Pa.clone()}
10545 }
10546}
10547
10548impl<T> core::ops::Div<TimePerDistance<T>> for InverseAcceleration<T> where T: NumLike {
10551 type Output = Time<T>;
10552 fn div(self, rhs: TimePerDistance<T>) -> Self::Output {
10553 Time{s: self.s2pm / rhs.spm}
10554 }
10555}
10556impl<T> core::ops::Div<TimePerDistance<T>> for &InverseAcceleration<T> where T: NumLike {
10558 type Output = Time<T>;
10559 fn div(self, rhs: TimePerDistance<T>) -> Self::Output {
10560 Time{s: self.s2pm.clone() / rhs.spm}
10561 }
10562}
10563impl<T> core::ops::Div<&TimePerDistance<T>> for InverseAcceleration<T> where T: NumLike {
10565 type Output = Time<T>;
10566 fn div(self, rhs: &TimePerDistance<T>) -> Self::Output {
10567 Time{s: self.s2pm / rhs.spm.clone()}
10568 }
10569}
10570impl<T> core::ops::Div<&TimePerDistance<T>> for &InverseAcceleration<T> where T: NumLike {
10572 type Output = Time<T>;
10573 fn div(self, rhs: &TimePerDistance<T>) -> Self::Output {
10574 Time{s: self.s2pm.clone() / rhs.spm.clone()}
10575 }
10576}
10577
10578impl<T> core::ops::Mul<Velocity<T>> for InverseAcceleration<T> where T: NumLike {
10581 type Output = Time<T>;
10582 fn mul(self, rhs: Velocity<T>) -> Self::Output {
10583 Time{s: self.s2pm * rhs.mps}
10584 }
10585}
10586impl<T> core::ops::Mul<Velocity<T>> for &InverseAcceleration<T> where T: NumLike {
10588 type Output = Time<T>;
10589 fn mul(self, rhs: Velocity<T>) -> Self::Output {
10590 Time{s: self.s2pm.clone() * rhs.mps}
10591 }
10592}
10593impl<T> core::ops::Mul<&Velocity<T>> for InverseAcceleration<T> where T: NumLike {
10595 type Output = Time<T>;
10596 fn mul(self, rhs: &Velocity<T>) -> Self::Output {
10597 Time{s: self.s2pm * rhs.mps.clone()}
10598 }
10599}
10600impl<T> core::ops::Mul<&Velocity<T>> for &InverseAcceleration<T> where T: NumLike {
10602 type Output = Time<T>;
10603 fn mul(self, rhs: &Velocity<T>) -> Self::Output {
10604 Time{s: self.s2pm.clone() * rhs.mps.clone()}
10605 }
10606}
10607
10608impl<T> core::ops::Div<InverseAbsorbedDose<T>> for InverseAcceleration<T> where T: NumLike {
10611 type Output = Distance<T>;
10612 fn div(self, rhs: InverseAbsorbedDose<T>) -> Self::Output {
10613 Distance{m: self.s2pm / rhs.per_Gy}
10614 }
10615}
10616impl<T> core::ops::Div<InverseAbsorbedDose<T>> for &InverseAcceleration<T> where T: NumLike {
10618 type Output = Distance<T>;
10619 fn div(self, rhs: InverseAbsorbedDose<T>) -> Self::Output {
10620 Distance{m: self.s2pm.clone() / rhs.per_Gy}
10621 }
10622}
10623impl<T> core::ops::Div<&InverseAbsorbedDose<T>> for InverseAcceleration<T> where T: NumLike {
10625 type Output = Distance<T>;
10626 fn div(self, rhs: &InverseAbsorbedDose<T>) -> Self::Output {
10627 Distance{m: self.s2pm / rhs.per_Gy.clone()}
10628 }
10629}
10630impl<T> core::ops::Div<&InverseAbsorbedDose<T>> for &InverseAcceleration<T> where T: NumLike {
10632 type Output = Distance<T>;
10633 fn div(self, rhs: &InverseAbsorbedDose<T>) -> Self::Output {
10634 Distance{m: self.s2pm.clone() / rhs.per_Gy.clone()}
10635 }
10636}
10637
10638impl<T> core::ops::Div<InverseDoseEquivalent<T>> for InverseAcceleration<T> where T: NumLike {
10641 type Output = Distance<T>;
10642 fn div(self, rhs: InverseDoseEquivalent<T>) -> Self::Output {
10643 Distance{m: self.s2pm / rhs.per_Sv}
10644 }
10645}
10646impl<T> core::ops::Div<InverseDoseEquivalent<T>> for &InverseAcceleration<T> where T: NumLike {
10648 type Output = Distance<T>;
10649 fn div(self, rhs: InverseDoseEquivalent<T>) -> Self::Output {
10650 Distance{m: self.s2pm.clone() / rhs.per_Sv}
10651 }
10652}
10653impl<T> core::ops::Div<&InverseDoseEquivalent<T>> for InverseAcceleration<T> where T: NumLike {
10655 type Output = Distance<T>;
10656 fn div(self, rhs: &InverseDoseEquivalent<T>) -> Self::Output {
10657 Distance{m: self.s2pm / rhs.per_Sv.clone()}
10658 }
10659}
10660impl<T> core::ops::Div<&InverseDoseEquivalent<T>> for &InverseAcceleration<T> where T: NumLike {
10662 type Output = Distance<T>;
10663 fn div(self, rhs: &InverseDoseEquivalent<T>) -> Self::Output {
10664 Distance{m: self.s2pm.clone() / rhs.per_Sv.clone()}
10665 }
10666}
10667
10668impl<T> core::ops::Div<InverseAcceleration<T>> for f64 where T: NumLike+From<f64> {
10671 type Output = Acceleration<T>;
10672 fn div(self, rhs: InverseAcceleration<T>) -> Self::Output {
10673 Acceleration{mps2: T::from(self) / rhs.s2pm}
10674 }
10675}
10676impl<T> core::ops::Div<InverseAcceleration<T>> for &f64 where T: NumLike+From<f64> {
10678 type Output = Acceleration<T>;
10679 fn div(self, rhs: InverseAcceleration<T>) -> Self::Output {
10680 Acceleration{mps2: T::from(self.clone()) / rhs.s2pm}
10681 }
10682}
10683impl<T> core::ops::Div<&InverseAcceleration<T>> for f64 where T: NumLike+From<f64> {
10685 type Output = Acceleration<T>;
10686 fn div(self, rhs: &InverseAcceleration<T>) -> Self::Output {
10687 Acceleration{mps2: T::from(self) / rhs.s2pm.clone()}
10688 }
10689}
10690impl<T> core::ops::Div<&InverseAcceleration<T>> for &f64 where T: NumLike+From<f64> {
10692 type Output = Acceleration<T>;
10693 fn div(self, rhs: &InverseAcceleration<T>) -> Self::Output {
10694 Acceleration{mps2: T::from(self.clone()) / rhs.s2pm.clone()}
10695 }
10696}
10697
10698impl<T> core::ops::Div<InverseAcceleration<T>> for f32 where T: NumLike+From<f32> {
10701 type Output = Acceleration<T>;
10702 fn div(self, rhs: InverseAcceleration<T>) -> Self::Output {
10703 Acceleration{mps2: T::from(self) / rhs.s2pm}
10704 }
10705}
10706impl<T> core::ops::Div<InverseAcceleration<T>> for &f32 where T: NumLike+From<f32> {
10708 type Output = Acceleration<T>;
10709 fn div(self, rhs: InverseAcceleration<T>) -> Self::Output {
10710 Acceleration{mps2: T::from(self.clone()) / rhs.s2pm}
10711 }
10712}
10713impl<T> core::ops::Div<&InverseAcceleration<T>> for f32 where T: NumLike+From<f32> {
10715 type Output = Acceleration<T>;
10716 fn div(self, rhs: &InverseAcceleration<T>) -> Self::Output {
10717 Acceleration{mps2: T::from(self) / rhs.s2pm.clone()}
10718 }
10719}
10720impl<T> core::ops::Div<&InverseAcceleration<T>> for &f32 where T: NumLike+From<f32> {
10722 type Output = Acceleration<T>;
10723 fn div(self, rhs: &InverseAcceleration<T>) -> Self::Output {
10724 Acceleration{mps2: T::from(self.clone()) / rhs.s2pm.clone()}
10725 }
10726}
10727
10728impl<T> core::ops::Div<InverseAcceleration<T>> for i64 where T: NumLike+From<i64> {
10731 type Output = Acceleration<T>;
10732 fn div(self, rhs: InverseAcceleration<T>) -> Self::Output {
10733 Acceleration{mps2: T::from(self) / rhs.s2pm}
10734 }
10735}
10736impl<T> core::ops::Div<InverseAcceleration<T>> for &i64 where T: NumLike+From<i64> {
10738 type Output = Acceleration<T>;
10739 fn div(self, rhs: InverseAcceleration<T>) -> Self::Output {
10740 Acceleration{mps2: T::from(self.clone()) / rhs.s2pm}
10741 }
10742}
10743impl<T> core::ops::Div<&InverseAcceleration<T>> for i64 where T: NumLike+From<i64> {
10745 type Output = Acceleration<T>;
10746 fn div(self, rhs: &InverseAcceleration<T>) -> Self::Output {
10747 Acceleration{mps2: T::from(self) / rhs.s2pm.clone()}
10748 }
10749}
10750impl<T> core::ops::Div<&InverseAcceleration<T>> for &i64 where T: NumLike+From<i64> {
10752 type Output = Acceleration<T>;
10753 fn div(self, rhs: &InverseAcceleration<T>) -> Self::Output {
10754 Acceleration{mps2: T::from(self.clone()) / rhs.s2pm.clone()}
10755 }
10756}
10757
10758impl<T> core::ops::Div<InverseAcceleration<T>> for i32 where T: NumLike+From<i32> {
10761 type Output = Acceleration<T>;
10762 fn div(self, rhs: InverseAcceleration<T>) -> Self::Output {
10763 Acceleration{mps2: T::from(self) / rhs.s2pm}
10764 }
10765}
10766impl<T> core::ops::Div<InverseAcceleration<T>> for &i32 where T: NumLike+From<i32> {
10768 type Output = Acceleration<T>;
10769 fn div(self, rhs: InverseAcceleration<T>) -> Self::Output {
10770 Acceleration{mps2: T::from(self.clone()) / rhs.s2pm}
10771 }
10772}
10773impl<T> core::ops::Div<&InverseAcceleration<T>> for i32 where T: NumLike+From<i32> {
10775 type Output = Acceleration<T>;
10776 fn div(self, rhs: &InverseAcceleration<T>) -> Self::Output {
10777 Acceleration{mps2: T::from(self) / rhs.s2pm.clone()}
10778 }
10779}
10780impl<T> core::ops::Div<&InverseAcceleration<T>> for &i32 where T: NumLike+From<i32> {
10782 type Output = Acceleration<T>;
10783 fn div(self, rhs: &InverseAcceleration<T>) -> Self::Output {
10784 Acceleration{mps2: T::from(self.clone()) / rhs.s2pm.clone()}
10785 }
10786}
10787
10788#[cfg(feature="num-bigfloat")]
10791impl<T> core::ops::Div<InverseAcceleration<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
10792 type Output = Acceleration<T>;
10793 fn div(self, rhs: InverseAcceleration<T>) -> Self::Output {
10794 Acceleration{mps2: T::from(self) / rhs.s2pm}
10795 }
10796}
10797#[cfg(feature="num-bigfloat")]
10799impl<T> core::ops::Div<InverseAcceleration<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
10800 type Output = Acceleration<T>;
10801 fn div(self, rhs: InverseAcceleration<T>) -> Self::Output {
10802 Acceleration{mps2: T::from(self.clone()) / rhs.s2pm}
10803 }
10804}
10805#[cfg(feature="num-bigfloat")]
10807impl<T> core::ops::Div<&InverseAcceleration<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
10808 type Output = Acceleration<T>;
10809 fn div(self, rhs: &InverseAcceleration<T>) -> Self::Output {
10810 Acceleration{mps2: T::from(self) / rhs.s2pm.clone()}
10811 }
10812}
10813#[cfg(feature="num-bigfloat")]
10815impl<T> core::ops::Div<&InverseAcceleration<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
10816 type Output = Acceleration<T>;
10817 fn div(self, rhs: &InverseAcceleration<T>) -> Self::Output {
10818 Acceleration{mps2: T::from(self.clone()) / rhs.s2pm.clone()}
10819 }
10820}
10821
10822#[cfg(feature="num-complex")]
10825impl<T> core::ops::Div<InverseAcceleration<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
10826 type Output = Acceleration<T>;
10827 fn div(self, rhs: InverseAcceleration<T>) -> Self::Output {
10828 Acceleration{mps2: T::from(self) / rhs.s2pm}
10829 }
10830}
10831#[cfg(feature="num-complex")]
10833impl<T> core::ops::Div<InverseAcceleration<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
10834 type Output = Acceleration<T>;
10835 fn div(self, rhs: InverseAcceleration<T>) -> Self::Output {
10836 Acceleration{mps2: T::from(self.clone()) / rhs.s2pm}
10837 }
10838}
10839#[cfg(feature="num-complex")]
10841impl<T> core::ops::Div<&InverseAcceleration<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
10842 type Output = Acceleration<T>;
10843 fn div(self, rhs: &InverseAcceleration<T>) -> Self::Output {
10844 Acceleration{mps2: T::from(self) / rhs.s2pm.clone()}
10845 }
10846}
10847#[cfg(feature="num-complex")]
10849impl<T> core::ops::Div<&InverseAcceleration<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
10850 type Output = Acceleration<T>;
10851 fn div(self, rhs: &InverseAcceleration<T>) -> Self::Output {
10852 Acceleration{mps2: T::from(self.clone()) / rhs.s2pm.clone()}
10853 }
10854}
10855
10856#[cfg(feature="num-complex")]
10859impl<T> core::ops::Div<InverseAcceleration<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
10860 type Output = Acceleration<T>;
10861 fn div(self, rhs: InverseAcceleration<T>) -> Self::Output {
10862 Acceleration{mps2: T::from(self) / rhs.s2pm}
10863 }
10864}
10865#[cfg(feature="num-complex")]
10867impl<T> core::ops::Div<InverseAcceleration<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
10868 type Output = Acceleration<T>;
10869 fn div(self, rhs: InverseAcceleration<T>) -> Self::Output {
10870 Acceleration{mps2: T::from(self.clone()) / rhs.s2pm}
10871 }
10872}
10873#[cfg(feature="num-complex")]
10875impl<T> core::ops::Div<&InverseAcceleration<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
10876 type Output = Acceleration<T>;
10877 fn div(self, rhs: &InverseAcceleration<T>) -> Self::Output {
10878 Acceleration{mps2: T::from(self) / rhs.s2pm.clone()}
10879 }
10880}
10881#[cfg(feature="num-complex")]
10883impl<T> core::ops::Div<&InverseAcceleration<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
10884 type Output = Acceleration<T>;
10885 fn div(self, rhs: &InverseAcceleration<T>) -> Self::Output {
10886 Acceleration{mps2: T::from(self.clone()) / rhs.s2pm.clone()}
10887 }
10888}
10889
10890#[derive(UnitStruct, Debug, Clone)]
10892#[cfg_attr(feature="serde", derive(Serialize, Deserialize))]
10893pub struct InverseAngularAcceleration<T: NumLike>{
10894 pub s2prad: T
10896}
10897
10898impl<T> InverseAngularAcceleration<T> where T: NumLike {
10899
10900 pub fn unit_name() -> &'static str { "seconds squared per radian" }
10902
10903 pub fn unit_symbol() -> &'static str { "s²/rad" }
10905
10906 pub fn from_s2prad(s2prad: T) -> Self { InverseAngularAcceleration{s2prad: s2prad} }
10911
10912 pub fn to_s2prad(&self) -> T { self.s2prad.clone() }
10914
10915 pub fn from_seconds_squared_per_radian(seconds_squared_per_radian: T) -> Self { InverseAngularAcceleration{s2prad: seconds_squared_per_radian} }
10920
10921 pub fn to_seconds_squared_per_radian(&self) -> T { self.s2prad.clone() }
10923
10924}
10925
10926impl<T> fmt::Display for InverseAngularAcceleration<T> where T: NumLike {
10927 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
10928 write!(f, "{} {}", &self.s2prad, Self::unit_symbol())
10929 }
10930}
10931
10932impl<T> InverseAngularAcceleration<T> where T: NumLike+From<f64> {
10933
10934 pub fn to_seconds_squared_per_degree(&self) -> T {
10938 return self.s2prad.clone() * T::from(0.0174532925199433_f64);
10939 }
10940
10941 pub fn from_seconds_squared_per_degree(seconds_squared_per_degree: T) -> Self {
10948 InverseAngularAcceleration{s2prad: seconds_squared_per_degree * T::from(57.2957795130823_f64)}
10949 }
10950
10951}
10952
10953
10954#[cfg(feature="num-bigfloat")]
10956impl core::ops::Mul<InverseAngularAcceleration<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
10957 type Output = InverseAngularAcceleration<num_bigfloat::BigFloat>;
10958 fn mul(self, rhs: InverseAngularAcceleration<num_bigfloat::BigFloat>) -> Self::Output {
10959 InverseAngularAcceleration{s2prad: self * rhs.s2prad}
10960 }
10961}
10962#[cfg(feature="num-bigfloat")]
10964impl core::ops::Mul<InverseAngularAcceleration<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
10965 type Output = InverseAngularAcceleration<num_bigfloat::BigFloat>;
10966 fn mul(self, rhs: InverseAngularAcceleration<num_bigfloat::BigFloat>) -> Self::Output {
10967 InverseAngularAcceleration{s2prad: self.clone() * rhs.s2prad}
10968 }
10969}
10970#[cfg(feature="num-bigfloat")]
10972impl core::ops::Mul<&InverseAngularAcceleration<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
10973 type Output = InverseAngularAcceleration<num_bigfloat::BigFloat>;
10974 fn mul(self, rhs: &InverseAngularAcceleration<num_bigfloat::BigFloat>) -> Self::Output {
10975 InverseAngularAcceleration{s2prad: self * rhs.s2prad.clone()}
10976 }
10977}
10978#[cfg(feature="num-bigfloat")]
10980impl core::ops::Mul<&InverseAngularAcceleration<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
10981 type Output = InverseAngularAcceleration<num_bigfloat::BigFloat>;
10982 fn mul(self, rhs: &InverseAngularAcceleration<num_bigfloat::BigFloat>) -> Self::Output {
10983 InverseAngularAcceleration{s2prad: self.clone() * rhs.s2prad.clone()}
10984 }
10985}
10986
10987#[cfg(feature="num-complex")]
10989impl core::ops::Mul<InverseAngularAcceleration<num_complex::Complex32>> for num_complex::Complex32 {
10990 type Output = InverseAngularAcceleration<num_complex::Complex32>;
10991 fn mul(self, rhs: InverseAngularAcceleration<num_complex::Complex32>) -> Self::Output {
10992 InverseAngularAcceleration{s2prad: self * rhs.s2prad}
10993 }
10994}
10995#[cfg(feature="num-complex")]
10997impl core::ops::Mul<InverseAngularAcceleration<num_complex::Complex32>> for &num_complex::Complex32 {
10998 type Output = InverseAngularAcceleration<num_complex::Complex32>;
10999 fn mul(self, rhs: InverseAngularAcceleration<num_complex::Complex32>) -> Self::Output {
11000 InverseAngularAcceleration{s2prad: self.clone() * rhs.s2prad}
11001 }
11002}
11003#[cfg(feature="num-complex")]
11005impl core::ops::Mul<&InverseAngularAcceleration<num_complex::Complex32>> for num_complex::Complex32 {
11006 type Output = InverseAngularAcceleration<num_complex::Complex32>;
11007 fn mul(self, rhs: &InverseAngularAcceleration<num_complex::Complex32>) -> Self::Output {
11008 InverseAngularAcceleration{s2prad: self * rhs.s2prad.clone()}
11009 }
11010}
11011#[cfg(feature="num-complex")]
11013impl core::ops::Mul<&InverseAngularAcceleration<num_complex::Complex32>> for &num_complex::Complex32 {
11014 type Output = InverseAngularAcceleration<num_complex::Complex32>;
11015 fn mul(self, rhs: &InverseAngularAcceleration<num_complex::Complex32>) -> Self::Output {
11016 InverseAngularAcceleration{s2prad: self.clone() * rhs.s2prad.clone()}
11017 }
11018}
11019
11020#[cfg(feature="num-complex")]
11022impl core::ops::Mul<InverseAngularAcceleration<num_complex::Complex64>> for num_complex::Complex64 {
11023 type Output = InverseAngularAcceleration<num_complex::Complex64>;
11024 fn mul(self, rhs: InverseAngularAcceleration<num_complex::Complex64>) -> Self::Output {
11025 InverseAngularAcceleration{s2prad: self * rhs.s2prad}
11026 }
11027}
11028#[cfg(feature="num-complex")]
11030impl core::ops::Mul<InverseAngularAcceleration<num_complex::Complex64>> for &num_complex::Complex64 {
11031 type Output = InverseAngularAcceleration<num_complex::Complex64>;
11032 fn mul(self, rhs: InverseAngularAcceleration<num_complex::Complex64>) -> Self::Output {
11033 InverseAngularAcceleration{s2prad: self.clone() * rhs.s2prad}
11034 }
11035}
11036#[cfg(feature="num-complex")]
11038impl core::ops::Mul<&InverseAngularAcceleration<num_complex::Complex64>> for num_complex::Complex64 {
11039 type Output = InverseAngularAcceleration<num_complex::Complex64>;
11040 fn mul(self, rhs: &InverseAngularAcceleration<num_complex::Complex64>) -> Self::Output {
11041 InverseAngularAcceleration{s2prad: self * rhs.s2prad.clone()}
11042 }
11043}
11044#[cfg(feature="num-complex")]
11046impl core::ops::Mul<&InverseAngularAcceleration<num_complex::Complex64>> for &num_complex::Complex64 {
11047 type Output = InverseAngularAcceleration<num_complex::Complex64>;
11048 fn mul(self, rhs: &InverseAngularAcceleration<num_complex::Complex64>) -> Self::Output {
11049 InverseAngularAcceleration{s2prad: self.clone() * rhs.s2prad.clone()}
11050 }
11051}
11052
11053
11054
11055
11056impl<T> core::ops::Div<Time<T>> for InverseAngularAcceleration<T> where T: NumLike {
11059 type Output = InverseAngularVelocity<T>;
11060 fn div(self, rhs: Time<T>) -> Self::Output {
11061 InverseAngularVelocity{s_per_rad: self.s2prad / rhs.s}
11062 }
11063}
11064impl<T> core::ops::Div<Time<T>> for &InverseAngularAcceleration<T> where T: NumLike {
11066 type Output = InverseAngularVelocity<T>;
11067 fn div(self, rhs: Time<T>) -> Self::Output {
11068 InverseAngularVelocity{s_per_rad: self.s2prad.clone() / rhs.s}
11069 }
11070}
11071impl<T> core::ops::Div<&Time<T>> for InverseAngularAcceleration<T> where T: NumLike {
11073 type Output = InverseAngularVelocity<T>;
11074 fn div(self, rhs: &Time<T>) -> Self::Output {
11075 InverseAngularVelocity{s_per_rad: self.s2prad / rhs.s.clone()}
11076 }
11077}
11078impl<T> core::ops::Div<&Time<T>> for &InverseAngularAcceleration<T> where T: NumLike {
11080 type Output = InverseAngularVelocity<T>;
11081 fn div(self, rhs: &Time<T>) -> Self::Output {
11082 InverseAngularVelocity{s_per_rad: self.s2prad.clone() / rhs.s.clone()}
11083 }
11084}
11085
11086impl<T> core::ops::Mul<AngularVelocity<T>> for InverseAngularAcceleration<T> where T: NumLike {
11089 type Output = Time<T>;
11090 fn mul(self, rhs: AngularVelocity<T>) -> Self::Output {
11091 Time{s: self.s2prad * rhs.radps}
11092 }
11093}
11094impl<T> core::ops::Mul<AngularVelocity<T>> for &InverseAngularAcceleration<T> where T: NumLike {
11096 type Output = Time<T>;
11097 fn mul(self, rhs: AngularVelocity<T>) -> Self::Output {
11098 Time{s: self.s2prad.clone() * rhs.radps}
11099 }
11100}
11101impl<T> core::ops::Mul<&AngularVelocity<T>> for InverseAngularAcceleration<T> where T: NumLike {
11103 type Output = Time<T>;
11104 fn mul(self, rhs: &AngularVelocity<T>) -> Self::Output {
11105 Time{s: self.s2prad * rhs.radps.clone()}
11106 }
11107}
11108impl<T> core::ops::Mul<&AngularVelocity<T>> for &InverseAngularAcceleration<T> where T: NumLike {
11110 type Output = Time<T>;
11111 fn mul(self, rhs: &AngularVelocity<T>) -> Self::Output {
11112 Time{s: self.s2prad.clone() * rhs.radps.clone()}
11113 }
11114}
11115
11116impl<T> core::ops::Mul<Frequency<T>> for InverseAngularAcceleration<T> where T: NumLike {
11119 type Output = InverseAngularVelocity<T>;
11120 fn mul(self, rhs: Frequency<T>) -> Self::Output {
11121 InverseAngularVelocity{s_per_rad: self.s2prad * rhs.Hz}
11122 }
11123}
11124impl<T> core::ops::Mul<Frequency<T>> for &InverseAngularAcceleration<T> where T: NumLike {
11126 type Output = InverseAngularVelocity<T>;
11127 fn mul(self, rhs: Frequency<T>) -> Self::Output {
11128 InverseAngularVelocity{s_per_rad: self.s2prad.clone() * rhs.Hz}
11129 }
11130}
11131impl<T> core::ops::Mul<&Frequency<T>> for InverseAngularAcceleration<T> where T: NumLike {
11133 type Output = InverseAngularVelocity<T>;
11134 fn mul(self, rhs: &Frequency<T>) -> Self::Output {
11135 InverseAngularVelocity{s_per_rad: self.s2prad * rhs.Hz.clone()}
11136 }
11137}
11138impl<T> core::ops::Mul<&Frequency<T>> for &InverseAngularAcceleration<T> where T: NumLike {
11140 type Output = InverseAngularVelocity<T>;
11141 fn mul(self, rhs: &Frequency<T>) -> Self::Output {
11142 InverseAngularVelocity{s_per_rad: self.s2prad.clone() * rhs.Hz.clone()}
11143 }
11144}
11145
11146impl<T> core::ops::Div<InverseAngularVelocity<T>> for InverseAngularAcceleration<T> where T: NumLike {
11149 type Output = Time<T>;
11150 fn div(self, rhs: InverseAngularVelocity<T>) -> Self::Output {
11151 Time{s: self.s2prad / rhs.s_per_rad}
11152 }
11153}
11154impl<T> core::ops::Div<InverseAngularVelocity<T>> for &InverseAngularAcceleration<T> where T: NumLike {
11156 type Output = Time<T>;
11157 fn div(self, rhs: InverseAngularVelocity<T>) -> Self::Output {
11158 Time{s: self.s2prad.clone() / rhs.s_per_rad}
11159 }
11160}
11161impl<T> core::ops::Div<&InverseAngularVelocity<T>> for InverseAngularAcceleration<T> where T: NumLike {
11163 type Output = Time<T>;
11164 fn div(self, rhs: &InverseAngularVelocity<T>) -> Self::Output {
11165 Time{s: self.s2prad / rhs.s_per_rad.clone()}
11166 }
11167}
11168impl<T> core::ops::Div<&InverseAngularVelocity<T>> for &InverseAngularAcceleration<T> where T: NumLike {
11170 type Output = Time<T>;
11171 fn div(self, rhs: &InverseAngularVelocity<T>) -> Self::Output {
11172 Time{s: self.s2prad.clone() / rhs.s_per_rad.clone()}
11173 }
11174}
11175
11176impl<T> core::ops::Div<InverseAngularAcceleration<T>> for f64 where T: NumLike+From<f64> {
11179 type Output = AngularAcceleration<T>;
11180 fn div(self, rhs: InverseAngularAcceleration<T>) -> Self::Output {
11181 AngularAcceleration{radps2: T::from(self) / rhs.s2prad}
11182 }
11183}
11184impl<T> core::ops::Div<InverseAngularAcceleration<T>> for &f64 where T: NumLike+From<f64> {
11186 type Output = AngularAcceleration<T>;
11187 fn div(self, rhs: InverseAngularAcceleration<T>) -> Self::Output {
11188 AngularAcceleration{radps2: T::from(self.clone()) / rhs.s2prad}
11189 }
11190}
11191impl<T> core::ops::Div<&InverseAngularAcceleration<T>> for f64 where T: NumLike+From<f64> {
11193 type Output = AngularAcceleration<T>;
11194 fn div(self, rhs: &InverseAngularAcceleration<T>) -> Self::Output {
11195 AngularAcceleration{radps2: T::from(self) / rhs.s2prad.clone()}
11196 }
11197}
11198impl<T> core::ops::Div<&InverseAngularAcceleration<T>> for &f64 where T: NumLike+From<f64> {
11200 type Output = AngularAcceleration<T>;
11201 fn div(self, rhs: &InverseAngularAcceleration<T>) -> Self::Output {
11202 AngularAcceleration{radps2: T::from(self.clone()) / rhs.s2prad.clone()}
11203 }
11204}
11205
11206impl<T> core::ops::Div<InverseAngularAcceleration<T>> for f32 where T: NumLike+From<f32> {
11209 type Output = AngularAcceleration<T>;
11210 fn div(self, rhs: InverseAngularAcceleration<T>) -> Self::Output {
11211 AngularAcceleration{radps2: T::from(self) / rhs.s2prad}
11212 }
11213}
11214impl<T> core::ops::Div<InverseAngularAcceleration<T>> for &f32 where T: NumLike+From<f32> {
11216 type Output = AngularAcceleration<T>;
11217 fn div(self, rhs: InverseAngularAcceleration<T>) -> Self::Output {
11218 AngularAcceleration{radps2: T::from(self.clone()) / rhs.s2prad}
11219 }
11220}
11221impl<T> core::ops::Div<&InverseAngularAcceleration<T>> for f32 where T: NumLike+From<f32> {
11223 type Output = AngularAcceleration<T>;
11224 fn div(self, rhs: &InverseAngularAcceleration<T>) -> Self::Output {
11225 AngularAcceleration{radps2: T::from(self) / rhs.s2prad.clone()}
11226 }
11227}
11228impl<T> core::ops::Div<&InverseAngularAcceleration<T>> for &f32 where T: NumLike+From<f32> {
11230 type Output = AngularAcceleration<T>;
11231 fn div(self, rhs: &InverseAngularAcceleration<T>) -> Self::Output {
11232 AngularAcceleration{radps2: T::from(self.clone()) / rhs.s2prad.clone()}
11233 }
11234}
11235
11236impl<T> core::ops::Div<InverseAngularAcceleration<T>> for i64 where T: NumLike+From<i64> {
11239 type Output = AngularAcceleration<T>;
11240 fn div(self, rhs: InverseAngularAcceleration<T>) -> Self::Output {
11241 AngularAcceleration{radps2: T::from(self) / rhs.s2prad}
11242 }
11243}
11244impl<T> core::ops::Div<InverseAngularAcceleration<T>> for &i64 where T: NumLike+From<i64> {
11246 type Output = AngularAcceleration<T>;
11247 fn div(self, rhs: InverseAngularAcceleration<T>) -> Self::Output {
11248 AngularAcceleration{radps2: T::from(self.clone()) / rhs.s2prad}
11249 }
11250}
11251impl<T> core::ops::Div<&InverseAngularAcceleration<T>> for i64 where T: NumLike+From<i64> {
11253 type Output = AngularAcceleration<T>;
11254 fn div(self, rhs: &InverseAngularAcceleration<T>) -> Self::Output {
11255 AngularAcceleration{radps2: T::from(self) / rhs.s2prad.clone()}
11256 }
11257}
11258impl<T> core::ops::Div<&InverseAngularAcceleration<T>> for &i64 where T: NumLike+From<i64> {
11260 type Output = AngularAcceleration<T>;
11261 fn div(self, rhs: &InverseAngularAcceleration<T>) -> Self::Output {
11262 AngularAcceleration{radps2: T::from(self.clone()) / rhs.s2prad.clone()}
11263 }
11264}
11265
11266impl<T> core::ops::Div<InverseAngularAcceleration<T>> for i32 where T: NumLike+From<i32> {
11269 type Output = AngularAcceleration<T>;
11270 fn div(self, rhs: InverseAngularAcceleration<T>) -> Self::Output {
11271 AngularAcceleration{radps2: T::from(self) / rhs.s2prad}
11272 }
11273}
11274impl<T> core::ops::Div<InverseAngularAcceleration<T>> for &i32 where T: NumLike+From<i32> {
11276 type Output = AngularAcceleration<T>;
11277 fn div(self, rhs: InverseAngularAcceleration<T>) -> Self::Output {
11278 AngularAcceleration{radps2: T::from(self.clone()) / rhs.s2prad}
11279 }
11280}
11281impl<T> core::ops::Div<&InverseAngularAcceleration<T>> for i32 where T: NumLike+From<i32> {
11283 type Output = AngularAcceleration<T>;
11284 fn div(self, rhs: &InverseAngularAcceleration<T>) -> Self::Output {
11285 AngularAcceleration{radps2: T::from(self) / rhs.s2prad.clone()}
11286 }
11287}
11288impl<T> core::ops::Div<&InverseAngularAcceleration<T>> for &i32 where T: NumLike+From<i32> {
11290 type Output = AngularAcceleration<T>;
11291 fn div(self, rhs: &InverseAngularAcceleration<T>) -> Self::Output {
11292 AngularAcceleration{radps2: T::from(self.clone()) / rhs.s2prad.clone()}
11293 }
11294}
11295
11296#[cfg(feature="num-bigfloat")]
11299impl<T> core::ops::Div<InverseAngularAcceleration<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
11300 type Output = AngularAcceleration<T>;
11301 fn div(self, rhs: InverseAngularAcceleration<T>) -> Self::Output {
11302 AngularAcceleration{radps2: T::from(self) / rhs.s2prad}
11303 }
11304}
11305#[cfg(feature="num-bigfloat")]
11307impl<T> core::ops::Div<InverseAngularAcceleration<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
11308 type Output = AngularAcceleration<T>;
11309 fn div(self, rhs: InverseAngularAcceleration<T>) -> Self::Output {
11310 AngularAcceleration{radps2: T::from(self.clone()) / rhs.s2prad}
11311 }
11312}
11313#[cfg(feature="num-bigfloat")]
11315impl<T> core::ops::Div<&InverseAngularAcceleration<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
11316 type Output = AngularAcceleration<T>;
11317 fn div(self, rhs: &InverseAngularAcceleration<T>) -> Self::Output {
11318 AngularAcceleration{radps2: T::from(self) / rhs.s2prad.clone()}
11319 }
11320}
11321#[cfg(feature="num-bigfloat")]
11323impl<T> core::ops::Div<&InverseAngularAcceleration<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
11324 type Output = AngularAcceleration<T>;
11325 fn div(self, rhs: &InverseAngularAcceleration<T>) -> Self::Output {
11326 AngularAcceleration{radps2: T::from(self.clone()) / rhs.s2prad.clone()}
11327 }
11328}
11329
11330#[cfg(feature="num-complex")]
11333impl<T> core::ops::Div<InverseAngularAcceleration<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
11334 type Output = AngularAcceleration<T>;
11335 fn div(self, rhs: InverseAngularAcceleration<T>) -> Self::Output {
11336 AngularAcceleration{radps2: T::from(self) / rhs.s2prad}
11337 }
11338}
11339#[cfg(feature="num-complex")]
11341impl<T> core::ops::Div<InverseAngularAcceleration<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
11342 type Output = AngularAcceleration<T>;
11343 fn div(self, rhs: InverseAngularAcceleration<T>) -> Self::Output {
11344 AngularAcceleration{radps2: T::from(self.clone()) / rhs.s2prad}
11345 }
11346}
11347#[cfg(feature="num-complex")]
11349impl<T> core::ops::Div<&InverseAngularAcceleration<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
11350 type Output = AngularAcceleration<T>;
11351 fn div(self, rhs: &InverseAngularAcceleration<T>) -> Self::Output {
11352 AngularAcceleration{radps2: T::from(self) / rhs.s2prad.clone()}
11353 }
11354}
11355#[cfg(feature="num-complex")]
11357impl<T> core::ops::Div<&InverseAngularAcceleration<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
11358 type Output = AngularAcceleration<T>;
11359 fn div(self, rhs: &InverseAngularAcceleration<T>) -> Self::Output {
11360 AngularAcceleration{radps2: T::from(self.clone()) / rhs.s2prad.clone()}
11361 }
11362}
11363
11364#[cfg(feature="num-complex")]
11367impl<T> core::ops::Div<InverseAngularAcceleration<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
11368 type Output = AngularAcceleration<T>;
11369 fn div(self, rhs: InverseAngularAcceleration<T>) -> Self::Output {
11370 AngularAcceleration{radps2: T::from(self) / rhs.s2prad}
11371 }
11372}
11373#[cfg(feature="num-complex")]
11375impl<T> core::ops::Div<InverseAngularAcceleration<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
11376 type Output = AngularAcceleration<T>;
11377 fn div(self, rhs: InverseAngularAcceleration<T>) -> Self::Output {
11378 AngularAcceleration{radps2: T::from(self.clone()) / rhs.s2prad}
11379 }
11380}
11381#[cfg(feature="num-complex")]
11383impl<T> core::ops::Div<&InverseAngularAcceleration<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
11384 type Output = AngularAcceleration<T>;
11385 fn div(self, rhs: &InverseAngularAcceleration<T>) -> Self::Output {
11386 AngularAcceleration{radps2: T::from(self) / rhs.s2prad.clone()}
11387 }
11388}
11389#[cfg(feature="num-complex")]
11391impl<T> core::ops::Div<&InverseAngularAcceleration<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
11392 type Output = AngularAcceleration<T>;
11393 fn div(self, rhs: &InverseAngularAcceleration<T>) -> Self::Output {
11394 AngularAcceleration{radps2: T::from(self.clone()) / rhs.s2prad.clone()}
11395 }
11396}
11397
11398#[derive(UnitStruct, Debug, Clone)]
11400#[cfg_attr(feature="serde", derive(Serialize, Deserialize))]
11401pub struct InverseAngularMomentum<T: NumLike>{
11402 pub s_per_kgm2rad: T
11404}
11405
11406impl<T> InverseAngularMomentum<T> where T: NumLike {
11407
11408 pub fn unit_name() -> &'static str { "seconds per kilogram meters squared radian" }
11410
11411 pub fn unit_symbol() -> &'static str { "s/kg·m²·rad" }
11413
11414 pub fn from_s_per_kgm2rad(s_per_kgm2rad: T) -> Self { InverseAngularMomentum{s_per_kgm2rad: s_per_kgm2rad} }
11419
11420 pub fn to_s_per_kgm2rad(&self) -> T { self.s_per_kgm2rad.clone() }
11422
11423 pub fn from_seconds_per_kilogram_meters_squared_radian(seconds_per_kilogram_meters_squared_radian: T) -> Self { InverseAngularMomentum{s_per_kgm2rad: seconds_per_kilogram_meters_squared_radian} }
11428
11429 pub fn to_seconds_per_kilogram_meters_squared_radian(&self) -> T { self.s_per_kgm2rad.clone() }
11431
11432}
11433
11434impl<T> fmt::Display for InverseAngularMomentum<T> where T: NumLike {
11435 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
11436 write!(f, "{} {}", &self.s_per_kgm2rad, Self::unit_symbol())
11437 }
11438}
11439
11440impl<T> InverseAngularMomentum<T> where T: NumLike+From<f64> {
11441
11442 pub fn to_s_per_gcm2rad(&self) -> T {
11446 return self.s_per_kgm2rad.clone() * T::from(1e-07_f64);
11447 }
11448
11449 pub fn from_s_per_gcm2rad(s_per_gcm2rad: T) -> Self {
11456 InverseAngularMomentum{s_per_kgm2rad: s_per_gcm2rad * T::from(10000000.0_f64)}
11457 }
11458
11459}
11460
11461
11462#[cfg(feature="num-bigfloat")]
11464impl core::ops::Mul<InverseAngularMomentum<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
11465 type Output = InverseAngularMomentum<num_bigfloat::BigFloat>;
11466 fn mul(self, rhs: InverseAngularMomentum<num_bigfloat::BigFloat>) -> Self::Output {
11467 InverseAngularMomentum{s_per_kgm2rad: self * rhs.s_per_kgm2rad}
11468 }
11469}
11470#[cfg(feature="num-bigfloat")]
11472impl core::ops::Mul<InverseAngularMomentum<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
11473 type Output = InverseAngularMomentum<num_bigfloat::BigFloat>;
11474 fn mul(self, rhs: InverseAngularMomentum<num_bigfloat::BigFloat>) -> Self::Output {
11475 InverseAngularMomentum{s_per_kgm2rad: self.clone() * rhs.s_per_kgm2rad}
11476 }
11477}
11478#[cfg(feature="num-bigfloat")]
11480impl core::ops::Mul<&InverseAngularMomentum<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
11481 type Output = InverseAngularMomentum<num_bigfloat::BigFloat>;
11482 fn mul(self, rhs: &InverseAngularMomentum<num_bigfloat::BigFloat>) -> Self::Output {
11483 InverseAngularMomentum{s_per_kgm2rad: self * rhs.s_per_kgm2rad.clone()}
11484 }
11485}
11486#[cfg(feature="num-bigfloat")]
11488impl core::ops::Mul<&InverseAngularMomentum<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
11489 type Output = InverseAngularMomentum<num_bigfloat::BigFloat>;
11490 fn mul(self, rhs: &InverseAngularMomentum<num_bigfloat::BigFloat>) -> Self::Output {
11491 InverseAngularMomentum{s_per_kgm2rad: self.clone() * rhs.s_per_kgm2rad.clone()}
11492 }
11493}
11494
11495#[cfg(feature="num-complex")]
11497impl core::ops::Mul<InverseAngularMomentum<num_complex::Complex32>> for num_complex::Complex32 {
11498 type Output = InverseAngularMomentum<num_complex::Complex32>;
11499 fn mul(self, rhs: InverseAngularMomentum<num_complex::Complex32>) -> Self::Output {
11500 InverseAngularMomentum{s_per_kgm2rad: self * rhs.s_per_kgm2rad}
11501 }
11502}
11503#[cfg(feature="num-complex")]
11505impl core::ops::Mul<InverseAngularMomentum<num_complex::Complex32>> for &num_complex::Complex32 {
11506 type Output = InverseAngularMomentum<num_complex::Complex32>;
11507 fn mul(self, rhs: InverseAngularMomentum<num_complex::Complex32>) -> Self::Output {
11508 InverseAngularMomentum{s_per_kgm2rad: self.clone() * rhs.s_per_kgm2rad}
11509 }
11510}
11511#[cfg(feature="num-complex")]
11513impl core::ops::Mul<&InverseAngularMomentum<num_complex::Complex32>> for num_complex::Complex32 {
11514 type Output = InverseAngularMomentum<num_complex::Complex32>;
11515 fn mul(self, rhs: &InverseAngularMomentum<num_complex::Complex32>) -> Self::Output {
11516 InverseAngularMomentum{s_per_kgm2rad: self * rhs.s_per_kgm2rad.clone()}
11517 }
11518}
11519#[cfg(feature="num-complex")]
11521impl core::ops::Mul<&InverseAngularMomentum<num_complex::Complex32>> for &num_complex::Complex32 {
11522 type Output = InverseAngularMomentum<num_complex::Complex32>;
11523 fn mul(self, rhs: &InverseAngularMomentum<num_complex::Complex32>) -> Self::Output {
11524 InverseAngularMomentum{s_per_kgm2rad: self.clone() * rhs.s_per_kgm2rad.clone()}
11525 }
11526}
11527
11528#[cfg(feature="num-complex")]
11530impl core::ops::Mul<InverseAngularMomentum<num_complex::Complex64>> for num_complex::Complex64 {
11531 type Output = InverseAngularMomentum<num_complex::Complex64>;
11532 fn mul(self, rhs: InverseAngularMomentum<num_complex::Complex64>) -> Self::Output {
11533 InverseAngularMomentum{s_per_kgm2rad: self * rhs.s_per_kgm2rad}
11534 }
11535}
11536#[cfg(feature="num-complex")]
11538impl core::ops::Mul<InverseAngularMomentum<num_complex::Complex64>> for &num_complex::Complex64 {
11539 type Output = InverseAngularMomentum<num_complex::Complex64>;
11540 fn mul(self, rhs: InverseAngularMomentum<num_complex::Complex64>) -> Self::Output {
11541 InverseAngularMomentum{s_per_kgm2rad: self.clone() * rhs.s_per_kgm2rad}
11542 }
11543}
11544#[cfg(feature="num-complex")]
11546impl core::ops::Mul<&InverseAngularMomentum<num_complex::Complex64>> for num_complex::Complex64 {
11547 type Output = InverseAngularMomentum<num_complex::Complex64>;
11548 fn mul(self, rhs: &InverseAngularMomentum<num_complex::Complex64>) -> Self::Output {
11549 InverseAngularMomentum{s_per_kgm2rad: self * rhs.s_per_kgm2rad.clone()}
11550 }
11551}
11552#[cfg(feature="num-complex")]
11554impl core::ops::Mul<&InverseAngularMomentum<num_complex::Complex64>> for &num_complex::Complex64 {
11555 type Output = InverseAngularMomentum<num_complex::Complex64>;
11556 fn mul(self, rhs: &InverseAngularMomentum<num_complex::Complex64>) -> Self::Output {
11557 InverseAngularMomentum{s_per_kgm2rad: self.clone() * rhs.s_per_kgm2rad.clone()}
11558 }
11559}
11560
11561
11562
11563
11564impl<T> core::ops::Div<InverseMomentOfInertia<T>> for InverseAngularMomentum<T> where T: NumLike {
11567 type Output = InverseAngularVelocity<T>;
11568 fn div(self, rhs: InverseMomentOfInertia<T>) -> Self::Output {
11569 InverseAngularVelocity{s_per_rad: self.s_per_kgm2rad / rhs.per_kgm2}
11570 }
11571}
11572impl<T> core::ops::Div<InverseMomentOfInertia<T>> for &InverseAngularMomentum<T> where T: NumLike {
11574 type Output = InverseAngularVelocity<T>;
11575 fn div(self, rhs: InverseMomentOfInertia<T>) -> Self::Output {
11576 InverseAngularVelocity{s_per_rad: self.s_per_kgm2rad.clone() / rhs.per_kgm2}
11577 }
11578}
11579impl<T> core::ops::Div<&InverseMomentOfInertia<T>> for InverseAngularMomentum<T> where T: NumLike {
11581 type Output = InverseAngularVelocity<T>;
11582 fn div(self, rhs: &InverseMomentOfInertia<T>) -> Self::Output {
11583 InverseAngularVelocity{s_per_rad: self.s_per_kgm2rad / rhs.per_kgm2.clone()}
11584 }
11585}
11586impl<T> core::ops::Div<&InverseMomentOfInertia<T>> for &InverseAngularMomentum<T> where T: NumLike {
11588 type Output = InverseAngularVelocity<T>;
11589 fn div(self, rhs: &InverseMomentOfInertia<T>) -> Self::Output {
11590 InverseAngularVelocity{s_per_rad: self.s_per_kgm2rad.clone() / rhs.per_kgm2.clone()}
11591 }
11592}
11593
11594impl<T> core::ops::Mul<MomentOfInertia<T>> for InverseAngularMomentum<T> where T: NumLike {
11597 type Output = InverseAngularVelocity<T>;
11598 fn mul(self, rhs: MomentOfInertia<T>) -> Self::Output {
11599 InverseAngularVelocity{s_per_rad: self.s_per_kgm2rad * rhs.kgm2}
11600 }
11601}
11602impl<T> core::ops::Mul<MomentOfInertia<T>> for &InverseAngularMomentum<T> where T: NumLike {
11604 type Output = InverseAngularVelocity<T>;
11605 fn mul(self, rhs: MomentOfInertia<T>) -> Self::Output {
11606 InverseAngularVelocity{s_per_rad: self.s_per_kgm2rad.clone() * rhs.kgm2}
11607 }
11608}
11609impl<T> core::ops::Mul<&MomentOfInertia<T>> for InverseAngularMomentum<T> where T: NumLike {
11611 type Output = InverseAngularVelocity<T>;
11612 fn mul(self, rhs: &MomentOfInertia<T>) -> Self::Output {
11613 InverseAngularVelocity{s_per_rad: self.s_per_kgm2rad * rhs.kgm2.clone()}
11614 }
11615}
11616impl<T> core::ops::Mul<&MomentOfInertia<T>> for &InverseAngularMomentum<T> where T: NumLike {
11618 type Output = InverseAngularVelocity<T>;
11619 fn mul(self, rhs: &MomentOfInertia<T>) -> Self::Output {
11620 InverseAngularVelocity{s_per_rad: self.s_per_kgm2rad.clone() * rhs.kgm2.clone()}
11621 }
11622}
11623
11624impl<T> core::ops::Div<InverseAngularMomentum<T>> for f64 where T: NumLike+From<f64> {
11627 type Output = AngularMomentum<T>;
11628 fn div(self, rhs: InverseAngularMomentum<T>) -> Self::Output {
11629 AngularMomentum{kgm2radps: T::from(self) / rhs.s_per_kgm2rad}
11630 }
11631}
11632impl<T> core::ops::Div<InverseAngularMomentum<T>> for &f64 where T: NumLike+From<f64> {
11634 type Output = AngularMomentum<T>;
11635 fn div(self, rhs: InverseAngularMomentum<T>) -> Self::Output {
11636 AngularMomentum{kgm2radps: T::from(self.clone()) / rhs.s_per_kgm2rad}
11637 }
11638}
11639impl<T> core::ops::Div<&InverseAngularMomentum<T>> for f64 where T: NumLike+From<f64> {
11641 type Output = AngularMomentum<T>;
11642 fn div(self, rhs: &InverseAngularMomentum<T>) -> Self::Output {
11643 AngularMomentum{kgm2radps: T::from(self) / rhs.s_per_kgm2rad.clone()}
11644 }
11645}
11646impl<T> core::ops::Div<&InverseAngularMomentum<T>> for &f64 where T: NumLike+From<f64> {
11648 type Output = AngularMomentum<T>;
11649 fn div(self, rhs: &InverseAngularMomentum<T>) -> Self::Output {
11650 AngularMomentum{kgm2radps: T::from(self.clone()) / rhs.s_per_kgm2rad.clone()}
11651 }
11652}
11653
11654impl<T> core::ops::Div<InverseAngularMomentum<T>> for f32 where T: NumLike+From<f32> {
11657 type Output = AngularMomentum<T>;
11658 fn div(self, rhs: InverseAngularMomentum<T>) -> Self::Output {
11659 AngularMomentum{kgm2radps: T::from(self) / rhs.s_per_kgm2rad}
11660 }
11661}
11662impl<T> core::ops::Div<InverseAngularMomentum<T>> for &f32 where T: NumLike+From<f32> {
11664 type Output = AngularMomentum<T>;
11665 fn div(self, rhs: InverseAngularMomentum<T>) -> Self::Output {
11666 AngularMomentum{kgm2radps: T::from(self.clone()) / rhs.s_per_kgm2rad}
11667 }
11668}
11669impl<T> core::ops::Div<&InverseAngularMomentum<T>> for f32 where T: NumLike+From<f32> {
11671 type Output = AngularMomentum<T>;
11672 fn div(self, rhs: &InverseAngularMomentum<T>) -> Self::Output {
11673 AngularMomentum{kgm2radps: T::from(self) / rhs.s_per_kgm2rad.clone()}
11674 }
11675}
11676impl<T> core::ops::Div<&InverseAngularMomentum<T>> for &f32 where T: NumLike+From<f32> {
11678 type Output = AngularMomentum<T>;
11679 fn div(self, rhs: &InverseAngularMomentum<T>) -> Self::Output {
11680 AngularMomentum{kgm2radps: T::from(self.clone()) / rhs.s_per_kgm2rad.clone()}
11681 }
11682}
11683
11684impl<T> core::ops::Div<InverseAngularMomentum<T>> for i64 where T: NumLike+From<i64> {
11687 type Output = AngularMomentum<T>;
11688 fn div(self, rhs: InverseAngularMomentum<T>) -> Self::Output {
11689 AngularMomentum{kgm2radps: T::from(self) / rhs.s_per_kgm2rad}
11690 }
11691}
11692impl<T> core::ops::Div<InverseAngularMomentum<T>> for &i64 where T: NumLike+From<i64> {
11694 type Output = AngularMomentum<T>;
11695 fn div(self, rhs: InverseAngularMomentum<T>) -> Self::Output {
11696 AngularMomentum{kgm2radps: T::from(self.clone()) / rhs.s_per_kgm2rad}
11697 }
11698}
11699impl<T> core::ops::Div<&InverseAngularMomentum<T>> for i64 where T: NumLike+From<i64> {
11701 type Output = AngularMomentum<T>;
11702 fn div(self, rhs: &InverseAngularMomentum<T>) -> Self::Output {
11703 AngularMomentum{kgm2radps: T::from(self) / rhs.s_per_kgm2rad.clone()}
11704 }
11705}
11706impl<T> core::ops::Div<&InverseAngularMomentum<T>> for &i64 where T: NumLike+From<i64> {
11708 type Output = AngularMomentum<T>;
11709 fn div(self, rhs: &InverseAngularMomentum<T>) -> Self::Output {
11710 AngularMomentum{kgm2radps: T::from(self.clone()) / rhs.s_per_kgm2rad.clone()}
11711 }
11712}
11713
11714impl<T> core::ops::Div<InverseAngularMomentum<T>> for i32 where T: NumLike+From<i32> {
11717 type Output = AngularMomentum<T>;
11718 fn div(self, rhs: InverseAngularMomentum<T>) -> Self::Output {
11719 AngularMomentum{kgm2radps: T::from(self) / rhs.s_per_kgm2rad}
11720 }
11721}
11722impl<T> core::ops::Div<InverseAngularMomentum<T>> for &i32 where T: NumLike+From<i32> {
11724 type Output = AngularMomentum<T>;
11725 fn div(self, rhs: InverseAngularMomentum<T>) -> Self::Output {
11726 AngularMomentum{kgm2radps: T::from(self.clone()) / rhs.s_per_kgm2rad}
11727 }
11728}
11729impl<T> core::ops::Div<&InverseAngularMomentum<T>> for i32 where T: NumLike+From<i32> {
11731 type Output = AngularMomentum<T>;
11732 fn div(self, rhs: &InverseAngularMomentum<T>) -> Self::Output {
11733 AngularMomentum{kgm2radps: T::from(self) / rhs.s_per_kgm2rad.clone()}
11734 }
11735}
11736impl<T> core::ops::Div<&InverseAngularMomentum<T>> for &i32 where T: NumLike+From<i32> {
11738 type Output = AngularMomentum<T>;
11739 fn div(self, rhs: &InverseAngularMomentum<T>) -> Self::Output {
11740 AngularMomentum{kgm2radps: T::from(self.clone()) / rhs.s_per_kgm2rad.clone()}
11741 }
11742}
11743
11744#[cfg(feature="num-bigfloat")]
11747impl<T> core::ops::Div<InverseAngularMomentum<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
11748 type Output = AngularMomentum<T>;
11749 fn div(self, rhs: InverseAngularMomentum<T>) -> Self::Output {
11750 AngularMomentum{kgm2radps: T::from(self) / rhs.s_per_kgm2rad}
11751 }
11752}
11753#[cfg(feature="num-bigfloat")]
11755impl<T> core::ops::Div<InverseAngularMomentum<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
11756 type Output = AngularMomentum<T>;
11757 fn div(self, rhs: InverseAngularMomentum<T>) -> Self::Output {
11758 AngularMomentum{kgm2radps: T::from(self.clone()) / rhs.s_per_kgm2rad}
11759 }
11760}
11761#[cfg(feature="num-bigfloat")]
11763impl<T> core::ops::Div<&InverseAngularMomentum<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
11764 type Output = AngularMomentum<T>;
11765 fn div(self, rhs: &InverseAngularMomentum<T>) -> Self::Output {
11766 AngularMomentum{kgm2radps: T::from(self) / rhs.s_per_kgm2rad.clone()}
11767 }
11768}
11769#[cfg(feature="num-bigfloat")]
11771impl<T> core::ops::Div<&InverseAngularMomentum<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
11772 type Output = AngularMomentum<T>;
11773 fn div(self, rhs: &InverseAngularMomentum<T>) -> Self::Output {
11774 AngularMomentum{kgm2radps: T::from(self.clone()) / rhs.s_per_kgm2rad.clone()}
11775 }
11776}
11777
11778#[cfg(feature="num-complex")]
11781impl<T> core::ops::Div<InverseAngularMomentum<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
11782 type Output = AngularMomentum<T>;
11783 fn div(self, rhs: InverseAngularMomentum<T>) -> Self::Output {
11784 AngularMomentum{kgm2radps: T::from(self) / rhs.s_per_kgm2rad}
11785 }
11786}
11787#[cfg(feature="num-complex")]
11789impl<T> core::ops::Div<InverseAngularMomentum<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
11790 type Output = AngularMomentum<T>;
11791 fn div(self, rhs: InverseAngularMomentum<T>) -> Self::Output {
11792 AngularMomentum{kgm2radps: T::from(self.clone()) / rhs.s_per_kgm2rad}
11793 }
11794}
11795#[cfg(feature="num-complex")]
11797impl<T> core::ops::Div<&InverseAngularMomentum<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
11798 type Output = AngularMomentum<T>;
11799 fn div(self, rhs: &InverseAngularMomentum<T>) -> Self::Output {
11800 AngularMomentum{kgm2radps: T::from(self) / rhs.s_per_kgm2rad.clone()}
11801 }
11802}
11803#[cfg(feature="num-complex")]
11805impl<T> core::ops::Div<&InverseAngularMomentum<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
11806 type Output = AngularMomentum<T>;
11807 fn div(self, rhs: &InverseAngularMomentum<T>) -> Self::Output {
11808 AngularMomentum{kgm2radps: T::from(self.clone()) / rhs.s_per_kgm2rad.clone()}
11809 }
11810}
11811
11812#[cfg(feature="num-complex")]
11815impl<T> core::ops::Div<InverseAngularMomentum<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
11816 type Output = AngularMomentum<T>;
11817 fn div(self, rhs: InverseAngularMomentum<T>) -> Self::Output {
11818 AngularMomentum{kgm2radps: T::from(self) / rhs.s_per_kgm2rad}
11819 }
11820}
11821#[cfg(feature="num-complex")]
11823impl<T> core::ops::Div<InverseAngularMomentum<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
11824 type Output = AngularMomentum<T>;
11825 fn div(self, rhs: InverseAngularMomentum<T>) -> Self::Output {
11826 AngularMomentum{kgm2radps: T::from(self.clone()) / rhs.s_per_kgm2rad}
11827 }
11828}
11829#[cfg(feature="num-complex")]
11831impl<T> core::ops::Div<&InverseAngularMomentum<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
11832 type Output = AngularMomentum<T>;
11833 fn div(self, rhs: &InverseAngularMomentum<T>) -> Self::Output {
11834 AngularMomentum{kgm2radps: T::from(self) / rhs.s_per_kgm2rad.clone()}
11835 }
11836}
11837#[cfg(feature="num-complex")]
11839impl<T> core::ops::Div<&InverseAngularMomentum<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
11840 type Output = AngularMomentum<T>;
11841 fn div(self, rhs: &InverseAngularMomentum<T>) -> Self::Output {
11842 AngularMomentum{kgm2radps: T::from(self.clone()) / rhs.s_per_kgm2rad.clone()}
11843 }
11844}
11845
11846#[derive(UnitStruct, Debug, Clone)]
11848#[cfg_attr(feature="serde", derive(Serialize, Deserialize))]
11849pub struct InverseAngularVelocity<T: NumLike>{
11850 pub s_per_rad: T
11852}
11853
11854impl<T> InverseAngularVelocity<T> where T: NumLike {
11855
11856 pub fn unit_name() -> &'static str { "seconds per radian" }
11858
11859 pub fn unit_symbol() -> &'static str { "s/rad" }
11861
11862 pub fn from_s_per_rad(s_per_rad: T) -> Self { InverseAngularVelocity{s_per_rad: s_per_rad} }
11867
11868 pub fn to_s_per_rad(&self) -> T { self.s_per_rad.clone() }
11870
11871 pub fn from_seconds_per_radian(seconds_per_radian: T) -> Self { InverseAngularVelocity{s_per_rad: seconds_per_radian} }
11876
11877 pub fn to_seconds_per_radian(&self) -> T { self.s_per_rad.clone() }
11879
11880}
11881
11882impl<T> fmt::Display for InverseAngularVelocity<T> where T: NumLike {
11883 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
11884 write!(f, "{} {}", &self.s_per_rad, Self::unit_symbol())
11885 }
11886}
11887
11888impl<T> InverseAngularVelocity<T> where T: NumLike+From<f64> {
11889
11890 pub fn to_seconds_per_degree(&self) -> T {
11894 return self.s_per_rad.clone() * T::from(0.0174532925199433_f64);
11895 }
11896
11897 pub fn from_seconds_per_degree(seconds_per_degree: T) -> Self {
11904 InverseAngularVelocity{s_per_rad: seconds_per_degree * T::from(57.2957795130823_f64)}
11905 }
11906
11907 pub fn to_s_per_deg(&self) -> T {
11911 return self.s_per_rad.clone() * T::from(0.0174532925199433_f64);
11912 }
11913
11914 pub fn from_s_per_deg(s_per_deg: T) -> Self {
11921 InverseAngularVelocity{s_per_rad: s_per_deg * T::from(57.2957795130823_f64)}
11922 }
11923
11924 pub fn to_spr(&self) -> T {
11928 return self.s_per_rad.clone() * T::from(6.28318530717959_f64);
11929 }
11930
11931 pub fn from_spr(spr: T) -> Self {
11938 InverseAngularVelocity{s_per_rad: spr * T::from(0.159154943091895_f64)}
11939 }
11940
11941 pub fn to_mpr(&self) -> T {
11945 return self.s_per_rad.clone() * T::from(0.10471975511966_f64);
11946 }
11947
11948 pub fn from_mpr(mpr: T) -> Self {
11955 InverseAngularVelocity{s_per_rad: mpr * T::from(9.54929658551372_f64)}
11956 }
11957
11958 pub fn to_hpr(&self) -> T {
11962 return self.s_per_rad.clone() * T::from(0.0017453292519943_f64);
11963 }
11964
11965 pub fn from_hpr(hpr: T) -> Self {
11972 InverseAngularVelocity{s_per_rad: hpr * T::from(572.957795130823_f64)}
11973 }
11974
11975}
11976
11977
11978#[cfg(feature="num-bigfloat")]
11980impl core::ops::Mul<InverseAngularVelocity<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
11981 type Output = InverseAngularVelocity<num_bigfloat::BigFloat>;
11982 fn mul(self, rhs: InverseAngularVelocity<num_bigfloat::BigFloat>) -> Self::Output {
11983 InverseAngularVelocity{s_per_rad: self * rhs.s_per_rad}
11984 }
11985}
11986#[cfg(feature="num-bigfloat")]
11988impl core::ops::Mul<InverseAngularVelocity<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
11989 type Output = InverseAngularVelocity<num_bigfloat::BigFloat>;
11990 fn mul(self, rhs: InverseAngularVelocity<num_bigfloat::BigFloat>) -> Self::Output {
11991 InverseAngularVelocity{s_per_rad: self.clone() * rhs.s_per_rad}
11992 }
11993}
11994#[cfg(feature="num-bigfloat")]
11996impl core::ops::Mul<&InverseAngularVelocity<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
11997 type Output = InverseAngularVelocity<num_bigfloat::BigFloat>;
11998 fn mul(self, rhs: &InverseAngularVelocity<num_bigfloat::BigFloat>) -> Self::Output {
11999 InverseAngularVelocity{s_per_rad: self * rhs.s_per_rad.clone()}
12000 }
12001}
12002#[cfg(feature="num-bigfloat")]
12004impl core::ops::Mul<&InverseAngularVelocity<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
12005 type Output = InverseAngularVelocity<num_bigfloat::BigFloat>;
12006 fn mul(self, rhs: &InverseAngularVelocity<num_bigfloat::BigFloat>) -> Self::Output {
12007 InverseAngularVelocity{s_per_rad: self.clone() * rhs.s_per_rad.clone()}
12008 }
12009}
12010
12011#[cfg(feature="num-complex")]
12013impl core::ops::Mul<InverseAngularVelocity<num_complex::Complex32>> for num_complex::Complex32 {
12014 type Output = InverseAngularVelocity<num_complex::Complex32>;
12015 fn mul(self, rhs: InverseAngularVelocity<num_complex::Complex32>) -> Self::Output {
12016 InverseAngularVelocity{s_per_rad: self * rhs.s_per_rad}
12017 }
12018}
12019#[cfg(feature="num-complex")]
12021impl core::ops::Mul<InverseAngularVelocity<num_complex::Complex32>> for &num_complex::Complex32 {
12022 type Output = InverseAngularVelocity<num_complex::Complex32>;
12023 fn mul(self, rhs: InverseAngularVelocity<num_complex::Complex32>) -> Self::Output {
12024 InverseAngularVelocity{s_per_rad: self.clone() * rhs.s_per_rad}
12025 }
12026}
12027#[cfg(feature="num-complex")]
12029impl core::ops::Mul<&InverseAngularVelocity<num_complex::Complex32>> for num_complex::Complex32 {
12030 type Output = InverseAngularVelocity<num_complex::Complex32>;
12031 fn mul(self, rhs: &InverseAngularVelocity<num_complex::Complex32>) -> Self::Output {
12032 InverseAngularVelocity{s_per_rad: self * rhs.s_per_rad.clone()}
12033 }
12034}
12035#[cfg(feature="num-complex")]
12037impl core::ops::Mul<&InverseAngularVelocity<num_complex::Complex32>> for &num_complex::Complex32 {
12038 type Output = InverseAngularVelocity<num_complex::Complex32>;
12039 fn mul(self, rhs: &InverseAngularVelocity<num_complex::Complex32>) -> Self::Output {
12040 InverseAngularVelocity{s_per_rad: self.clone() * rhs.s_per_rad.clone()}
12041 }
12042}
12043
12044#[cfg(feature="num-complex")]
12046impl core::ops::Mul<InverseAngularVelocity<num_complex::Complex64>> for num_complex::Complex64 {
12047 type Output = InverseAngularVelocity<num_complex::Complex64>;
12048 fn mul(self, rhs: InverseAngularVelocity<num_complex::Complex64>) -> Self::Output {
12049 InverseAngularVelocity{s_per_rad: self * rhs.s_per_rad}
12050 }
12051}
12052#[cfg(feature="num-complex")]
12054impl core::ops::Mul<InverseAngularVelocity<num_complex::Complex64>> for &num_complex::Complex64 {
12055 type Output = InverseAngularVelocity<num_complex::Complex64>;
12056 fn mul(self, rhs: InverseAngularVelocity<num_complex::Complex64>) -> Self::Output {
12057 InverseAngularVelocity{s_per_rad: self.clone() * rhs.s_per_rad}
12058 }
12059}
12060#[cfg(feature="num-complex")]
12062impl core::ops::Mul<&InverseAngularVelocity<num_complex::Complex64>> for num_complex::Complex64 {
12063 type Output = InverseAngularVelocity<num_complex::Complex64>;
12064 fn mul(self, rhs: &InverseAngularVelocity<num_complex::Complex64>) -> Self::Output {
12065 InverseAngularVelocity{s_per_rad: self * rhs.s_per_rad.clone()}
12066 }
12067}
12068#[cfg(feature="num-complex")]
12070impl core::ops::Mul<&InverseAngularVelocity<num_complex::Complex64>> for &num_complex::Complex64 {
12071 type Output = InverseAngularVelocity<num_complex::Complex64>;
12072 fn mul(self, rhs: &InverseAngularVelocity<num_complex::Complex64>) -> Self::Output {
12073 InverseAngularVelocity{s_per_rad: self.clone() * rhs.s_per_rad.clone()}
12074 }
12075}
12076
12077
12078
12079
12080impl<T> core::ops::Mul<Time<T>> for InverseAngularVelocity<T> where T: NumLike {
12083 type Output = InverseAngularAcceleration<T>;
12084 fn mul(self, rhs: Time<T>) -> Self::Output {
12085 InverseAngularAcceleration{s2prad: self.s_per_rad * rhs.s}
12086 }
12087}
12088impl<T> core::ops::Mul<Time<T>> for &InverseAngularVelocity<T> where T: NumLike {
12090 type Output = InverseAngularAcceleration<T>;
12091 fn mul(self, rhs: Time<T>) -> Self::Output {
12092 InverseAngularAcceleration{s2prad: self.s_per_rad.clone() * rhs.s}
12093 }
12094}
12095impl<T> core::ops::Mul<&Time<T>> for InverseAngularVelocity<T> where T: NumLike {
12097 type Output = InverseAngularAcceleration<T>;
12098 fn mul(self, rhs: &Time<T>) -> Self::Output {
12099 InverseAngularAcceleration{s2prad: self.s_per_rad * rhs.s.clone()}
12100 }
12101}
12102impl<T> core::ops::Mul<&Time<T>> for &InverseAngularVelocity<T> where T: NumLike {
12104 type Output = InverseAngularAcceleration<T>;
12105 fn mul(self, rhs: &Time<T>) -> Self::Output {
12106 InverseAngularAcceleration{s2prad: self.s_per_rad.clone() * rhs.s.clone()}
12107 }
12108}
12109
12110impl<T> core::ops::Div<Time<T>> for InverseAngularVelocity<T> where T: NumLike {
12113 type Output = InverseAngle<T>;
12114 fn div(self, rhs: Time<T>) -> Self::Output {
12115 InverseAngle{per_rad: self.s_per_rad / rhs.s}
12116 }
12117}
12118impl<T> core::ops::Div<Time<T>> for &InverseAngularVelocity<T> where T: NumLike {
12120 type Output = InverseAngle<T>;
12121 fn div(self, rhs: Time<T>) -> Self::Output {
12122 InverseAngle{per_rad: self.s_per_rad.clone() / rhs.s}
12123 }
12124}
12125impl<T> core::ops::Div<&Time<T>> for InverseAngularVelocity<T> where T: NumLike {
12127 type Output = InverseAngle<T>;
12128 fn div(self, rhs: &Time<T>) -> Self::Output {
12129 InverseAngle{per_rad: self.s_per_rad / rhs.s.clone()}
12130 }
12131}
12132impl<T> core::ops::Div<&Time<T>> for &InverseAngularVelocity<T> where T: NumLike {
12134 type Output = InverseAngle<T>;
12135 fn div(self, rhs: &Time<T>) -> Self::Output {
12136 InverseAngle{per_rad: self.s_per_rad.clone() / rhs.s.clone()}
12137 }
12138}
12139
12140impl<T> core::ops::Mul<Angle<T>> for InverseAngularVelocity<T> where T: NumLike {
12143 type Output = Time<T>;
12144 fn mul(self, rhs: Angle<T>) -> Self::Output {
12145 Time{s: self.s_per_rad * rhs.rad}
12146 }
12147}
12148impl<T> core::ops::Mul<Angle<T>> for &InverseAngularVelocity<T> where T: NumLike {
12150 type Output = Time<T>;
12151 fn mul(self, rhs: Angle<T>) -> Self::Output {
12152 Time{s: self.s_per_rad.clone() * rhs.rad}
12153 }
12154}
12155impl<T> core::ops::Mul<&Angle<T>> for InverseAngularVelocity<T> where T: NumLike {
12157 type Output = Time<T>;
12158 fn mul(self, rhs: &Angle<T>) -> Self::Output {
12159 Time{s: self.s_per_rad * rhs.rad.clone()}
12160 }
12161}
12162impl<T> core::ops::Mul<&Angle<T>> for &InverseAngularVelocity<T> where T: NumLike {
12164 type Output = Time<T>;
12165 fn mul(self, rhs: &Angle<T>) -> Self::Output {
12166 Time{s: self.s_per_rad.clone() * rhs.rad.clone()}
12167 }
12168}
12169
12170impl<T> core::ops::Div<InverseAngle<T>> for InverseAngularVelocity<T> where T: NumLike {
12173 type Output = Time<T>;
12174 fn div(self, rhs: InverseAngle<T>) -> Self::Output {
12175 Time{s: self.s_per_rad / rhs.per_rad}
12176 }
12177}
12178impl<T> core::ops::Div<InverseAngle<T>> for &InverseAngularVelocity<T> where T: NumLike {
12180 type Output = Time<T>;
12181 fn div(self, rhs: InverseAngle<T>) -> Self::Output {
12182 Time{s: self.s_per_rad.clone() / rhs.per_rad}
12183 }
12184}
12185impl<T> core::ops::Div<&InverseAngle<T>> for InverseAngularVelocity<T> where T: NumLike {
12187 type Output = Time<T>;
12188 fn div(self, rhs: &InverseAngle<T>) -> Self::Output {
12189 Time{s: self.s_per_rad / rhs.per_rad.clone()}
12190 }
12191}
12192impl<T> core::ops::Div<&InverseAngle<T>> for &InverseAngularVelocity<T> where T: NumLike {
12194 type Output = Time<T>;
12195 fn div(self, rhs: &InverseAngle<T>) -> Self::Output {
12196 Time{s: self.s_per_rad.clone() / rhs.per_rad.clone()}
12197 }
12198}
12199
12200impl<T> core::ops::Mul<AngularAcceleration<T>> for InverseAngularVelocity<T> where T: NumLike {
12203 type Output = Frequency<T>;
12204 fn mul(self, rhs: AngularAcceleration<T>) -> Self::Output {
12205 Frequency{Hz: self.s_per_rad * rhs.radps2}
12206 }
12207}
12208impl<T> core::ops::Mul<AngularAcceleration<T>> for &InverseAngularVelocity<T> where T: NumLike {
12210 type Output = Frequency<T>;
12211 fn mul(self, rhs: AngularAcceleration<T>) -> Self::Output {
12212 Frequency{Hz: self.s_per_rad.clone() * rhs.radps2}
12213 }
12214}
12215impl<T> core::ops::Mul<&AngularAcceleration<T>> for InverseAngularVelocity<T> where T: NumLike {
12217 type Output = Frequency<T>;
12218 fn mul(self, rhs: &AngularAcceleration<T>) -> Self::Output {
12219 Frequency{Hz: self.s_per_rad * rhs.radps2.clone()}
12220 }
12221}
12222impl<T> core::ops::Mul<&AngularAcceleration<T>> for &InverseAngularVelocity<T> where T: NumLike {
12224 type Output = Frequency<T>;
12225 fn mul(self, rhs: &AngularAcceleration<T>) -> Self::Output {
12226 Frequency{Hz: self.s_per_rad.clone() * rhs.radps2.clone()}
12227 }
12228}
12229
12230impl<T> core::ops::Mul<Frequency<T>> for InverseAngularVelocity<T> where T: NumLike {
12233 type Output = InverseAngle<T>;
12234 fn mul(self, rhs: Frequency<T>) -> Self::Output {
12235 InverseAngle{per_rad: self.s_per_rad * rhs.Hz}
12236 }
12237}
12238impl<T> core::ops::Mul<Frequency<T>> for &InverseAngularVelocity<T> where T: NumLike {
12240 type Output = InverseAngle<T>;
12241 fn mul(self, rhs: Frequency<T>) -> Self::Output {
12242 InverseAngle{per_rad: self.s_per_rad.clone() * rhs.Hz}
12243 }
12244}
12245impl<T> core::ops::Mul<&Frequency<T>> for InverseAngularVelocity<T> where T: NumLike {
12247 type Output = InverseAngle<T>;
12248 fn mul(self, rhs: &Frequency<T>) -> Self::Output {
12249 InverseAngle{per_rad: self.s_per_rad * rhs.Hz.clone()}
12250 }
12251}
12252impl<T> core::ops::Mul<&Frequency<T>> for &InverseAngularVelocity<T> where T: NumLike {
12254 type Output = InverseAngle<T>;
12255 fn mul(self, rhs: &Frequency<T>) -> Self::Output {
12256 InverseAngle{per_rad: self.s_per_rad.clone() * rhs.Hz.clone()}
12257 }
12258}
12259
12260impl<T> core::ops::Div<Frequency<T>> for InverseAngularVelocity<T> where T: NumLike {
12263 type Output = InverseAngularAcceleration<T>;
12264 fn div(self, rhs: Frequency<T>) -> Self::Output {
12265 InverseAngularAcceleration{s2prad: self.s_per_rad / rhs.Hz}
12266 }
12267}
12268impl<T> core::ops::Div<Frequency<T>> for &InverseAngularVelocity<T> where T: NumLike {
12270 type Output = InverseAngularAcceleration<T>;
12271 fn div(self, rhs: Frequency<T>) -> Self::Output {
12272 InverseAngularAcceleration{s2prad: self.s_per_rad.clone() / rhs.Hz}
12273 }
12274}
12275impl<T> core::ops::Div<&Frequency<T>> for InverseAngularVelocity<T> where T: NumLike {
12277 type Output = InverseAngularAcceleration<T>;
12278 fn div(self, rhs: &Frequency<T>) -> Self::Output {
12279 InverseAngularAcceleration{s2prad: self.s_per_rad / rhs.Hz.clone()}
12280 }
12281}
12282impl<T> core::ops::Div<&Frequency<T>> for &InverseAngularVelocity<T> where T: NumLike {
12284 type Output = InverseAngularAcceleration<T>;
12285 fn div(self, rhs: &Frequency<T>) -> Self::Output {
12286 InverseAngularAcceleration{s2prad: self.s_per_rad.clone() / rhs.Hz.clone()}
12287 }
12288}
12289
12290impl<T> core::ops::Div<InverseAngularAcceleration<T>> for InverseAngularVelocity<T> where T: NumLike {
12293 type Output = Frequency<T>;
12294 fn div(self, rhs: InverseAngularAcceleration<T>) -> Self::Output {
12295 Frequency{Hz: self.s_per_rad / rhs.s2prad}
12296 }
12297}
12298impl<T> core::ops::Div<InverseAngularAcceleration<T>> for &InverseAngularVelocity<T> where T: NumLike {
12300 type Output = Frequency<T>;
12301 fn div(self, rhs: InverseAngularAcceleration<T>) -> Self::Output {
12302 Frequency{Hz: self.s_per_rad.clone() / rhs.s2prad}
12303 }
12304}
12305impl<T> core::ops::Div<&InverseAngularAcceleration<T>> for InverseAngularVelocity<T> where T: NumLike {
12307 type Output = Frequency<T>;
12308 fn div(self, rhs: &InverseAngularAcceleration<T>) -> Self::Output {
12309 Frequency{Hz: self.s_per_rad / rhs.s2prad.clone()}
12310 }
12311}
12312impl<T> core::ops::Div<&InverseAngularAcceleration<T>> for &InverseAngularVelocity<T> where T: NumLike {
12314 type Output = Frequency<T>;
12315 fn div(self, rhs: &InverseAngularAcceleration<T>) -> Self::Output {
12316 Frequency{Hz: self.s_per_rad.clone() / rhs.s2prad.clone()}
12317 }
12318}
12319
12320impl<T> core::ops::Mul<InverseMomentOfInertia<T>> for InverseAngularVelocity<T> where T: NumLike {
12323 type Output = InverseAngularMomentum<T>;
12324 fn mul(self, rhs: InverseMomentOfInertia<T>) -> Self::Output {
12325 InverseAngularMomentum{s_per_kgm2rad: self.s_per_rad * rhs.per_kgm2}
12326 }
12327}
12328impl<T> core::ops::Mul<InverseMomentOfInertia<T>> for &InverseAngularVelocity<T> where T: NumLike {
12330 type Output = InverseAngularMomentum<T>;
12331 fn mul(self, rhs: InverseMomentOfInertia<T>) -> Self::Output {
12332 InverseAngularMomentum{s_per_kgm2rad: self.s_per_rad.clone() * rhs.per_kgm2}
12333 }
12334}
12335impl<T> core::ops::Mul<&InverseMomentOfInertia<T>> for InverseAngularVelocity<T> where T: NumLike {
12337 type Output = InverseAngularMomentum<T>;
12338 fn mul(self, rhs: &InverseMomentOfInertia<T>) -> Self::Output {
12339 InverseAngularMomentum{s_per_kgm2rad: self.s_per_rad * rhs.per_kgm2.clone()}
12340 }
12341}
12342impl<T> core::ops::Mul<&InverseMomentOfInertia<T>> for &InverseAngularVelocity<T> where T: NumLike {
12344 type Output = InverseAngularMomentum<T>;
12345 fn mul(self, rhs: &InverseMomentOfInertia<T>) -> Self::Output {
12346 InverseAngularMomentum{s_per_kgm2rad: self.s_per_rad.clone() * rhs.per_kgm2.clone()}
12347 }
12348}
12349
12350impl<T> core::ops::Div<MomentOfInertia<T>> for InverseAngularVelocity<T> where T: NumLike {
12353 type Output = InverseAngularMomentum<T>;
12354 fn div(self, rhs: MomentOfInertia<T>) -> Self::Output {
12355 InverseAngularMomentum{s_per_kgm2rad: self.s_per_rad / rhs.kgm2}
12356 }
12357}
12358impl<T> core::ops::Div<MomentOfInertia<T>> for &InverseAngularVelocity<T> where T: NumLike {
12360 type Output = InverseAngularMomentum<T>;
12361 fn div(self, rhs: MomentOfInertia<T>) -> Self::Output {
12362 InverseAngularMomentum{s_per_kgm2rad: self.s_per_rad.clone() / rhs.kgm2}
12363 }
12364}
12365impl<T> core::ops::Div<&MomentOfInertia<T>> for InverseAngularVelocity<T> where T: NumLike {
12367 type Output = InverseAngularMomentum<T>;
12368 fn div(self, rhs: &MomentOfInertia<T>) -> Self::Output {
12369 InverseAngularMomentum{s_per_kgm2rad: self.s_per_rad / rhs.kgm2.clone()}
12370 }
12371}
12372impl<T> core::ops::Div<&MomentOfInertia<T>> for &InverseAngularVelocity<T> where T: NumLike {
12374 type Output = InverseAngularMomentum<T>;
12375 fn div(self, rhs: &MomentOfInertia<T>) -> Self::Output {
12376 InverseAngularMomentum{s_per_kgm2rad: self.s_per_rad.clone() / rhs.kgm2.clone()}
12377 }
12378}
12379
12380impl<T> core::ops::Div<InverseAngularVelocity<T>> for f64 where T: NumLike+From<f64> {
12383 type Output = AngularVelocity<T>;
12384 fn div(self, rhs: InverseAngularVelocity<T>) -> Self::Output {
12385 AngularVelocity{radps: T::from(self) / rhs.s_per_rad}
12386 }
12387}
12388impl<T> core::ops::Div<InverseAngularVelocity<T>> for &f64 where T: NumLike+From<f64> {
12390 type Output = AngularVelocity<T>;
12391 fn div(self, rhs: InverseAngularVelocity<T>) -> Self::Output {
12392 AngularVelocity{radps: T::from(self.clone()) / rhs.s_per_rad}
12393 }
12394}
12395impl<T> core::ops::Div<&InverseAngularVelocity<T>> for f64 where T: NumLike+From<f64> {
12397 type Output = AngularVelocity<T>;
12398 fn div(self, rhs: &InverseAngularVelocity<T>) -> Self::Output {
12399 AngularVelocity{radps: T::from(self) / rhs.s_per_rad.clone()}
12400 }
12401}
12402impl<T> core::ops::Div<&InverseAngularVelocity<T>> for &f64 where T: NumLike+From<f64> {
12404 type Output = AngularVelocity<T>;
12405 fn div(self, rhs: &InverseAngularVelocity<T>) -> Self::Output {
12406 AngularVelocity{radps: T::from(self.clone()) / rhs.s_per_rad.clone()}
12407 }
12408}
12409
12410impl<T> core::ops::Div<InverseAngularVelocity<T>> for f32 where T: NumLike+From<f32> {
12413 type Output = AngularVelocity<T>;
12414 fn div(self, rhs: InverseAngularVelocity<T>) -> Self::Output {
12415 AngularVelocity{radps: T::from(self) / rhs.s_per_rad}
12416 }
12417}
12418impl<T> core::ops::Div<InverseAngularVelocity<T>> for &f32 where T: NumLike+From<f32> {
12420 type Output = AngularVelocity<T>;
12421 fn div(self, rhs: InverseAngularVelocity<T>) -> Self::Output {
12422 AngularVelocity{radps: T::from(self.clone()) / rhs.s_per_rad}
12423 }
12424}
12425impl<T> core::ops::Div<&InverseAngularVelocity<T>> for f32 where T: NumLike+From<f32> {
12427 type Output = AngularVelocity<T>;
12428 fn div(self, rhs: &InverseAngularVelocity<T>) -> Self::Output {
12429 AngularVelocity{radps: T::from(self) / rhs.s_per_rad.clone()}
12430 }
12431}
12432impl<T> core::ops::Div<&InverseAngularVelocity<T>> for &f32 where T: NumLike+From<f32> {
12434 type Output = AngularVelocity<T>;
12435 fn div(self, rhs: &InverseAngularVelocity<T>) -> Self::Output {
12436 AngularVelocity{radps: T::from(self.clone()) / rhs.s_per_rad.clone()}
12437 }
12438}
12439
12440impl<T> core::ops::Div<InverseAngularVelocity<T>> for i64 where T: NumLike+From<i64> {
12443 type Output = AngularVelocity<T>;
12444 fn div(self, rhs: InverseAngularVelocity<T>) -> Self::Output {
12445 AngularVelocity{radps: T::from(self) / rhs.s_per_rad}
12446 }
12447}
12448impl<T> core::ops::Div<InverseAngularVelocity<T>> for &i64 where T: NumLike+From<i64> {
12450 type Output = AngularVelocity<T>;
12451 fn div(self, rhs: InverseAngularVelocity<T>) -> Self::Output {
12452 AngularVelocity{radps: T::from(self.clone()) / rhs.s_per_rad}
12453 }
12454}
12455impl<T> core::ops::Div<&InverseAngularVelocity<T>> for i64 where T: NumLike+From<i64> {
12457 type Output = AngularVelocity<T>;
12458 fn div(self, rhs: &InverseAngularVelocity<T>) -> Self::Output {
12459 AngularVelocity{radps: T::from(self) / rhs.s_per_rad.clone()}
12460 }
12461}
12462impl<T> core::ops::Div<&InverseAngularVelocity<T>> for &i64 where T: NumLike+From<i64> {
12464 type Output = AngularVelocity<T>;
12465 fn div(self, rhs: &InverseAngularVelocity<T>) -> Self::Output {
12466 AngularVelocity{radps: T::from(self.clone()) / rhs.s_per_rad.clone()}
12467 }
12468}
12469
12470impl<T> core::ops::Div<InverseAngularVelocity<T>> for i32 where T: NumLike+From<i32> {
12473 type Output = AngularVelocity<T>;
12474 fn div(self, rhs: InverseAngularVelocity<T>) -> Self::Output {
12475 AngularVelocity{radps: T::from(self) / rhs.s_per_rad}
12476 }
12477}
12478impl<T> core::ops::Div<InverseAngularVelocity<T>> for &i32 where T: NumLike+From<i32> {
12480 type Output = AngularVelocity<T>;
12481 fn div(self, rhs: InverseAngularVelocity<T>) -> Self::Output {
12482 AngularVelocity{radps: T::from(self.clone()) / rhs.s_per_rad}
12483 }
12484}
12485impl<T> core::ops::Div<&InverseAngularVelocity<T>> for i32 where T: NumLike+From<i32> {
12487 type Output = AngularVelocity<T>;
12488 fn div(self, rhs: &InverseAngularVelocity<T>) -> Self::Output {
12489 AngularVelocity{radps: T::from(self) / rhs.s_per_rad.clone()}
12490 }
12491}
12492impl<T> core::ops::Div<&InverseAngularVelocity<T>> for &i32 where T: NumLike+From<i32> {
12494 type Output = AngularVelocity<T>;
12495 fn div(self, rhs: &InverseAngularVelocity<T>) -> Self::Output {
12496 AngularVelocity{radps: T::from(self.clone()) / rhs.s_per_rad.clone()}
12497 }
12498}
12499
12500#[cfg(feature="num-bigfloat")]
12503impl<T> core::ops::Div<InverseAngularVelocity<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
12504 type Output = AngularVelocity<T>;
12505 fn div(self, rhs: InverseAngularVelocity<T>) -> Self::Output {
12506 AngularVelocity{radps: T::from(self) / rhs.s_per_rad}
12507 }
12508}
12509#[cfg(feature="num-bigfloat")]
12511impl<T> core::ops::Div<InverseAngularVelocity<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
12512 type Output = AngularVelocity<T>;
12513 fn div(self, rhs: InverseAngularVelocity<T>) -> Self::Output {
12514 AngularVelocity{radps: T::from(self.clone()) / rhs.s_per_rad}
12515 }
12516}
12517#[cfg(feature="num-bigfloat")]
12519impl<T> core::ops::Div<&InverseAngularVelocity<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
12520 type Output = AngularVelocity<T>;
12521 fn div(self, rhs: &InverseAngularVelocity<T>) -> Self::Output {
12522 AngularVelocity{radps: T::from(self) / rhs.s_per_rad.clone()}
12523 }
12524}
12525#[cfg(feature="num-bigfloat")]
12527impl<T> core::ops::Div<&InverseAngularVelocity<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
12528 type Output = AngularVelocity<T>;
12529 fn div(self, rhs: &InverseAngularVelocity<T>) -> Self::Output {
12530 AngularVelocity{radps: T::from(self.clone()) / rhs.s_per_rad.clone()}
12531 }
12532}
12533
12534#[cfg(feature="num-complex")]
12537impl<T> core::ops::Div<InverseAngularVelocity<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
12538 type Output = AngularVelocity<T>;
12539 fn div(self, rhs: InverseAngularVelocity<T>) -> Self::Output {
12540 AngularVelocity{radps: T::from(self) / rhs.s_per_rad}
12541 }
12542}
12543#[cfg(feature="num-complex")]
12545impl<T> core::ops::Div<InverseAngularVelocity<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
12546 type Output = AngularVelocity<T>;
12547 fn div(self, rhs: InverseAngularVelocity<T>) -> Self::Output {
12548 AngularVelocity{radps: T::from(self.clone()) / rhs.s_per_rad}
12549 }
12550}
12551#[cfg(feature="num-complex")]
12553impl<T> core::ops::Div<&InverseAngularVelocity<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
12554 type Output = AngularVelocity<T>;
12555 fn div(self, rhs: &InverseAngularVelocity<T>) -> Self::Output {
12556 AngularVelocity{radps: T::from(self) / rhs.s_per_rad.clone()}
12557 }
12558}
12559#[cfg(feature="num-complex")]
12561impl<T> core::ops::Div<&InverseAngularVelocity<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
12562 type Output = AngularVelocity<T>;
12563 fn div(self, rhs: &InverseAngularVelocity<T>) -> Self::Output {
12564 AngularVelocity{radps: T::from(self.clone()) / rhs.s_per_rad.clone()}
12565 }
12566}
12567
12568#[cfg(feature="num-complex")]
12571impl<T> core::ops::Div<InverseAngularVelocity<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
12572 type Output = AngularVelocity<T>;
12573 fn div(self, rhs: InverseAngularVelocity<T>) -> Self::Output {
12574 AngularVelocity{radps: T::from(self) / rhs.s_per_rad}
12575 }
12576}
12577#[cfg(feature="num-complex")]
12579impl<T> core::ops::Div<InverseAngularVelocity<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
12580 type Output = AngularVelocity<T>;
12581 fn div(self, rhs: InverseAngularVelocity<T>) -> Self::Output {
12582 AngularVelocity{radps: T::from(self.clone()) / rhs.s_per_rad}
12583 }
12584}
12585#[cfg(feature="num-complex")]
12587impl<T> core::ops::Div<&InverseAngularVelocity<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
12588 type Output = AngularVelocity<T>;
12589 fn div(self, rhs: &InverseAngularVelocity<T>) -> Self::Output {
12590 AngularVelocity{radps: T::from(self) / rhs.s_per_rad.clone()}
12591 }
12592}
12593#[cfg(feature="num-complex")]
12595impl<T> core::ops::Div<&InverseAngularVelocity<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
12596 type Output = AngularVelocity<T>;
12597 fn div(self, rhs: &InverseAngularVelocity<T>) -> Self::Output {
12598 AngularVelocity{radps: T::from(self.clone()) / rhs.s_per_rad.clone()}
12599 }
12600}
12601
12602#[derive(UnitStruct, Debug, Clone)]
12604#[cfg_attr(feature="serde", derive(Serialize, Deserialize))]
12605pub struct InverseEnergy<T: NumLike>{
12606 pub per_J: T
12608}
12609
12610impl<T> InverseEnergy<T> where T: NumLike {
12611
12612 pub fn unit_name() -> &'static str { "inverse joules" }
12614
12615 pub fn unit_symbol() -> &'static str { "1/J" }
12617
12618 pub fn from_per_J(per_J: T) -> Self { InverseEnergy{per_J: per_J} }
12623
12624 pub fn to_per_J(&self) -> T { self.per_J.clone() }
12626
12627 pub fn from_per_joule(per_joule: T) -> Self { InverseEnergy{per_J: per_joule} }
12632
12633 pub fn to_per_joule(&self) -> T { self.per_J.clone() }
12635
12636}
12637
12638impl<T> fmt::Display for InverseEnergy<T> where T: NumLike {
12639 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
12640 write!(f, "{} {}", &self.per_J, Self::unit_symbol())
12641 }
12642}
12643
12644impl<T> InverseEnergy<T> where T: NumLike+From<f64> {
12645
12646 pub fn to_per_mJ(&self) -> T {
12650 return self.per_J.clone() * T::from(0.001_f64);
12651 }
12652
12653 pub fn from_per_mJ(per_mJ: T) -> Self {
12660 InverseEnergy{per_J: per_mJ * T::from(1000.0_f64)}
12661 }
12662
12663 pub fn to_per_uJ(&self) -> T {
12667 return self.per_J.clone() * T::from(1e-06_f64);
12668 }
12669
12670 pub fn from_per_uJ(per_uJ: T) -> Self {
12677 InverseEnergy{per_J: per_uJ * T::from(1000000.0_f64)}
12678 }
12679
12680 pub fn to_per_nJ(&self) -> T {
12684 return self.per_J.clone() * T::from(1e-09_f64);
12685 }
12686
12687 pub fn from_per_nJ(per_nJ: T) -> Self {
12694 InverseEnergy{per_J: per_nJ * T::from(1000000000.0_f64)}
12695 }
12696
12697 pub fn to_per_kJ(&self) -> T {
12701 return self.per_J.clone() * T::from(1000.0_f64);
12702 }
12703
12704 pub fn from_per_kJ(per_kJ: T) -> Self {
12711 InverseEnergy{per_J: per_kJ * T::from(0.001_f64)}
12712 }
12713
12714 pub fn to_per_MJ(&self) -> T {
12718 return self.per_J.clone() * T::from(1000000.0_f64);
12719 }
12720
12721 pub fn from_per_MJ(per_MJ: T) -> Self {
12728 InverseEnergy{per_J: per_MJ * T::from(1e-06_f64)}
12729 }
12730
12731 pub fn to_per_GJ(&self) -> T {
12735 return self.per_J.clone() * T::from(1000000000.0_f64);
12736 }
12737
12738 pub fn from_per_GJ(per_GJ: T) -> Self {
12745 InverseEnergy{per_J: per_GJ * T::from(1e-09_f64)}
12746 }
12747
12748 pub fn to_per_cal(&self) -> T {
12752 return self.per_J.clone() * T::from(4.184_f64);
12753 }
12754
12755 pub fn from_per_cal(per_cal: T) -> Self {
12762 InverseEnergy{per_J: per_cal * T::from(0.239005736137667_f64)}
12763 }
12764
12765 pub fn to_per_kcal(&self) -> T {
12769 return self.per_J.clone() * T::from(4184.0_f64);
12770 }
12771
12772 pub fn from_per_kcal(per_kcal: T) -> Self {
12779 InverseEnergy{per_J: per_kcal * T::from(0.0002390057361376_f64)}
12780 }
12781
12782 pub fn to_per_Whr(&self) -> T {
12786 return self.per_J.clone() * T::from(3600.0_f64);
12787 }
12788
12789 pub fn from_per_Whr(per_Whr: T) -> Self {
12796 InverseEnergy{per_J: per_Whr * T::from(0.0002777777777777_f64)}
12797 }
12798
12799 pub fn to_per_kWhr(&self) -> T {
12803 return self.per_J.clone() * T::from(3600000.0_f64);
12804 }
12805
12806 pub fn from_per_kWhr(per_kWhr: T) -> Self {
12813 InverseEnergy{per_J: per_kWhr * T::from(2.78e-07_f64)}
12814 }
12815
12816 pub fn to_per_eV(&self) -> T {
12820 return self.per_J.clone() * T::from(1.6e-19_f64);
12821 }
12822
12823 pub fn from_per_eV(per_eV: T) -> Self {
12830 InverseEnergy{per_J: per_eV * T::from(6.24e+18_f64)}
12831 }
12832
12833 pub fn to_per_BTU(&self) -> T {
12837 return self.per_J.clone() * T::from(1055.0_f64);
12838 }
12839
12840 pub fn from_per_BTU(per_BTU: T) -> Self {
12847 InverseEnergy{per_J: per_BTU * T::from(0.0009478672985781_f64)}
12848 }
12849
12850}
12851
12852
12853#[cfg(feature="num-bigfloat")]
12855impl core::ops::Mul<InverseEnergy<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
12856 type Output = InverseEnergy<num_bigfloat::BigFloat>;
12857 fn mul(self, rhs: InverseEnergy<num_bigfloat::BigFloat>) -> Self::Output {
12858 InverseEnergy{per_J: self * rhs.per_J}
12859 }
12860}
12861#[cfg(feature="num-bigfloat")]
12863impl core::ops::Mul<InverseEnergy<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
12864 type Output = InverseEnergy<num_bigfloat::BigFloat>;
12865 fn mul(self, rhs: InverseEnergy<num_bigfloat::BigFloat>) -> Self::Output {
12866 InverseEnergy{per_J: self.clone() * rhs.per_J}
12867 }
12868}
12869#[cfg(feature="num-bigfloat")]
12871impl core::ops::Mul<&InverseEnergy<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
12872 type Output = InverseEnergy<num_bigfloat::BigFloat>;
12873 fn mul(self, rhs: &InverseEnergy<num_bigfloat::BigFloat>) -> Self::Output {
12874 InverseEnergy{per_J: self * rhs.per_J.clone()}
12875 }
12876}
12877#[cfg(feature="num-bigfloat")]
12879impl core::ops::Mul<&InverseEnergy<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
12880 type Output = InverseEnergy<num_bigfloat::BigFloat>;
12881 fn mul(self, rhs: &InverseEnergy<num_bigfloat::BigFloat>) -> Self::Output {
12882 InverseEnergy{per_J: self.clone() * rhs.per_J.clone()}
12883 }
12884}
12885
12886#[cfg(feature="num-complex")]
12888impl core::ops::Mul<InverseEnergy<num_complex::Complex32>> for num_complex::Complex32 {
12889 type Output = InverseEnergy<num_complex::Complex32>;
12890 fn mul(self, rhs: InverseEnergy<num_complex::Complex32>) -> Self::Output {
12891 InverseEnergy{per_J: self * rhs.per_J}
12892 }
12893}
12894#[cfg(feature="num-complex")]
12896impl core::ops::Mul<InverseEnergy<num_complex::Complex32>> for &num_complex::Complex32 {
12897 type Output = InverseEnergy<num_complex::Complex32>;
12898 fn mul(self, rhs: InverseEnergy<num_complex::Complex32>) -> Self::Output {
12899 InverseEnergy{per_J: self.clone() * rhs.per_J}
12900 }
12901}
12902#[cfg(feature="num-complex")]
12904impl core::ops::Mul<&InverseEnergy<num_complex::Complex32>> for num_complex::Complex32 {
12905 type Output = InverseEnergy<num_complex::Complex32>;
12906 fn mul(self, rhs: &InverseEnergy<num_complex::Complex32>) -> Self::Output {
12907 InverseEnergy{per_J: self * rhs.per_J.clone()}
12908 }
12909}
12910#[cfg(feature="num-complex")]
12912impl core::ops::Mul<&InverseEnergy<num_complex::Complex32>> for &num_complex::Complex32 {
12913 type Output = InverseEnergy<num_complex::Complex32>;
12914 fn mul(self, rhs: &InverseEnergy<num_complex::Complex32>) -> Self::Output {
12915 InverseEnergy{per_J: self.clone() * rhs.per_J.clone()}
12916 }
12917}
12918
12919#[cfg(feature="num-complex")]
12921impl core::ops::Mul<InverseEnergy<num_complex::Complex64>> for num_complex::Complex64 {
12922 type Output = InverseEnergy<num_complex::Complex64>;
12923 fn mul(self, rhs: InverseEnergy<num_complex::Complex64>) -> Self::Output {
12924 InverseEnergy{per_J: self * rhs.per_J}
12925 }
12926}
12927#[cfg(feature="num-complex")]
12929impl core::ops::Mul<InverseEnergy<num_complex::Complex64>> for &num_complex::Complex64 {
12930 type Output = InverseEnergy<num_complex::Complex64>;
12931 fn mul(self, rhs: InverseEnergy<num_complex::Complex64>) -> Self::Output {
12932 InverseEnergy{per_J: self.clone() * rhs.per_J}
12933 }
12934}
12935#[cfg(feature="num-complex")]
12937impl core::ops::Mul<&InverseEnergy<num_complex::Complex64>> for num_complex::Complex64 {
12938 type Output = InverseEnergy<num_complex::Complex64>;
12939 fn mul(self, rhs: &InverseEnergy<num_complex::Complex64>) -> Self::Output {
12940 InverseEnergy{per_J: self * rhs.per_J.clone()}
12941 }
12942}
12943#[cfg(feature="num-complex")]
12945impl core::ops::Mul<&InverseEnergy<num_complex::Complex64>> for &num_complex::Complex64 {
12946 type Output = InverseEnergy<num_complex::Complex64>;
12947 fn mul(self, rhs: &InverseEnergy<num_complex::Complex64>) -> Self::Output {
12948 InverseEnergy{per_J: self.clone() * rhs.per_J.clone()}
12949 }
12950}
12951
12952
12953
12954
12955impl<T> core::ops::Mul<Current<T>> for InverseEnergy<T> where T: NumLike {
12958 type Output = InverseMagneticFlux<T>;
12959 fn mul(self, rhs: Current<T>) -> Self::Output {
12960 InverseMagneticFlux{per_Wb: self.per_J * rhs.A}
12961 }
12962}
12963impl<T> core::ops::Mul<Current<T>> for &InverseEnergy<T> where T: NumLike {
12965 type Output = InverseMagneticFlux<T>;
12966 fn mul(self, rhs: Current<T>) -> Self::Output {
12967 InverseMagneticFlux{per_Wb: self.per_J.clone() * rhs.A}
12968 }
12969}
12970impl<T> core::ops::Mul<&Current<T>> for InverseEnergy<T> where T: NumLike {
12972 type Output = InverseMagneticFlux<T>;
12973 fn mul(self, rhs: &Current<T>) -> Self::Output {
12974 InverseMagneticFlux{per_Wb: self.per_J * rhs.A.clone()}
12975 }
12976}
12977impl<T> core::ops::Mul<&Current<T>> for &InverseEnergy<T> where T: NumLike {
12979 type Output = InverseMagneticFlux<T>;
12980 fn mul(self, rhs: &Current<T>) -> Self::Output {
12981 InverseMagneticFlux{per_Wb: self.per_J.clone() * rhs.A.clone()}
12982 }
12983}
12984
12985impl<T> core::ops::Mul<Distance<T>> for InverseEnergy<T> where T: NumLike {
12988 type Output = InverseForce<T>;
12989 fn mul(self, rhs: Distance<T>) -> Self::Output {
12990 InverseForce{per_N: self.per_J * rhs.m}
12991 }
12992}
12993impl<T> core::ops::Mul<Distance<T>> for &InverseEnergy<T> where T: NumLike {
12995 type Output = InverseForce<T>;
12996 fn mul(self, rhs: Distance<T>) -> Self::Output {
12997 InverseForce{per_N: self.per_J.clone() * rhs.m}
12998 }
12999}
13000impl<T> core::ops::Mul<&Distance<T>> for InverseEnergy<T> where T: NumLike {
13002 type Output = InverseForce<T>;
13003 fn mul(self, rhs: &Distance<T>) -> Self::Output {
13004 InverseForce{per_N: self.per_J * rhs.m.clone()}
13005 }
13006}
13007impl<T> core::ops::Mul<&Distance<T>> for &InverseEnergy<T> where T: NumLike {
13009 type Output = InverseForce<T>;
13010 fn mul(self, rhs: &Distance<T>) -> Self::Output {
13011 InverseForce{per_N: self.per_J.clone() * rhs.m.clone()}
13012 }
13013}
13014
13015impl<T> core::ops::Div<InverseCurrent<T>> for InverseEnergy<T> where T: NumLike {
13018 type Output = InverseMagneticFlux<T>;
13019 fn div(self, rhs: InverseCurrent<T>) -> Self::Output {
13020 InverseMagneticFlux{per_Wb: self.per_J / rhs.per_A}
13021 }
13022}
13023impl<T> core::ops::Div<InverseCurrent<T>> for &InverseEnergy<T> where T: NumLike {
13025 type Output = InverseMagneticFlux<T>;
13026 fn div(self, rhs: InverseCurrent<T>) -> Self::Output {
13027 InverseMagneticFlux{per_Wb: self.per_J.clone() / rhs.per_A}
13028 }
13029}
13030impl<T> core::ops::Div<&InverseCurrent<T>> for InverseEnergy<T> where T: NumLike {
13032 type Output = InverseMagneticFlux<T>;
13033 fn div(self, rhs: &InverseCurrent<T>) -> Self::Output {
13034 InverseMagneticFlux{per_Wb: self.per_J / rhs.per_A.clone()}
13035 }
13036}
13037impl<T> core::ops::Div<&InverseCurrent<T>> for &InverseEnergy<T> where T: NumLike {
13039 type Output = InverseMagneticFlux<T>;
13040 fn div(self, rhs: &InverseCurrent<T>) -> Self::Output {
13041 InverseMagneticFlux{per_Wb: self.per_J.clone() / rhs.per_A.clone()}
13042 }
13043}
13044
13045impl<T> core::ops::Div<InverseDistance<T>> for InverseEnergy<T> where T: NumLike {
13048 type Output = InverseForce<T>;
13049 fn div(self, rhs: InverseDistance<T>) -> Self::Output {
13050 InverseForce{per_N: self.per_J / rhs.per_m}
13051 }
13052}
13053impl<T> core::ops::Div<InverseDistance<T>> for &InverseEnergy<T> where T: NumLike {
13055 type Output = InverseForce<T>;
13056 fn div(self, rhs: InverseDistance<T>) -> Self::Output {
13057 InverseForce{per_N: self.per_J.clone() / rhs.per_m}
13058 }
13059}
13060impl<T> core::ops::Div<&InverseDistance<T>> for InverseEnergy<T> where T: NumLike {
13062 type Output = InverseForce<T>;
13063 fn div(self, rhs: &InverseDistance<T>) -> Self::Output {
13064 InverseForce{per_N: self.per_J / rhs.per_m.clone()}
13065 }
13066}
13067impl<T> core::ops::Div<&InverseDistance<T>> for &InverseEnergy<T> where T: NumLike {
13069 type Output = InverseForce<T>;
13070 fn div(self, rhs: &InverseDistance<T>) -> Self::Output {
13071 InverseForce{per_N: self.per_J.clone() / rhs.per_m.clone()}
13072 }
13073}
13074
13075impl<T> core::ops::Mul<Time<T>> for InverseEnergy<T> where T: NumLike {
13078 type Output = InversePower<T>;
13079 fn mul(self, rhs: Time<T>) -> Self::Output {
13080 InversePower{per_W: self.per_J * rhs.s}
13081 }
13082}
13083impl<T> core::ops::Mul<Time<T>> for &InverseEnergy<T> where T: NumLike {
13085 type Output = InversePower<T>;
13086 fn mul(self, rhs: Time<T>) -> Self::Output {
13087 InversePower{per_W: self.per_J.clone() * rhs.s}
13088 }
13089}
13090impl<T> core::ops::Mul<&Time<T>> for InverseEnergy<T> where T: NumLike {
13092 type Output = InversePower<T>;
13093 fn mul(self, rhs: &Time<T>) -> Self::Output {
13094 InversePower{per_W: self.per_J * rhs.s.clone()}
13095 }
13096}
13097impl<T> core::ops::Mul<&Time<T>> for &InverseEnergy<T> where T: NumLike {
13099 type Output = InversePower<T>;
13100 fn mul(self, rhs: &Time<T>) -> Self::Output {
13101 InversePower{per_W: self.per_J.clone() * rhs.s.clone()}
13102 }
13103}
13104
13105impl<T> core::ops::Mul<Charge<T>> for InverseEnergy<T> where T: NumLike {
13108 type Output = InverseVoltage<T>;
13109 fn mul(self, rhs: Charge<T>) -> Self::Output {
13110 InverseVoltage{per_V: self.per_J * rhs.C}
13111 }
13112}
13113impl<T> core::ops::Mul<Charge<T>> for &InverseEnergy<T> where T: NumLike {
13115 type Output = InverseVoltage<T>;
13116 fn mul(self, rhs: Charge<T>) -> Self::Output {
13117 InverseVoltage{per_V: self.per_J.clone() * rhs.C}
13118 }
13119}
13120impl<T> core::ops::Mul<&Charge<T>> for InverseEnergy<T> where T: NumLike {
13122 type Output = InverseVoltage<T>;
13123 fn mul(self, rhs: &Charge<T>) -> Self::Output {
13124 InverseVoltage{per_V: self.per_J * rhs.C.clone()}
13125 }
13126}
13127impl<T> core::ops::Mul<&Charge<T>> for &InverseEnergy<T> where T: NumLike {
13129 type Output = InverseVoltage<T>;
13130 fn mul(self, rhs: &Charge<T>) -> Self::Output {
13131 InverseVoltage{per_V: self.per_J.clone() * rhs.C.clone()}
13132 }
13133}
13134
13135impl<T> core::ops::Div<InverseCharge<T>> for InverseEnergy<T> where T: NumLike {
13138 type Output = InverseVoltage<T>;
13139 fn div(self, rhs: InverseCharge<T>) -> Self::Output {
13140 InverseVoltage{per_V: self.per_J / rhs.per_C}
13141 }
13142}
13143impl<T> core::ops::Div<InverseCharge<T>> for &InverseEnergy<T> where T: NumLike {
13145 type Output = InverseVoltage<T>;
13146 fn div(self, rhs: InverseCharge<T>) -> Self::Output {
13147 InverseVoltage{per_V: self.per_J.clone() / rhs.per_C}
13148 }
13149}
13150impl<T> core::ops::Div<&InverseCharge<T>> for InverseEnergy<T> where T: NumLike {
13152 type Output = InverseVoltage<T>;
13153 fn div(self, rhs: &InverseCharge<T>) -> Self::Output {
13154 InverseVoltage{per_V: self.per_J / rhs.per_C.clone()}
13155 }
13156}
13157impl<T> core::ops::Div<&InverseCharge<T>> for &InverseEnergy<T> where T: NumLike {
13159 type Output = InverseVoltage<T>;
13160 fn div(self, rhs: &InverseCharge<T>) -> Self::Output {
13161 InverseVoltage{per_V: self.per_J.clone() / rhs.per_C.clone()}
13162 }
13163}
13164
13165impl<T> core::ops::Div<InverseMagneticFlux<T>> for InverseEnergy<T> where T: NumLike {
13168 type Output = InverseCurrent<T>;
13169 fn div(self, rhs: InverseMagneticFlux<T>) -> Self::Output {
13170 InverseCurrent{per_A: self.per_J / rhs.per_Wb}
13171 }
13172}
13173impl<T> core::ops::Div<InverseMagneticFlux<T>> for &InverseEnergy<T> where T: NumLike {
13175 type Output = InverseCurrent<T>;
13176 fn div(self, rhs: InverseMagneticFlux<T>) -> Self::Output {
13177 InverseCurrent{per_A: self.per_J.clone() / rhs.per_Wb}
13178 }
13179}
13180impl<T> core::ops::Div<&InverseMagneticFlux<T>> for InverseEnergy<T> where T: NumLike {
13182 type Output = InverseCurrent<T>;
13183 fn div(self, rhs: &InverseMagneticFlux<T>) -> Self::Output {
13184 InverseCurrent{per_A: self.per_J / rhs.per_Wb.clone()}
13185 }
13186}
13187impl<T> core::ops::Div<&InverseMagneticFlux<T>> for &InverseEnergy<T> where T: NumLike {
13189 type Output = InverseCurrent<T>;
13190 fn div(self, rhs: &InverseMagneticFlux<T>) -> Self::Output {
13191 InverseCurrent{per_A: self.per_J.clone() / rhs.per_Wb.clone()}
13192 }
13193}
13194
13195impl<T> core::ops::Div<InverseVoltage<T>> for InverseEnergy<T> where T: NumLike {
13198 type Output = InverseCharge<T>;
13199 fn div(self, rhs: InverseVoltage<T>) -> Self::Output {
13200 InverseCharge{per_C: self.per_J / rhs.per_V}
13201 }
13202}
13203impl<T> core::ops::Div<InverseVoltage<T>> for &InverseEnergy<T> where T: NumLike {
13205 type Output = InverseCharge<T>;
13206 fn div(self, rhs: InverseVoltage<T>) -> Self::Output {
13207 InverseCharge{per_C: self.per_J.clone() / rhs.per_V}
13208 }
13209}
13210impl<T> core::ops::Div<&InverseVoltage<T>> for InverseEnergy<T> where T: NumLike {
13212 type Output = InverseCharge<T>;
13213 fn div(self, rhs: &InverseVoltage<T>) -> Self::Output {
13214 InverseCharge{per_C: self.per_J / rhs.per_V.clone()}
13215 }
13216}
13217impl<T> core::ops::Div<&InverseVoltage<T>> for &InverseEnergy<T> where T: NumLike {
13219 type Output = InverseCharge<T>;
13220 fn div(self, rhs: &InverseVoltage<T>) -> Self::Output {
13221 InverseCharge{per_C: self.per_J.clone() / rhs.per_V.clone()}
13222 }
13223}
13224
13225impl<T> core::ops::Mul<MagneticFlux<T>> for InverseEnergy<T> where T: NumLike {
13228 type Output = InverseCurrent<T>;
13229 fn mul(self, rhs: MagneticFlux<T>) -> Self::Output {
13230 InverseCurrent{per_A: self.per_J * rhs.Wb}
13231 }
13232}
13233impl<T> core::ops::Mul<MagneticFlux<T>> for &InverseEnergy<T> where T: NumLike {
13235 type Output = InverseCurrent<T>;
13236 fn mul(self, rhs: MagneticFlux<T>) -> Self::Output {
13237 InverseCurrent{per_A: self.per_J.clone() * rhs.Wb}
13238 }
13239}
13240impl<T> core::ops::Mul<&MagneticFlux<T>> for InverseEnergy<T> where T: NumLike {
13242 type Output = InverseCurrent<T>;
13243 fn mul(self, rhs: &MagneticFlux<T>) -> Self::Output {
13244 InverseCurrent{per_A: self.per_J * rhs.Wb.clone()}
13245 }
13246}
13247impl<T> core::ops::Mul<&MagneticFlux<T>> for &InverseEnergy<T> where T: NumLike {
13249 type Output = InverseCurrent<T>;
13250 fn mul(self, rhs: &MagneticFlux<T>) -> Self::Output {
13251 InverseCurrent{per_A: self.per_J.clone() * rhs.Wb.clone()}
13252 }
13253}
13254
13255impl<T> core::ops::Mul<Voltage<T>> for InverseEnergy<T> where T: NumLike {
13258 type Output = InverseCharge<T>;
13259 fn mul(self, rhs: Voltage<T>) -> Self::Output {
13260 InverseCharge{per_C: self.per_J * rhs.V}
13261 }
13262}
13263impl<T> core::ops::Mul<Voltage<T>> for &InverseEnergy<T> where T: NumLike {
13265 type Output = InverseCharge<T>;
13266 fn mul(self, rhs: Voltage<T>) -> Self::Output {
13267 InverseCharge{per_C: self.per_J.clone() * rhs.V}
13268 }
13269}
13270impl<T> core::ops::Mul<&Voltage<T>> for InverseEnergy<T> where T: NumLike {
13272 type Output = InverseCharge<T>;
13273 fn mul(self, rhs: &Voltage<T>) -> Self::Output {
13274 InverseCharge{per_C: self.per_J * rhs.V.clone()}
13275 }
13276}
13277impl<T> core::ops::Mul<&Voltage<T>> for &InverseEnergy<T> where T: NumLike {
13279 type Output = InverseCharge<T>;
13280 fn mul(self, rhs: &Voltage<T>) -> Self::Output {
13281 InverseCharge{per_C: self.per_J.clone() * rhs.V.clone()}
13282 }
13283}
13284
13285impl<T> core::ops::Div<InverseVolume<T>> for InverseEnergy<T> where T: NumLike {
13288 type Output = InversePressure<T>;
13289 fn div(self, rhs: InverseVolume<T>) -> Self::Output {
13290 InversePressure{per_Pa: self.per_J / rhs.per_m3}
13291 }
13292}
13293impl<T> core::ops::Div<InverseVolume<T>> for &InverseEnergy<T> where T: NumLike {
13295 type Output = InversePressure<T>;
13296 fn div(self, rhs: InverseVolume<T>) -> Self::Output {
13297 InversePressure{per_Pa: self.per_J.clone() / rhs.per_m3}
13298 }
13299}
13300impl<T> core::ops::Div<&InverseVolume<T>> for InverseEnergy<T> where T: NumLike {
13302 type Output = InversePressure<T>;
13303 fn div(self, rhs: &InverseVolume<T>) -> Self::Output {
13304 InversePressure{per_Pa: self.per_J / rhs.per_m3.clone()}
13305 }
13306}
13307impl<T> core::ops::Div<&InverseVolume<T>> for &InverseEnergy<T> where T: NumLike {
13309 type Output = InversePressure<T>;
13310 fn div(self, rhs: &InverseVolume<T>) -> Self::Output {
13311 InversePressure{per_Pa: self.per_J.clone() / rhs.per_m3.clone()}
13312 }
13313}
13314
13315impl<T> core::ops::Mul<Volume<T>> for InverseEnergy<T> where T: NumLike {
13318 type Output = InversePressure<T>;
13319 fn mul(self, rhs: Volume<T>) -> Self::Output {
13320 InversePressure{per_Pa: self.per_J * rhs.m3}
13321 }
13322}
13323impl<T> core::ops::Mul<Volume<T>> for &InverseEnergy<T> where T: NumLike {
13325 type Output = InversePressure<T>;
13326 fn mul(self, rhs: Volume<T>) -> Self::Output {
13327 InversePressure{per_Pa: self.per_J.clone() * rhs.m3}
13328 }
13329}
13330impl<T> core::ops::Mul<&Volume<T>> for InverseEnergy<T> where T: NumLike {
13332 type Output = InversePressure<T>;
13333 fn mul(self, rhs: &Volume<T>) -> Self::Output {
13334 InversePressure{per_Pa: self.per_J * rhs.m3.clone()}
13335 }
13336}
13337impl<T> core::ops::Mul<&Volume<T>> for &InverseEnergy<T> where T: NumLike {
13339 type Output = InversePressure<T>;
13340 fn mul(self, rhs: &Volume<T>) -> Self::Output {
13341 InversePressure{per_Pa: self.per_J.clone() * rhs.m3.clone()}
13342 }
13343}
13344
13345impl<T> core::ops::Mul<Force<T>> for InverseEnergy<T> where T: NumLike {
13348 type Output = InverseDistance<T>;
13349 fn mul(self, rhs: Force<T>) -> Self::Output {
13350 InverseDistance{per_m: self.per_J * rhs.N}
13351 }
13352}
13353impl<T> core::ops::Mul<Force<T>> for &InverseEnergy<T> where T: NumLike {
13355 type Output = InverseDistance<T>;
13356 fn mul(self, rhs: Force<T>) -> Self::Output {
13357 InverseDistance{per_m: self.per_J.clone() * rhs.N}
13358 }
13359}
13360impl<T> core::ops::Mul<&Force<T>> for InverseEnergy<T> where T: NumLike {
13362 type Output = InverseDistance<T>;
13363 fn mul(self, rhs: &Force<T>) -> Self::Output {
13364 InverseDistance{per_m: self.per_J * rhs.N.clone()}
13365 }
13366}
13367impl<T> core::ops::Mul<&Force<T>> for &InverseEnergy<T> where T: NumLike {
13369 type Output = InverseDistance<T>;
13370 fn mul(self, rhs: &Force<T>) -> Self::Output {
13371 InverseDistance{per_m: self.per_J.clone() * rhs.N.clone()}
13372 }
13373}
13374
13375impl<T> core::ops::Div<Frequency<T>> for InverseEnergy<T> where T: NumLike {
13378 type Output = InversePower<T>;
13379 fn div(self, rhs: Frequency<T>) -> Self::Output {
13380 InversePower{per_W: self.per_J / rhs.Hz}
13381 }
13382}
13383impl<T> core::ops::Div<Frequency<T>> for &InverseEnergy<T> where T: NumLike {
13385 type Output = InversePower<T>;
13386 fn div(self, rhs: Frequency<T>) -> Self::Output {
13387 InversePower{per_W: self.per_J.clone() / rhs.Hz}
13388 }
13389}
13390impl<T> core::ops::Div<&Frequency<T>> for InverseEnergy<T> where T: NumLike {
13392 type Output = InversePower<T>;
13393 fn div(self, rhs: &Frequency<T>) -> Self::Output {
13394 InversePower{per_W: self.per_J / rhs.Hz.clone()}
13395 }
13396}
13397impl<T> core::ops::Div<&Frequency<T>> for &InverseEnergy<T> where T: NumLike {
13399 type Output = InversePower<T>;
13400 fn div(self, rhs: &Frequency<T>) -> Self::Output {
13401 InversePower{per_W: self.per_J.clone() / rhs.Hz.clone()}
13402 }
13403}
13404
13405impl<T> core::ops::Div<InverseForce<T>> for InverseEnergy<T> where T: NumLike {
13408 type Output = InverseDistance<T>;
13409 fn div(self, rhs: InverseForce<T>) -> Self::Output {
13410 InverseDistance{per_m: self.per_J / rhs.per_N}
13411 }
13412}
13413impl<T> core::ops::Div<InverseForce<T>> for &InverseEnergy<T> where T: NumLike {
13415 type Output = InverseDistance<T>;
13416 fn div(self, rhs: InverseForce<T>) -> Self::Output {
13417 InverseDistance{per_m: self.per_J.clone() / rhs.per_N}
13418 }
13419}
13420impl<T> core::ops::Div<&InverseForce<T>> for InverseEnergy<T> where T: NumLike {
13422 type Output = InverseDistance<T>;
13423 fn div(self, rhs: &InverseForce<T>) -> Self::Output {
13424 InverseDistance{per_m: self.per_J / rhs.per_N.clone()}
13425 }
13426}
13427impl<T> core::ops::Div<&InverseForce<T>> for &InverseEnergy<T> where T: NumLike {
13429 type Output = InverseDistance<T>;
13430 fn div(self, rhs: &InverseForce<T>) -> Self::Output {
13431 InverseDistance{per_m: self.per_J.clone() / rhs.per_N.clone()}
13432 }
13433}
13434
13435impl<T> core::ops::Div<InverseMomentum<T>> for InverseEnergy<T> where T: NumLike {
13438 type Output = TimePerDistance<T>;
13439 fn div(self, rhs: InverseMomentum<T>) -> Self::Output {
13440 TimePerDistance{spm: self.per_J / rhs.s_per_kgm}
13441 }
13442}
13443impl<T> core::ops::Div<InverseMomentum<T>> for &InverseEnergy<T> where T: NumLike {
13445 type Output = TimePerDistance<T>;
13446 fn div(self, rhs: InverseMomentum<T>) -> Self::Output {
13447 TimePerDistance{spm: self.per_J.clone() / rhs.s_per_kgm}
13448 }
13449}
13450impl<T> core::ops::Div<&InverseMomentum<T>> for InverseEnergy<T> where T: NumLike {
13452 type Output = TimePerDistance<T>;
13453 fn div(self, rhs: &InverseMomentum<T>) -> Self::Output {
13454 TimePerDistance{spm: self.per_J / rhs.s_per_kgm.clone()}
13455 }
13456}
13457impl<T> core::ops::Div<&InverseMomentum<T>> for &InverseEnergy<T> where T: NumLike {
13459 type Output = TimePerDistance<T>;
13460 fn div(self, rhs: &InverseMomentum<T>) -> Self::Output {
13461 TimePerDistance{spm: self.per_J.clone() / rhs.s_per_kgm.clone()}
13462 }
13463}
13464
13465impl<T> core::ops::Div<InversePower<T>> for InverseEnergy<T> where T: NumLike {
13468 type Output = Frequency<T>;
13469 fn div(self, rhs: InversePower<T>) -> Self::Output {
13470 Frequency{Hz: self.per_J / rhs.per_W}
13471 }
13472}
13473impl<T> core::ops::Div<InversePower<T>> for &InverseEnergy<T> where T: NumLike {
13475 type Output = Frequency<T>;
13476 fn div(self, rhs: InversePower<T>) -> Self::Output {
13477 Frequency{Hz: self.per_J.clone() / rhs.per_W}
13478 }
13479}
13480impl<T> core::ops::Div<&InversePower<T>> for InverseEnergy<T> where T: NumLike {
13482 type Output = Frequency<T>;
13483 fn div(self, rhs: &InversePower<T>) -> Self::Output {
13484 Frequency{Hz: self.per_J / rhs.per_W.clone()}
13485 }
13486}
13487impl<T> core::ops::Div<&InversePower<T>> for &InverseEnergy<T> where T: NumLike {
13489 type Output = Frequency<T>;
13490 fn div(self, rhs: &InversePower<T>) -> Self::Output {
13491 Frequency{Hz: self.per_J.clone() / rhs.per_W.clone()}
13492 }
13493}
13494
13495impl<T> core::ops::Div<InversePressure<T>> for InverseEnergy<T> where T: NumLike {
13498 type Output = InverseVolume<T>;
13499 fn div(self, rhs: InversePressure<T>) -> Self::Output {
13500 InverseVolume{per_m3: self.per_J / rhs.per_Pa}
13501 }
13502}
13503impl<T> core::ops::Div<InversePressure<T>> for &InverseEnergy<T> where T: NumLike {
13505 type Output = InverseVolume<T>;
13506 fn div(self, rhs: InversePressure<T>) -> Self::Output {
13507 InverseVolume{per_m3: self.per_J.clone() / rhs.per_Pa}
13508 }
13509}
13510impl<T> core::ops::Div<&InversePressure<T>> for InverseEnergy<T> where T: NumLike {
13512 type Output = InverseVolume<T>;
13513 fn div(self, rhs: &InversePressure<T>) -> Self::Output {
13514 InverseVolume{per_m3: self.per_J / rhs.per_Pa.clone()}
13515 }
13516}
13517impl<T> core::ops::Div<&InversePressure<T>> for &InverseEnergy<T> where T: NumLike {
13519 type Output = InverseVolume<T>;
13520 fn div(self, rhs: &InversePressure<T>) -> Self::Output {
13521 InverseVolume{per_m3: self.per_J.clone() / rhs.per_Pa.clone()}
13522 }
13523}
13524
13525impl<T> core::ops::Mul<Momentum<T>> for InverseEnergy<T> where T: NumLike {
13528 type Output = TimePerDistance<T>;
13529 fn mul(self, rhs: Momentum<T>) -> Self::Output {
13530 TimePerDistance{spm: self.per_J * rhs.kgmps}
13531 }
13532}
13533impl<T> core::ops::Mul<Momentum<T>> for &InverseEnergy<T> where T: NumLike {
13535 type Output = TimePerDistance<T>;
13536 fn mul(self, rhs: Momentum<T>) -> Self::Output {
13537 TimePerDistance{spm: self.per_J.clone() * rhs.kgmps}
13538 }
13539}
13540impl<T> core::ops::Mul<&Momentum<T>> for InverseEnergy<T> where T: NumLike {
13542 type Output = TimePerDistance<T>;
13543 fn mul(self, rhs: &Momentum<T>) -> Self::Output {
13544 TimePerDistance{spm: self.per_J * rhs.kgmps.clone()}
13545 }
13546}
13547impl<T> core::ops::Mul<&Momentum<T>> for &InverseEnergy<T> where T: NumLike {
13549 type Output = TimePerDistance<T>;
13550 fn mul(self, rhs: &Momentum<T>) -> Self::Output {
13551 TimePerDistance{spm: self.per_J.clone() * rhs.kgmps.clone()}
13552 }
13553}
13554
13555impl<T> core::ops::Mul<Power<T>> for InverseEnergy<T> where T: NumLike {
13558 type Output = Frequency<T>;
13559 fn mul(self, rhs: Power<T>) -> Self::Output {
13560 Frequency{Hz: self.per_J * rhs.W}
13561 }
13562}
13563impl<T> core::ops::Mul<Power<T>> for &InverseEnergy<T> where T: NumLike {
13565 type Output = Frequency<T>;
13566 fn mul(self, rhs: Power<T>) -> Self::Output {
13567 Frequency{Hz: self.per_J.clone() * rhs.W}
13568 }
13569}
13570impl<T> core::ops::Mul<&Power<T>> for InverseEnergy<T> where T: NumLike {
13572 type Output = Frequency<T>;
13573 fn mul(self, rhs: &Power<T>) -> Self::Output {
13574 Frequency{Hz: self.per_J * rhs.W.clone()}
13575 }
13576}
13577impl<T> core::ops::Mul<&Power<T>> for &InverseEnergy<T> where T: NumLike {
13579 type Output = Frequency<T>;
13580 fn mul(self, rhs: &Power<T>) -> Self::Output {
13581 Frequency{Hz: self.per_J.clone() * rhs.W.clone()}
13582 }
13583}
13584
13585impl<T> core::ops::Mul<Pressure<T>> for InverseEnergy<T> where T: NumLike {
13588 type Output = InverseVolume<T>;
13589 fn mul(self, rhs: Pressure<T>) -> Self::Output {
13590 InverseVolume{per_m3: self.per_J * rhs.Pa}
13591 }
13592}
13593impl<T> core::ops::Mul<Pressure<T>> for &InverseEnergy<T> where T: NumLike {
13595 type Output = InverseVolume<T>;
13596 fn mul(self, rhs: Pressure<T>) -> Self::Output {
13597 InverseVolume{per_m3: self.per_J.clone() * rhs.Pa}
13598 }
13599}
13600impl<T> core::ops::Mul<&Pressure<T>> for InverseEnergy<T> where T: NumLike {
13602 type Output = InverseVolume<T>;
13603 fn mul(self, rhs: &Pressure<T>) -> Self::Output {
13604 InverseVolume{per_m3: self.per_J * rhs.Pa.clone()}
13605 }
13606}
13607impl<T> core::ops::Mul<&Pressure<T>> for &InverseEnergy<T> where T: NumLike {
13609 type Output = InverseVolume<T>;
13610 fn mul(self, rhs: &Pressure<T>) -> Self::Output {
13611 InverseVolume{per_m3: self.per_J.clone() * rhs.Pa.clone()}
13612 }
13613}
13614
13615impl<T> core::ops::Div<TimePerDistance<T>> for InverseEnergy<T> where T: NumLike {
13618 type Output = InverseMomentum<T>;
13619 fn div(self, rhs: TimePerDistance<T>) -> Self::Output {
13620 InverseMomentum{s_per_kgm: self.per_J / rhs.spm}
13621 }
13622}
13623impl<T> core::ops::Div<TimePerDistance<T>> for &InverseEnergy<T> where T: NumLike {
13625 type Output = InverseMomentum<T>;
13626 fn div(self, rhs: TimePerDistance<T>) -> Self::Output {
13627 InverseMomentum{s_per_kgm: self.per_J.clone() / rhs.spm}
13628 }
13629}
13630impl<T> core::ops::Div<&TimePerDistance<T>> for InverseEnergy<T> where T: NumLike {
13632 type Output = InverseMomentum<T>;
13633 fn div(self, rhs: &TimePerDistance<T>) -> Self::Output {
13634 InverseMomentum{s_per_kgm: self.per_J / rhs.spm.clone()}
13635 }
13636}
13637impl<T> core::ops::Div<&TimePerDistance<T>> for &InverseEnergy<T> where T: NumLike {
13639 type Output = InverseMomentum<T>;
13640 fn div(self, rhs: &TimePerDistance<T>) -> Self::Output {
13641 InverseMomentum{s_per_kgm: self.per_J.clone() / rhs.spm.clone()}
13642 }
13643}
13644
13645impl<T> core::ops::Mul<Velocity<T>> for InverseEnergy<T> where T: NumLike {
13648 type Output = InverseMomentum<T>;
13649 fn mul(self, rhs: Velocity<T>) -> Self::Output {
13650 InverseMomentum{s_per_kgm: self.per_J * rhs.mps}
13651 }
13652}
13653impl<T> core::ops::Mul<Velocity<T>> for &InverseEnergy<T> where T: NumLike {
13655 type Output = InverseMomentum<T>;
13656 fn mul(self, rhs: Velocity<T>) -> Self::Output {
13657 InverseMomentum{s_per_kgm: self.per_J.clone() * rhs.mps}
13658 }
13659}
13660impl<T> core::ops::Mul<&Velocity<T>> for InverseEnergy<T> where T: NumLike {
13662 type Output = InverseMomentum<T>;
13663 fn mul(self, rhs: &Velocity<T>) -> Self::Output {
13664 InverseMomentum{s_per_kgm: self.per_J * rhs.mps.clone()}
13665 }
13666}
13667impl<T> core::ops::Mul<&Velocity<T>> for &InverseEnergy<T> where T: NumLike {
13669 type Output = InverseMomentum<T>;
13670 fn mul(self, rhs: &Velocity<T>) -> Self::Output {
13671 InverseMomentum{s_per_kgm: self.per_J.clone() * rhs.mps.clone()}
13672 }
13673}
13674
13675impl<T> core::ops::Div<InverseAbsorbedDose<T>> for InverseEnergy<T> where T: NumLike {
13678 type Output = InverseMass<T>;
13679 fn div(self, rhs: InverseAbsorbedDose<T>) -> Self::Output {
13680 InverseMass{per_kg: self.per_J / rhs.per_Gy}
13681 }
13682}
13683impl<T> core::ops::Div<InverseAbsorbedDose<T>> for &InverseEnergy<T> where T: NumLike {
13685 type Output = InverseMass<T>;
13686 fn div(self, rhs: InverseAbsorbedDose<T>) -> Self::Output {
13687 InverseMass{per_kg: self.per_J.clone() / rhs.per_Gy}
13688 }
13689}
13690impl<T> core::ops::Div<&InverseAbsorbedDose<T>> for InverseEnergy<T> where T: NumLike {
13692 type Output = InverseMass<T>;
13693 fn div(self, rhs: &InverseAbsorbedDose<T>) -> Self::Output {
13694 InverseMass{per_kg: self.per_J / rhs.per_Gy.clone()}
13695 }
13696}
13697impl<T> core::ops::Div<&InverseAbsorbedDose<T>> for &InverseEnergy<T> where T: NumLike {
13699 type Output = InverseMass<T>;
13700 fn div(self, rhs: &InverseAbsorbedDose<T>) -> Self::Output {
13701 InverseMass{per_kg: self.per_J.clone() / rhs.per_Gy.clone()}
13702 }
13703}
13704
13705impl<T> core::ops::Div<InverseDoseEquivalent<T>> for InverseEnergy<T> where T: NumLike {
13708 type Output = InverseMass<T>;
13709 fn div(self, rhs: InverseDoseEquivalent<T>) -> Self::Output {
13710 InverseMass{per_kg: self.per_J / rhs.per_Sv}
13711 }
13712}
13713impl<T> core::ops::Div<InverseDoseEquivalent<T>> for &InverseEnergy<T> where T: NumLike {
13715 type Output = InverseMass<T>;
13716 fn div(self, rhs: InverseDoseEquivalent<T>) -> Self::Output {
13717 InverseMass{per_kg: self.per_J.clone() / rhs.per_Sv}
13718 }
13719}
13720impl<T> core::ops::Div<&InverseDoseEquivalent<T>> for InverseEnergy<T> where T: NumLike {
13722 type Output = InverseMass<T>;
13723 fn div(self, rhs: &InverseDoseEquivalent<T>) -> Self::Output {
13724 InverseMass{per_kg: self.per_J / rhs.per_Sv.clone()}
13725 }
13726}
13727impl<T> core::ops::Div<&InverseDoseEquivalent<T>> for &InverseEnergy<T> where T: NumLike {
13729 type Output = InverseMass<T>;
13730 fn div(self, rhs: &InverseDoseEquivalent<T>) -> Self::Output {
13731 InverseMass{per_kg: self.per_J.clone() / rhs.per_Sv.clone()}
13732 }
13733}
13734
13735impl<T> core::ops::Div<InverseEnergy<T>> for f64 where T: NumLike+From<f64> {
13738 type Output = Energy<T>;
13739 fn div(self, rhs: InverseEnergy<T>) -> Self::Output {
13740 Energy{J: T::from(self) / rhs.per_J}
13741 }
13742}
13743impl<T> core::ops::Div<InverseEnergy<T>> for &f64 where T: NumLike+From<f64> {
13745 type Output = Energy<T>;
13746 fn div(self, rhs: InverseEnergy<T>) -> Self::Output {
13747 Energy{J: T::from(self.clone()) / rhs.per_J}
13748 }
13749}
13750impl<T> core::ops::Div<&InverseEnergy<T>> for f64 where T: NumLike+From<f64> {
13752 type Output = Energy<T>;
13753 fn div(self, rhs: &InverseEnergy<T>) -> Self::Output {
13754 Energy{J: T::from(self) / rhs.per_J.clone()}
13755 }
13756}
13757impl<T> core::ops::Div<&InverseEnergy<T>> for &f64 where T: NumLike+From<f64> {
13759 type Output = Energy<T>;
13760 fn div(self, rhs: &InverseEnergy<T>) -> Self::Output {
13761 Energy{J: T::from(self.clone()) / rhs.per_J.clone()}
13762 }
13763}
13764
13765impl<T> core::ops::Div<InverseEnergy<T>> for f32 where T: NumLike+From<f32> {
13768 type Output = Energy<T>;
13769 fn div(self, rhs: InverseEnergy<T>) -> Self::Output {
13770 Energy{J: T::from(self) / rhs.per_J}
13771 }
13772}
13773impl<T> core::ops::Div<InverseEnergy<T>> for &f32 where T: NumLike+From<f32> {
13775 type Output = Energy<T>;
13776 fn div(self, rhs: InverseEnergy<T>) -> Self::Output {
13777 Energy{J: T::from(self.clone()) / rhs.per_J}
13778 }
13779}
13780impl<T> core::ops::Div<&InverseEnergy<T>> for f32 where T: NumLike+From<f32> {
13782 type Output = Energy<T>;
13783 fn div(self, rhs: &InverseEnergy<T>) -> Self::Output {
13784 Energy{J: T::from(self) / rhs.per_J.clone()}
13785 }
13786}
13787impl<T> core::ops::Div<&InverseEnergy<T>> for &f32 where T: NumLike+From<f32> {
13789 type Output = Energy<T>;
13790 fn div(self, rhs: &InverseEnergy<T>) -> Self::Output {
13791 Energy{J: T::from(self.clone()) / rhs.per_J.clone()}
13792 }
13793}
13794
13795impl<T> core::ops::Div<InverseEnergy<T>> for i64 where T: NumLike+From<i64> {
13798 type Output = Energy<T>;
13799 fn div(self, rhs: InverseEnergy<T>) -> Self::Output {
13800 Energy{J: T::from(self) / rhs.per_J}
13801 }
13802}
13803impl<T> core::ops::Div<InverseEnergy<T>> for &i64 where T: NumLike+From<i64> {
13805 type Output = Energy<T>;
13806 fn div(self, rhs: InverseEnergy<T>) -> Self::Output {
13807 Energy{J: T::from(self.clone()) / rhs.per_J}
13808 }
13809}
13810impl<T> core::ops::Div<&InverseEnergy<T>> for i64 where T: NumLike+From<i64> {
13812 type Output = Energy<T>;
13813 fn div(self, rhs: &InverseEnergy<T>) -> Self::Output {
13814 Energy{J: T::from(self) / rhs.per_J.clone()}
13815 }
13816}
13817impl<T> core::ops::Div<&InverseEnergy<T>> for &i64 where T: NumLike+From<i64> {
13819 type Output = Energy<T>;
13820 fn div(self, rhs: &InverseEnergy<T>) -> Self::Output {
13821 Energy{J: T::from(self.clone()) / rhs.per_J.clone()}
13822 }
13823}
13824
13825impl<T> core::ops::Div<InverseEnergy<T>> for i32 where T: NumLike+From<i32> {
13828 type Output = Energy<T>;
13829 fn div(self, rhs: InverseEnergy<T>) -> Self::Output {
13830 Energy{J: T::from(self) / rhs.per_J}
13831 }
13832}
13833impl<T> core::ops::Div<InverseEnergy<T>> for &i32 where T: NumLike+From<i32> {
13835 type Output = Energy<T>;
13836 fn div(self, rhs: InverseEnergy<T>) -> Self::Output {
13837 Energy{J: T::from(self.clone()) / rhs.per_J}
13838 }
13839}
13840impl<T> core::ops::Div<&InverseEnergy<T>> for i32 where T: NumLike+From<i32> {
13842 type Output = Energy<T>;
13843 fn div(self, rhs: &InverseEnergy<T>) -> Self::Output {
13844 Energy{J: T::from(self) / rhs.per_J.clone()}
13845 }
13846}
13847impl<T> core::ops::Div<&InverseEnergy<T>> for &i32 where T: NumLike+From<i32> {
13849 type Output = Energy<T>;
13850 fn div(self, rhs: &InverseEnergy<T>) -> Self::Output {
13851 Energy{J: T::from(self.clone()) / rhs.per_J.clone()}
13852 }
13853}
13854
13855#[cfg(feature="num-bigfloat")]
13858impl<T> core::ops::Div<InverseEnergy<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
13859 type Output = Energy<T>;
13860 fn div(self, rhs: InverseEnergy<T>) -> Self::Output {
13861 Energy{J: T::from(self) / rhs.per_J}
13862 }
13863}
13864#[cfg(feature="num-bigfloat")]
13866impl<T> core::ops::Div<InverseEnergy<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
13867 type Output = Energy<T>;
13868 fn div(self, rhs: InverseEnergy<T>) -> Self::Output {
13869 Energy{J: T::from(self.clone()) / rhs.per_J}
13870 }
13871}
13872#[cfg(feature="num-bigfloat")]
13874impl<T> core::ops::Div<&InverseEnergy<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
13875 type Output = Energy<T>;
13876 fn div(self, rhs: &InverseEnergy<T>) -> Self::Output {
13877 Energy{J: T::from(self) / rhs.per_J.clone()}
13878 }
13879}
13880#[cfg(feature="num-bigfloat")]
13882impl<T> core::ops::Div<&InverseEnergy<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
13883 type Output = Energy<T>;
13884 fn div(self, rhs: &InverseEnergy<T>) -> Self::Output {
13885 Energy{J: T::from(self.clone()) / rhs.per_J.clone()}
13886 }
13887}
13888
13889#[cfg(feature="num-complex")]
13892impl<T> core::ops::Div<InverseEnergy<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
13893 type Output = Energy<T>;
13894 fn div(self, rhs: InverseEnergy<T>) -> Self::Output {
13895 Energy{J: T::from(self) / rhs.per_J}
13896 }
13897}
13898#[cfg(feature="num-complex")]
13900impl<T> core::ops::Div<InverseEnergy<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
13901 type Output = Energy<T>;
13902 fn div(self, rhs: InverseEnergy<T>) -> Self::Output {
13903 Energy{J: T::from(self.clone()) / rhs.per_J}
13904 }
13905}
13906#[cfg(feature="num-complex")]
13908impl<T> core::ops::Div<&InverseEnergy<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
13909 type Output = Energy<T>;
13910 fn div(self, rhs: &InverseEnergy<T>) -> Self::Output {
13911 Energy{J: T::from(self) / rhs.per_J.clone()}
13912 }
13913}
13914#[cfg(feature="num-complex")]
13916impl<T> core::ops::Div<&InverseEnergy<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
13917 type Output = Energy<T>;
13918 fn div(self, rhs: &InverseEnergy<T>) -> Self::Output {
13919 Energy{J: T::from(self.clone()) / rhs.per_J.clone()}
13920 }
13921}
13922
13923#[cfg(feature="num-complex")]
13926impl<T> core::ops::Div<InverseEnergy<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
13927 type Output = Energy<T>;
13928 fn div(self, rhs: InverseEnergy<T>) -> Self::Output {
13929 Energy{J: T::from(self) / rhs.per_J}
13930 }
13931}
13932#[cfg(feature="num-complex")]
13934impl<T> core::ops::Div<InverseEnergy<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
13935 type Output = Energy<T>;
13936 fn div(self, rhs: InverseEnergy<T>) -> Self::Output {
13937 Energy{J: T::from(self.clone()) / rhs.per_J}
13938 }
13939}
13940#[cfg(feature="num-complex")]
13942impl<T> core::ops::Div<&InverseEnergy<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
13943 type Output = Energy<T>;
13944 fn div(self, rhs: &InverseEnergy<T>) -> Self::Output {
13945 Energy{J: T::from(self) / rhs.per_J.clone()}
13946 }
13947}
13948#[cfg(feature="num-complex")]
13950impl<T> core::ops::Div<&InverseEnergy<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
13951 type Output = Energy<T>;
13952 fn div(self, rhs: &InverseEnergy<T>) -> Self::Output {
13953 Energy{J: T::from(self.clone()) / rhs.per_J.clone()}
13954 }
13955}
13956
13957#[derive(UnitStruct, Debug, Clone)]
13959#[cfg_attr(feature="serde", derive(Serialize, Deserialize))]
13960pub struct InverseForce<T: NumLike>{
13961 pub per_N: T
13963}
13964
13965impl<T> InverseForce<T> where T: NumLike {
13966
13967 pub fn unit_name() -> &'static str { "inverse newtons" }
13969
13970 pub fn unit_symbol() -> &'static str { "1/N" }
13972
13973 pub fn from_per_N(per_N: T) -> Self { InverseForce{per_N: per_N} }
13978
13979 pub fn to_per_N(&self) -> T { self.per_N.clone() }
13981
13982 pub fn from_per_newton(per_newton: T) -> Self { InverseForce{per_N: per_newton} }
13987
13988 pub fn to_per_newton(&self) -> T { self.per_N.clone() }
13990
13991}
13992
13993impl<T> fmt::Display for InverseForce<T> where T: NumLike {
13994 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
13995 write!(f, "{} {}", &self.per_N, Self::unit_symbol())
13996 }
13997}
13998
13999impl<T> InverseForce<T> where T: NumLike+From<f64> {
14000
14001 pub fn to_per_lb(&self) -> T {
14005 return self.per_N.clone() * T::from(4.45756819483586_f64);
14006 }
14007
14008 pub fn from_per_lb(per_lb: T) -> Self {
14015 InverseForce{per_N: per_lb * T::from(0.224337566199999_f64)}
14016 }
14017
14018 pub fn to_per_kgG(&self) -> T {
14022 return self.per_N.clone() * T::from(9.8066500286389_f64);
14023 }
14024
14025 pub fn from_per_kgG(per_kgG: T) -> Self {
14032 InverseForce{per_N: per_kgG * T::from(0.101971620999999_f64)}
14033 }
14034
14035 pub fn to_per_mN(&self) -> T {
14039 return self.per_N.clone() * T::from(0.001_f64);
14040 }
14041
14042 pub fn from_per_mN(per_mN: T) -> Self {
14049 InverseForce{per_N: per_mN * T::from(1000.0_f64)}
14050 }
14051
14052 pub fn to_per_uN(&self) -> T {
14056 return self.per_N.clone() * T::from(1e-06_f64);
14057 }
14058
14059 pub fn from_per_uN(per_uN: T) -> Self {
14066 InverseForce{per_N: per_uN * T::from(1000000.0_f64)}
14067 }
14068
14069 pub fn to_per_nN(&self) -> T {
14073 return self.per_N.clone() * T::from(1e-09_f64);
14074 }
14075
14076 pub fn from_per_nN(per_nN: T) -> Self {
14083 InverseForce{per_N: per_nN * T::from(1000000000.0_f64)}
14084 }
14085
14086 pub fn to_per_kN(&self) -> T {
14090 return self.per_N.clone() * T::from(1000.0_f64);
14091 }
14092
14093 pub fn from_per_kN(per_kN: T) -> Self {
14100 InverseForce{per_N: per_kN * T::from(0.001_f64)}
14101 }
14102
14103 pub fn to_per_MN(&self) -> T {
14107 return self.per_N.clone() * T::from(1000000.0_f64);
14108 }
14109
14110 pub fn from_per_MN(per_MN: T) -> Self {
14117 InverseForce{per_N: per_MN * T::from(1e-06_f64)}
14118 }
14119
14120 pub fn to_per_GN(&self) -> T {
14124 return self.per_N.clone() * T::from(1000000000.0_f64);
14125 }
14126
14127 pub fn from_per_GN(per_GN: T) -> Self {
14134 InverseForce{per_N: per_GN * T::from(1e-09_f64)}
14135 }
14136
14137}
14138
14139
14140#[cfg(feature="num-bigfloat")]
14142impl core::ops::Mul<InverseForce<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
14143 type Output = InverseForce<num_bigfloat::BigFloat>;
14144 fn mul(self, rhs: InverseForce<num_bigfloat::BigFloat>) -> Self::Output {
14145 InverseForce{per_N: self * rhs.per_N}
14146 }
14147}
14148#[cfg(feature="num-bigfloat")]
14150impl core::ops::Mul<InverseForce<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
14151 type Output = InverseForce<num_bigfloat::BigFloat>;
14152 fn mul(self, rhs: InverseForce<num_bigfloat::BigFloat>) -> Self::Output {
14153 InverseForce{per_N: self.clone() * rhs.per_N}
14154 }
14155}
14156#[cfg(feature="num-bigfloat")]
14158impl core::ops::Mul<&InverseForce<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
14159 type Output = InverseForce<num_bigfloat::BigFloat>;
14160 fn mul(self, rhs: &InverseForce<num_bigfloat::BigFloat>) -> Self::Output {
14161 InverseForce{per_N: self * rhs.per_N.clone()}
14162 }
14163}
14164#[cfg(feature="num-bigfloat")]
14166impl core::ops::Mul<&InverseForce<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
14167 type Output = InverseForce<num_bigfloat::BigFloat>;
14168 fn mul(self, rhs: &InverseForce<num_bigfloat::BigFloat>) -> Self::Output {
14169 InverseForce{per_N: self.clone() * rhs.per_N.clone()}
14170 }
14171}
14172
14173#[cfg(feature="num-complex")]
14175impl core::ops::Mul<InverseForce<num_complex::Complex32>> for num_complex::Complex32 {
14176 type Output = InverseForce<num_complex::Complex32>;
14177 fn mul(self, rhs: InverseForce<num_complex::Complex32>) -> Self::Output {
14178 InverseForce{per_N: self * rhs.per_N}
14179 }
14180}
14181#[cfg(feature="num-complex")]
14183impl core::ops::Mul<InverseForce<num_complex::Complex32>> for &num_complex::Complex32 {
14184 type Output = InverseForce<num_complex::Complex32>;
14185 fn mul(self, rhs: InverseForce<num_complex::Complex32>) -> Self::Output {
14186 InverseForce{per_N: self.clone() * rhs.per_N}
14187 }
14188}
14189#[cfg(feature="num-complex")]
14191impl core::ops::Mul<&InverseForce<num_complex::Complex32>> for num_complex::Complex32 {
14192 type Output = InverseForce<num_complex::Complex32>;
14193 fn mul(self, rhs: &InverseForce<num_complex::Complex32>) -> Self::Output {
14194 InverseForce{per_N: self * rhs.per_N.clone()}
14195 }
14196}
14197#[cfg(feature="num-complex")]
14199impl core::ops::Mul<&InverseForce<num_complex::Complex32>> for &num_complex::Complex32 {
14200 type Output = InverseForce<num_complex::Complex32>;
14201 fn mul(self, rhs: &InverseForce<num_complex::Complex32>) -> Self::Output {
14202 InverseForce{per_N: self.clone() * rhs.per_N.clone()}
14203 }
14204}
14205
14206#[cfg(feature="num-complex")]
14208impl core::ops::Mul<InverseForce<num_complex::Complex64>> for num_complex::Complex64 {
14209 type Output = InverseForce<num_complex::Complex64>;
14210 fn mul(self, rhs: InverseForce<num_complex::Complex64>) -> Self::Output {
14211 InverseForce{per_N: self * rhs.per_N}
14212 }
14213}
14214#[cfg(feature="num-complex")]
14216impl core::ops::Mul<InverseForce<num_complex::Complex64>> for &num_complex::Complex64 {
14217 type Output = InverseForce<num_complex::Complex64>;
14218 fn mul(self, rhs: InverseForce<num_complex::Complex64>) -> Self::Output {
14219 InverseForce{per_N: self.clone() * rhs.per_N}
14220 }
14221}
14222#[cfg(feature="num-complex")]
14224impl core::ops::Mul<&InverseForce<num_complex::Complex64>> for num_complex::Complex64 {
14225 type Output = InverseForce<num_complex::Complex64>;
14226 fn mul(self, rhs: &InverseForce<num_complex::Complex64>) -> Self::Output {
14227 InverseForce{per_N: self * rhs.per_N.clone()}
14228 }
14229}
14230#[cfg(feature="num-complex")]
14232impl core::ops::Mul<&InverseForce<num_complex::Complex64>> for &num_complex::Complex64 {
14233 type Output = InverseForce<num_complex::Complex64>;
14234 fn mul(self, rhs: &InverseForce<num_complex::Complex64>) -> Self::Output {
14235 InverseForce{per_N: self.clone() * rhs.per_N.clone()}
14236 }
14237}
14238
14239
14240
14241
14242impl<T> core::ops::Div<Distance<T>> for InverseForce<T> where T: NumLike {
14245 type Output = InverseEnergy<T>;
14246 fn div(self, rhs: Distance<T>) -> Self::Output {
14247 InverseEnergy{per_J: self.per_N / rhs.m}
14248 }
14249}
14250impl<T> core::ops::Div<Distance<T>> for &InverseForce<T> where T: NumLike {
14252 type Output = InverseEnergy<T>;
14253 fn div(self, rhs: Distance<T>) -> Self::Output {
14254 InverseEnergy{per_J: self.per_N.clone() / rhs.m}
14255 }
14256}
14257impl<T> core::ops::Div<&Distance<T>> for InverseForce<T> where T: NumLike {
14259 type Output = InverseEnergy<T>;
14260 fn div(self, rhs: &Distance<T>) -> Self::Output {
14261 InverseEnergy{per_J: self.per_N / rhs.m.clone()}
14262 }
14263}
14264impl<T> core::ops::Div<&Distance<T>> for &InverseForce<T> where T: NumLike {
14266 type Output = InverseEnergy<T>;
14267 fn div(self, rhs: &Distance<T>) -> Self::Output {
14268 InverseEnergy{per_J: self.per_N.clone() / rhs.m.clone()}
14269 }
14270}
14271
14272impl<T> core::ops::Mul<InverseDistance<T>> for InverseForce<T> where T: NumLike {
14275 type Output = InverseEnergy<T>;
14276 fn mul(self, rhs: InverseDistance<T>) -> Self::Output {
14277 InverseEnergy{per_J: self.per_N * rhs.per_m}
14278 }
14279}
14280impl<T> core::ops::Mul<InverseDistance<T>> for &InverseForce<T> where T: NumLike {
14282 type Output = InverseEnergy<T>;
14283 fn mul(self, rhs: InverseDistance<T>) -> Self::Output {
14284 InverseEnergy{per_J: self.per_N.clone() * rhs.per_m}
14285 }
14286}
14287impl<T> core::ops::Mul<&InverseDistance<T>> for InverseForce<T> where T: NumLike {
14289 type Output = InverseEnergy<T>;
14290 fn mul(self, rhs: &InverseDistance<T>) -> Self::Output {
14291 InverseEnergy{per_J: self.per_N * rhs.per_m.clone()}
14292 }
14293}
14294impl<T> core::ops::Mul<&InverseDistance<T>> for &InverseForce<T> where T: NumLike {
14296 type Output = InverseEnergy<T>;
14297 fn mul(self, rhs: &InverseDistance<T>) -> Self::Output {
14298 InverseEnergy{per_J: self.per_N.clone() * rhs.per_m.clone()}
14299 }
14300}
14301
14302impl<T> core::ops::Div<InverseMass<T>> for InverseForce<T> where T: NumLike {
14305 type Output = InverseAcceleration<T>;
14306 fn div(self, rhs: InverseMass<T>) -> Self::Output {
14307 InverseAcceleration{s2pm: self.per_N / rhs.per_kg}
14308 }
14309}
14310impl<T> core::ops::Div<InverseMass<T>> for &InverseForce<T> where T: NumLike {
14312 type Output = InverseAcceleration<T>;
14313 fn div(self, rhs: InverseMass<T>) -> Self::Output {
14314 InverseAcceleration{s2pm: self.per_N.clone() / rhs.per_kg}
14315 }
14316}
14317impl<T> core::ops::Div<&InverseMass<T>> for InverseForce<T> where T: NumLike {
14319 type Output = InverseAcceleration<T>;
14320 fn div(self, rhs: &InverseMass<T>) -> Self::Output {
14321 InverseAcceleration{s2pm: self.per_N / rhs.per_kg.clone()}
14322 }
14323}
14324impl<T> core::ops::Div<&InverseMass<T>> for &InverseForce<T> where T: NumLike {
14326 type Output = InverseAcceleration<T>;
14327 fn div(self, rhs: &InverseMass<T>) -> Self::Output {
14328 InverseAcceleration{s2pm: self.per_N.clone() / rhs.per_kg.clone()}
14329 }
14330}
14331
14332impl<T> core::ops::Mul<Mass<T>> for InverseForce<T> where T: NumLike {
14335 type Output = InverseAcceleration<T>;
14336 fn mul(self, rhs: Mass<T>) -> Self::Output {
14337 InverseAcceleration{s2pm: self.per_N * rhs.kg}
14338 }
14339}
14340impl<T> core::ops::Mul<Mass<T>> for &InverseForce<T> where T: NumLike {
14342 type Output = InverseAcceleration<T>;
14343 fn mul(self, rhs: Mass<T>) -> Self::Output {
14344 InverseAcceleration{s2pm: self.per_N.clone() * rhs.kg}
14345 }
14346}
14347impl<T> core::ops::Mul<&Mass<T>> for InverseForce<T> where T: NumLike {
14349 type Output = InverseAcceleration<T>;
14350 fn mul(self, rhs: &Mass<T>) -> Self::Output {
14351 InverseAcceleration{s2pm: self.per_N * rhs.kg.clone()}
14352 }
14353}
14354impl<T> core::ops::Mul<&Mass<T>> for &InverseForce<T> where T: NumLike {
14356 type Output = InverseAcceleration<T>;
14357 fn mul(self, rhs: &Mass<T>) -> Self::Output {
14358 InverseAcceleration{s2pm: self.per_N.clone() * rhs.kg.clone()}
14359 }
14360}
14361
14362impl<T> core::ops::Div<Time<T>> for InverseForce<T> where T: NumLike {
14365 type Output = InverseMomentum<T>;
14366 fn div(self, rhs: Time<T>) -> Self::Output {
14367 InverseMomentum{s_per_kgm: self.per_N / rhs.s}
14368 }
14369}
14370impl<T> core::ops::Div<Time<T>> for &InverseForce<T> where T: NumLike {
14372 type Output = InverseMomentum<T>;
14373 fn div(self, rhs: Time<T>) -> Self::Output {
14374 InverseMomentum{s_per_kgm: self.per_N.clone() / rhs.s}
14375 }
14376}
14377impl<T> core::ops::Div<&Time<T>> for InverseForce<T> where T: NumLike {
14379 type Output = InverseMomentum<T>;
14380 fn div(self, rhs: &Time<T>) -> Self::Output {
14381 InverseMomentum{s_per_kgm: self.per_N / rhs.s.clone()}
14382 }
14383}
14384impl<T> core::ops::Div<&Time<T>> for &InverseForce<T> where T: NumLike {
14386 type Output = InverseMomentum<T>;
14387 fn div(self, rhs: &Time<T>) -> Self::Output {
14388 InverseMomentum{s_per_kgm: self.per_N.clone() / rhs.s.clone()}
14389 }
14390}
14391
14392impl<T> core::ops::Mul<Area<T>> for InverseForce<T> where T: NumLike {
14395 type Output = InversePressure<T>;
14396 fn mul(self, rhs: Area<T>) -> Self::Output {
14397 InversePressure{per_Pa: self.per_N * rhs.m2}
14398 }
14399}
14400impl<T> core::ops::Mul<Area<T>> for &InverseForce<T> where T: NumLike {
14402 type Output = InversePressure<T>;
14403 fn mul(self, rhs: Area<T>) -> Self::Output {
14404 InversePressure{per_Pa: self.per_N.clone() * rhs.m2}
14405 }
14406}
14407impl<T> core::ops::Mul<&Area<T>> for InverseForce<T> where T: NumLike {
14409 type Output = InversePressure<T>;
14410 fn mul(self, rhs: &Area<T>) -> Self::Output {
14411 InversePressure{per_Pa: self.per_N * rhs.m2.clone()}
14412 }
14413}
14414impl<T> core::ops::Mul<&Area<T>> for &InverseForce<T> where T: NumLike {
14416 type Output = InversePressure<T>;
14417 fn mul(self, rhs: &Area<T>) -> Self::Output {
14418 InversePressure{per_Pa: self.per_N.clone() * rhs.m2.clone()}
14419 }
14420}
14421
14422impl<T> core::ops::Div<InverseArea<T>> for InverseForce<T> where T: NumLike {
14425 type Output = InversePressure<T>;
14426 fn div(self, rhs: InverseArea<T>) -> Self::Output {
14427 InversePressure{per_Pa: self.per_N / rhs.per_m2}
14428 }
14429}
14430impl<T> core::ops::Div<InverseArea<T>> for &InverseForce<T> where T: NumLike {
14432 type Output = InversePressure<T>;
14433 fn div(self, rhs: InverseArea<T>) -> Self::Output {
14434 InversePressure{per_Pa: self.per_N.clone() / rhs.per_m2}
14435 }
14436}
14437impl<T> core::ops::Div<&InverseArea<T>> for InverseForce<T> where T: NumLike {
14439 type Output = InversePressure<T>;
14440 fn div(self, rhs: &InverseArea<T>) -> Self::Output {
14441 InversePressure{per_Pa: self.per_N / rhs.per_m2.clone()}
14442 }
14443}
14444impl<T> core::ops::Div<&InverseArea<T>> for &InverseForce<T> where T: NumLike {
14446 type Output = InversePressure<T>;
14447 fn div(self, rhs: &InverseArea<T>) -> Self::Output {
14448 InversePressure{per_Pa: self.per_N.clone() / rhs.per_m2.clone()}
14449 }
14450}
14451
14452impl<T> core::ops::Mul<Acceleration<T>> for InverseForce<T> where T: NumLike {
14455 type Output = InverseMass<T>;
14456 fn mul(self, rhs: Acceleration<T>) -> Self::Output {
14457 InverseMass{per_kg: self.per_N * rhs.mps2}
14458 }
14459}
14460impl<T> core::ops::Mul<Acceleration<T>> for &InverseForce<T> where T: NumLike {
14462 type Output = InverseMass<T>;
14463 fn mul(self, rhs: Acceleration<T>) -> Self::Output {
14464 InverseMass{per_kg: self.per_N.clone() * rhs.mps2}
14465 }
14466}
14467impl<T> core::ops::Mul<&Acceleration<T>> for InverseForce<T> where T: NumLike {
14469 type Output = InverseMass<T>;
14470 fn mul(self, rhs: &Acceleration<T>) -> Self::Output {
14471 InverseMass{per_kg: self.per_N * rhs.mps2.clone()}
14472 }
14473}
14474impl<T> core::ops::Mul<&Acceleration<T>> for &InverseForce<T> where T: NumLike {
14476 type Output = InverseMass<T>;
14477 fn mul(self, rhs: &Acceleration<T>) -> Self::Output {
14478 InverseMass{per_kg: self.per_N.clone() * rhs.mps2.clone()}
14479 }
14480}
14481
14482impl<T> core::ops::Mul<Energy<T>> for InverseForce<T> where T: NumLike {
14485 type Output = Distance<T>;
14486 fn mul(self, rhs: Energy<T>) -> Self::Output {
14487 Distance{m: self.per_N * rhs.J}
14488 }
14489}
14490impl<T> core::ops::Mul<Energy<T>> for &InverseForce<T> where T: NumLike {
14492 type Output = Distance<T>;
14493 fn mul(self, rhs: Energy<T>) -> Self::Output {
14494 Distance{m: self.per_N.clone() * rhs.J}
14495 }
14496}
14497impl<T> core::ops::Mul<&Energy<T>> for InverseForce<T> where T: NumLike {
14499 type Output = Distance<T>;
14500 fn mul(self, rhs: &Energy<T>) -> Self::Output {
14501 Distance{m: self.per_N * rhs.J.clone()}
14502 }
14503}
14504impl<T> core::ops::Mul<&Energy<T>> for &InverseForce<T> where T: NumLike {
14506 type Output = Distance<T>;
14507 fn mul(self, rhs: &Energy<T>) -> Self::Output {
14508 Distance{m: self.per_N.clone() * rhs.J.clone()}
14509 }
14510}
14511
14512impl<T> core::ops::Mul<Torque<T>> for InverseForce<T> where T: NumLike {
14515 type Output = Distance<T>;
14516 fn mul(self, rhs: Torque<T>) -> Self::Output {
14517 Distance{m: self.per_N * rhs.Nm}
14518 }
14519}
14520impl<T> core::ops::Mul<Torque<T>> for &InverseForce<T> where T: NumLike {
14522 type Output = Distance<T>;
14523 fn mul(self, rhs: Torque<T>) -> Self::Output {
14524 Distance{m: self.per_N.clone() * rhs.Nm}
14525 }
14526}
14527impl<T> core::ops::Mul<&Torque<T>> for InverseForce<T> where T: NumLike {
14529 type Output = Distance<T>;
14530 fn mul(self, rhs: &Torque<T>) -> Self::Output {
14531 Distance{m: self.per_N * rhs.Nm.clone()}
14532 }
14533}
14534impl<T> core::ops::Mul<&Torque<T>> for &InverseForce<T> where T: NumLike {
14536 type Output = Distance<T>;
14537 fn mul(self, rhs: &Torque<T>) -> Self::Output {
14538 Distance{m: self.per_N.clone() * rhs.Nm.clone()}
14539 }
14540}
14541
14542impl<T> core::ops::Mul<Frequency<T>> for InverseForce<T> where T: NumLike {
14545 type Output = InverseMomentum<T>;
14546 fn mul(self, rhs: Frequency<T>) -> Self::Output {
14547 InverseMomentum{s_per_kgm: self.per_N * rhs.Hz}
14548 }
14549}
14550impl<T> core::ops::Mul<Frequency<T>> for &InverseForce<T> where T: NumLike {
14552 type Output = InverseMomentum<T>;
14553 fn mul(self, rhs: Frequency<T>) -> Self::Output {
14554 InverseMomentum{s_per_kgm: self.per_N.clone() * rhs.Hz}
14555 }
14556}
14557impl<T> core::ops::Mul<&Frequency<T>> for InverseForce<T> where T: NumLike {
14559 type Output = InverseMomentum<T>;
14560 fn mul(self, rhs: &Frequency<T>) -> Self::Output {
14561 InverseMomentum{s_per_kgm: self.per_N * rhs.Hz.clone()}
14562 }
14563}
14564impl<T> core::ops::Mul<&Frequency<T>> for &InverseForce<T> where T: NumLike {
14566 type Output = InverseMomentum<T>;
14567 fn mul(self, rhs: &Frequency<T>) -> Self::Output {
14568 InverseMomentum{s_per_kgm: self.per_N.clone() * rhs.Hz.clone()}
14569 }
14570}
14571
14572impl<T> core::ops::Div<InverseAcceleration<T>> for InverseForce<T> where T: NumLike {
14575 type Output = InverseMass<T>;
14576 fn div(self, rhs: InverseAcceleration<T>) -> Self::Output {
14577 InverseMass{per_kg: self.per_N / rhs.s2pm}
14578 }
14579}
14580impl<T> core::ops::Div<InverseAcceleration<T>> for &InverseForce<T> where T: NumLike {
14582 type Output = InverseMass<T>;
14583 fn div(self, rhs: InverseAcceleration<T>) -> Self::Output {
14584 InverseMass{per_kg: self.per_N.clone() / rhs.s2pm}
14585 }
14586}
14587impl<T> core::ops::Div<&InverseAcceleration<T>> for InverseForce<T> where T: NumLike {
14589 type Output = InverseMass<T>;
14590 fn div(self, rhs: &InverseAcceleration<T>) -> Self::Output {
14591 InverseMass{per_kg: self.per_N / rhs.s2pm.clone()}
14592 }
14593}
14594impl<T> core::ops::Div<&InverseAcceleration<T>> for &InverseForce<T> where T: NumLike {
14596 type Output = InverseMass<T>;
14597 fn div(self, rhs: &InverseAcceleration<T>) -> Self::Output {
14598 InverseMass{per_kg: self.per_N.clone() / rhs.s2pm.clone()}
14599 }
14600}
14601
14602impl<T> core::ops::Div<InverseEnergy<T>> for InverseForce<T> where T: NumLike {
14605 type Output = Distance<T>;
14606 fn div(self, rhs: InverseEnergy<T>) -> Self::Output {
14607 Distance{m: self.per_N / rhs.per_J}
14608 }
14609}
14610impl<T> core::ops::Div<InverseEnergy<T>> for &InverseForce<T> where T: NumLike {
14612 type Output = Distance<T>;
14613 fn div(self, rhs: InverseEnergy<T>) -> Self::Output {
14614 Distance{m: self.per_N.clone() / rhs.per_J}
14615 }
14616}
14617impl<T> core::ops::Div<&InverseEnergy<T>> for InverseForce<T> where T: NumLike {
14619 type Output = Distance<T>;
14620 fn div(self, rhs: &InverseEnergy<T>) -> Self::Output {
14621 Distance{m: self.per_N / rhs.per_J.clone()}
14622 }
14623}
14624impl<T> core::ops::Div<&InverseEnergy<T>> for &InverseForce<T> where T: NumLike {
14626 type Output = Distance<T>;
14627 fn div(self, rhs: &InverseEnergy<T>) -> Self::Output {
14628 Distance{m: self.per_N.clone() / rhs.per_J.clone()}
14629 }
14630}
14631
14632impl<T> core::ops::Div<InverseTorque<T>> for InverseForce<T> where T: NumLike {
14635 type Output = Distance<T>;
14636 fn div(self, rhs: InverseTorque<T>) -> Self::Output {
14637 Distance{m: self.per_N / rhs.per_Nm}
14638 }
14639}
14640impl<T> core::ops::Div<InverseTorque<T>> for &InverseForce<T> where T: NumLike {
14642 type Output = Distance<T>;
14643 fn div(self, rhs: InverseTorque<T>) -> Self::Output {
14644 Distance{m: self.per_N.clone() / rhs.per_Nm}
14645 }
14646}
14647impl<T> core::ops::Div<&InverseTorque<T>> for InverseForce<T> where T: NumLike {
14649 type Output = Distance<T>;
14650 fn div(self, rhs: &InverseTorque<T>) -> Self::Output {
14651 Distance{m: self.per_N / rhs.per_Nm.clone()}
14652 }
14653}
14654impl<T> core::ops::Div<&InverseTorque<T>> for &InverseForce<T> where T: NumLike {
14656 type Output = Distance<T>;
14657 fn div(self, rhs: &InverseTorque<T>) -> Self::Output {
14658 Distance{m: self.per_N.clone() / rhs.per_Nm.clone()}
14659 }
14660}
14661
14662impl<T> core::ops::Div<InverseMomentum<T>> for InverseForce<T> where T: NumLike {
14665 type Output = Time<T>;
14666 fn div(self, rhs: InverseMomentum<T>) -> Self::Output {
14667 Time{s: self.per_N / rhs.s_per_kgm}
14668 }
14669}
14670impl<T> core::ops::Div<InverseMomentum<T>> for &InverseForce<T> where T: NumLike {
14672 type Output = Time<T>;
14673 fn div(self, rhs: InverseMomentum<T>) -> Self::Output {
14674 Time{s: self.per_N.clone() / rhs.s_per_kgm}
14675 }
14676}
14677impl<T> core::ops::Div<&InverseMomentum<T>> for InverseForce<T> where T: NumLike {
14679 type Output = Time<T>;
14680 fn div(self, rhs: &InverseMomentum<T>) -> Self::Output {
14681 Time{s: self.per_N / rhs.s_per_kgm.clone()}
14682 }
14683}
14684impl<T> core::ops::Div<&InverseMomentum<T>> for &InverseForce<T> where T: NumLike {
14686 type Output = Time<T>;
14687 fn div(self, rhs: &InverseMomentum<T>) -> Self::Output {
14688 Time{s: self.per_N.clone() / rhs.s_per_kgm.clone()}
14689 }
14690}
14691
14692impl<T> core::ops::Div<InversePower<T>> for InverseForce<T> where T: NumLike {
14695 type Output = Velocity<T>;
14696 fn div(self, rhs: InversePower<T>) -> Self::Output {
14697 Velocity{mps: self.per_N / rhs.per_W}
14698 }
14699}
14700impl<T> core::ops::Div<InversePower<T>> for &InverseForce<T> where T: NumLike {
14702 type Output = Velocity<T>;
14703 fn div(self, rhs: InversePower<T>) -> Self::Output {
14704 Velocity{mps: self.per_N.clone() / rhs.per_W}
14705 }
14706}
14707impl<T> core::ops::Div<&InversePower<T>> for InverseForce<T> where T: NumLike {
14709 type Output = Velocity<T>;
14710 fn div(self, rhs: &InversePower<T>) -> Self::Output {
14711 Velocity{mps: self.per_N / rhs.per_W.clone()}
14712 }
14713}
14714impl<T> core::ops::Div<&InversePower<T>> for &InverseForce<T> where T: NumLike {
14716 type Output = Velocity<T>;
14717 fn div(self, rhs: &InversePower<T>) -> Self::Output {
14718 Velocity{mps: self.per_N.clone() / rhs.per_W.clone()}
14719 }
14720}
14721
14722impl<T> core::ops::Div<InversePressure<T>> for InverseForce<T> where T: NumLike {
14725 type Output = InverseArea<T>;
14726 fn div(self, rhs: InversePressure<T>) -> Self::Output {
14727 InverseArea{per_m2: self.per_N / rhs.per_Pa}
14728 }
14729}
14730impl<T> core::ops::Div<InversePressure<T>> for &InverseForce<T> where T: NumLike {
14732 type Output = InverseArea<T>;
14733 fn div(self, rhs: InversePressure<T>) -> Self::Output {
14734 InverseArea{per_m2: self.per_N.clone() / rhs.per_Pa}
14735 }
14736}
14737impl<T> core::ops::Div<&InversePressure<T>> for InverseForce<T> where T: NumLike {
14739 type Output = InverseArea<T>;
14740 fn div(self, rhs: &InversePressure<T>) -> Self::Output {
14741 InverseArea{per_m2: self.per_N / rhs.per_Pa.clone()}
14742 }
14743}
14744impl<T> core::ops::Div<&InversePressure<T>> for &InverseForce<T> where T: NumLike {
14746 type Output = InverseArea<T>;
14747 fn div(self, rhs: &InversePressure<T>) -> Self::Output {
14748 InverseArea{per_m2: self.per_N.clone() / rhs.per_Pa.clone()}
14749 }
14750}
14751
14752impl<T> core::ops::Mul<Momentum<T>> for InverseForce<T> where T: NumLike {
14755 type Output = Time<T>;
14756 fn mul(self, rhs: Momentum<T>) -> Self::Output {
14757 Time{s: self.per_N * rhs.kgmps}
14758 }
14759}
14760impl<T> core::ops::Mul<Momentum<T>> for &InverseForce<T> where T: NumLike {
14762 type Output = Time<T>;
14763 fn mul(self, rhs: Momentum<T>) -> Self::Output {
14764 Time{s: self.per_N.clone() * rhs.kgmps}
14765 }
14766}
14767impl<T> core::ops::Mul<&Momentum<T>> for InverseForce<T> where T: NumLike {
14769 type Output = Time<T>;
14770 fn mul(self, rhs: &Momentum<T>) -> Self::Output {
14771 Time{s: self.per_N * rhs.kgmps.clone()}
14772 }
14773}
14774impl<T> core::ops::Mul<&Momentum<T>> for &InverseForce<T> where T: NumLike {
14776 type Output = Time<T>;
14777 fn mul(self, rhs: &Momentum<T>) -> Self::Output {
14778 Time{s: self.per_N.clone() * rhs.kgmps.clone()}
14779 }
14780}
14781
14782impl<T> core::ops::Mul<Power<T>> for InverseForce<T> where T: NumLike {
14785 type Output = Velocity<T>;
14786 fn mul(self, rhs: Power<T>) -> Self::Output {
14787 Velocity{mps: self.per_N * rhs.W}
14788 }
14789}
14790impl<T> core::ops::Mul<Power<T>> for &InverseForce<T> where T: NumLike {
14792 type Output = Velocity<T>;
14793 fn mul(self, rhs: Power<T>) -> Self::Output {
14794 Velocity{mps: self.per_N.clone() * rhs.W}
14795 }
14796}
14797impl<T> core::ops::Mul<&Power<T>> for InverseForce<T> where T: NumLike {
14799 type Output = Velocity<T>;
14800 fn mul(self, rhs: &Power<T>) -> Self::Output {
14801 Velocity{mps: self.per_N * rhs.W.clone()}
14802 }
14803}
14804impl<T> core::ops::Mul<&Power<T>> for &InverseForce<T> where T: NumLike {
14806 type Output = Velocity<T>;
14807 fn mul(self, rhs: &Power<T>) -> Self::Output {
14808 Velocity{mps: self.per_N.clone() * rhs.W.clone()}
14809 }
14810}
14811
14812impl<T> core::ops::Mul<Pressure<T>> for InverseForce<T> where T: NumLike {
14815 type Output = InverseArea<T>;
14816 fn mul(self, rhs: Pressure<T>) -> Self::Output {
14817 InverseArea{per_m2: self.per_N * rhs.Pa}
14818 }
14819}
14820impl<T> core::ops::Mul<Pressure<T>> for &InverseForce<T> where T: NumLike {
14822 type Output = InverseArea<T>;
14823 fn mul(self, rhs: Pressure<T>) -> Self::Output {
14824 InverseArea{per_m2: self.per_N.clone() * rhs.Pa}
14825 }
14826}
14827impl<T> core::ops::Mul<&Pressure<T>> for InverseForce<T> where T: NumLike {
14829 type Output = InverseArea<T>;
14830 fn mul(self, rhs: &Pressure<T>) -> Self::Output {
14831 InverseArea{per_m2: self.per_N * rhs.Pa.clone()}
14832 }
14833}
14834impl<T> core::ops::Mul<&Pressure<T>> for &InverseForce<T> where T: NumLike {
14836 type Output = InverseArea<T>;
14837 fn mul(self, rhs: &Pressure<T>) -> Self::Output {
14838 InverseArea{per_m2: self.per_N.clone() * rhs.Pa.clone()}
14839 }
14840}
14841
14842impl<T> core::ops::Mul<TimePerDistance<T>> for InverseForce<T> where T: NumLike {
14845 type Output = InversePower<T>;
14846 fn mul(self, rhs: TimePerDistance<T>) -> Self::Output {
14847 InversePower{per_W: self.per_N * rhs.spm}
14848 }
14849}
14850impl<T> core::ops::Mul<TimePerDistance<T>> for &InverseForce<T> where T: NumLike {
14852 type Output = InversePower<T>;
14853 fn mul(self, rhs: TimePerDistance<T>) -> Self::Output {
14854 InversePower{per_W: self.per_N.clone() * rhs.spm}
14855 }
14856}
14857impl<T> core::ops::Mul<&TimePerDistance<T>> for InverseForce<T> where T: NumLike {
14859 type Output = InversePower<T>;
14860 fn mul(self, rhs: &TimePerDistance<T>) -> Self::Output {
14861 InversePower{per_W: self.per_N * rhs.spm.clone()}
14862 }
14863}
14864impl<T> core::ops::Mul<&TimePerDistance<T>> for &InverseForce<T> where T: NumLike {
14866 type Output = InversePower<T>;
14867 fn mul(self, rhs: &TimePerDistance<T>) -> Self::Output {
14868 InversePower{per_W: self.per_N.clone() * rhs.spm.clone()}
14869 }
14870}
14871
14872impl<T> core::ops::Div<Velocity<T>> for InverseForce<T> where T: NumLike {
14875 type Output = InversePower<T>;
14876 fn div(self, rhs: Velocity<T>) -> Self::Output {
14877 InversePower{per_W: self.per_N / rhs.mps}
14878 }
14879}
14880impl<T> core::ops::Div<Velocity<T>> for &InverseForce<T> where T: NumLike {
14882 type Output = InversePower<T>;
14883 fn div(self, rhs: Velocity<T>) -> Self::Output {
14884 InversePower{per_W: self.per_N.clone() / rhs.mps}
14885 }
14886}
14887impl<T> core::ops::Div<&Velocity<T>> for InverseForce<T> where T: NumLike {
14889 type Output = InversePower<T>;
14890 fn div(self, rhs: &Velocity<T>) -> Self::Output {
14891 InversePower{per_W: self.per_N / rhs.mps.clone()}
14892 }
14893}
14894impl<T> core::ops::Div<&Velocity<T>> for &InverseForce<T> where T: NumLike {
14896 type Output = InversePower<T>;
14897 fn div(self, rhs: &Velocity<T>) -> Self::Output {
14898 InversePower{per_W: self.per_N.clone() / rhs.mps.clone()}
14899 }
14900}
14901
14902impl<T> core::ops::Div<InverseForce<T>> for f64 where T: NumLike+From<f64> {
14905 type Output = Force<T>;
14906 fn div(self, rhs: InverseForce<T>) -> Self::Output {
14907 Force{N: T::from(self) / rhs.per_N}
14908 }
14909}
14910impl<T> core::ops::Div<InverseForce<T>> for &f64 where T: NumLike+From<f64> {
14912 type Output = Force<T>;
14913 fn div(self, rhs: InverseForce<T>) -> Self::Output {
14914 Force{N: T::from(self.clone()) / rhs.per_N}
14915 }
14916}
14917impl<T> core::ops::Div<&InverseForce<T>> for f64 where T: NumLike+From<f64> {
14919 type Output = Force<T>;
14920 fn div(self, rhs: &InverseForce<T>) -> Self::Output {
14921 Force{N: T::from(self) / rhs.per_N.clone()}
14922 }
14923}
14924impl<T> core::ops::Div<&InverseForce<T>> for &f64 where T: NumLike+From<f64> {
14926 type Output = Force<T>;
14927 fn div(self, rhs: &InverseForce<T>) -> Self::Output {
14928 Force{N: T::from(self.clone()) / rhs.per_N.clone()}
14929 }
14930}
14931
14932impl<T> core::ops::Div<InverseForce<T>> for f32 where T: NumLike+From<f32> {
14935 type Output = Force<T>;
14936 fn div(self, rhs: InverseForce<T>) -> Self::Output {
14937 Force{N: T::from(self) / rhs.per_N}
14938 }
14939}
14940impl<T> core::ops::Div<InverseForce<T>> for &f32 where T: NumLike+From<f32> {
14942 type Output = Force<T>;
14943 fn div(self, rhs: InverseForce<T>) -> Self::Output {
14944 Force{N: T::from(self.clone()) / rhs.per_N}
14945 }
14946}
14947impl<T> core::ops::Div<&InverseForce<T>> for f32 where T: NumLike+From<f32> {
14949 type Output = Force<T>;
14950 fn div(self, rhs: &InverseForce<T>) -> Self::Output {
14951 Force{N: T::from(self) / rhs.per_N.clone()}
14952 }
14953}
14954impl<T> core::ops::Div<&InverseForce<T>> for &f32 where T: NumLike+From<f32> {
14956 type Output = Force<T>;
14957 fn div(self, rhs: &InverseForce<T>) -> Self::Output {
14958 Force{N: T::from(self.clone()) / rhs.per_N.clone()}
14959 }
14960}
14961
14962impl<T> core::ops::Div<InverseForce<T>> for i64 where T: NumLike+From<i64> {
14965 type Output = Force<T>;
14966 fn div(self, rhs: InverseForce<T>) -> Self::Output {
14967 Force{N: T::from(self) / rhs.per_N}
14968 }
14969}
14970impl<T> core::ops::Div<InverseForce<T>> for &i64 where T: NumLike+From<i64> {
14972 type Output = Force<T>;
14973 fn div(self, rhs: InverseForce<T>) -> Self::Output {
14974 Force{N: T::from(self.clone()) / rhs.per_N}
14975 }
14976}
14977impl<T> core::ops::Div<&InverseForce<T>> for i64 where T: NumLike+From<i64> {
14979 type Output = Force<T>;
14980 fn div(self, rhs: &InverseForce<T>) -> Self::Output {
14981 Force{N: T::from(self) / rhs.per_N.clone()}
14982 }
14983}
14984impl<T> core::ops::Div<&InverseForce<T>> for &i64 where T: NumLike+From<i64> {
14986 type Output = Force<T>;
14987 fn div(self, rhs: &InverseForce<T>) -> Self::Output {
14988 Force{N: T::from(self.clone()) / rhs.per_N.clone()}
14989 }
14990}
14991
14992impl<T> core::ops::Div<InverseForce<T>> for i32 where T: NumLike+From<i32> {
14995 type Output = Force<T>;
14996 fn div(self, rhs: InverseForce<T>) -> Self::Output {
14997 Force{N: T::from(self) / rhs.per_N}
14998 }
14999}
15000impl<T> core::ops::Div<InverseForce<T>> for &i32 where T: NumLike+From<i32> {
15002 type Output = Force<T>;
15003 fn div(self, rhs: InverseForce<T>) -> Self::Output {
15004 Force{N: T::from(self.clone()) / rhs.per_N}
15005 }
15006}
15007impl<T> core::ops::Div<&InverseForce<T>> for i32 where T: NumLike+From<i32> {
15009 type Output = Force<T>;
15010 fn div(self, rhs: &InverseForce<T>) -> Self::Output {
15011 Force{N: T::from(self) / rhs.per_N.clone()}
15012 }
15013}
15014impl<T> core::ops::Div<&InverseForce<T>> for &i32 where T: NumLike+From<i32> {
15016 type Output = Force<T>;
15017 fn div(self, rhs: &InverseForce<T>) -> Self::Output {
15018 Force{N: T::from(self.clone()) / rhs.per_N.clone()}
15019 }
15020}
15021
15022#[cfg(feature="num-bigfloat")]
15025impl<T> core::ops::Div<InverseForce<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
15026 type Output = Force<T>;
15027 fn div(self, rhs: InverseForce<T>) -> Self::Output {
15028 Force{N: T::from(self) / rhs.per_N}
15029 }
15030}
15031#[cfg(feature="num-bigfloat")]
15033impl<T> core::ops::Div<InverseForce<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
15034 type Output = Force<T>;
15035 fn div(self, rhs: InverseForce<T>) -> Self::Output {
15036 Force{N: T::from(self.clone()) / rhs.per_N}
15037 }
15038}
15039#[cfg(feature="num-bigfloat")]
15041impl<T> core::ops::Div<&InverseForce<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
15042 type Output = Force<T>;
15043 fn div(self, rhs: &InverseForce<T>) -> Self::Output {
15044 Force{N: T::from(self) / rhs.per_N.clone()}
15045 }
15046}
15047#[cfg(feature="num-bigfloat")]
15049impl<T> core::ops::Div<&InverseForce<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
15050 type Output = Force<T>;
15051 fn div(self, rhs: &InverseForce<T>) -> Self::Output {
15052 Force{N: T::from(self.clone()) / rhs.per_N.clone()}
15053 }
15054}
15055
15056#[cfg(feature="num-complex")]
15059impl<T> core::ops::Div<InverseForce<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
15060 type Output = Force<T>;
15061 fn div(self, rhs: InverseForce<T>) -> Self::Output {
15062 Force{N: T::from(self) / rhs.per_N}
15063 }
15064}
15065#[cfg(feature="num-complex")]
15067impl<T> core::ops::Div<InverseForce<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
15068 type Output = Force<T>;
15069 fn div(self, rhs: InverseForce<T>) -> Self::Output {
15070 Force{N: T::from(self.clone()) / rhs.per_N}
15071 }
15072}
15073#[cfg(feature="num-complex")]
15075impl<T> core::ops::Div<&InverseForce<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
15076 type Output = Force<T>;
15077 fn div(self, rhs: &InverseForce<T>) -> Self::Output {
15078 Force{N: T::from(self) / rhs.per_N.clone()}
15079 }
15080}
15081#[cfg(feature="num-complex")]
15083impl<T> core::ops::Div<&InverseForce<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
15084 type Output = Force<T>;
15085 fn div(self, rhs: &InverseForce<T>) -> Self::Output {
15086 Force{N: T::from(self.clone()) / rhs.per_N.clone()}
15087 }
15088}
15089
15090#[cfg(feature="num-complex")]
15093impl<T> core::ops::Div<InverseForce<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
15094 type Output = Force<T>;
15095 fn div(self, rhs: InverseForce<T>) -> Self::Output {
15096 Force{N: T::from(self) / rhs.per_N}
15097 }
15098}
15099#[cfg(feature="num-complex")]
15101impl<T> core::ops::Div<InverseForce<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
15102 type Output = Force<T>;
15103 fn div(self, rhs: InverseForce<T>) -> Self::Output {
15104 Force{N: T::from(self.clone()) / rhs.per_N}
15105 }
15106}
15107#[cfg(feature="num-complex")]
15109impl<T> core::ops::Div<&InverseForce<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
15110 type Output = Force<T>;
15111 fn div(self, rhs: &InverseForce<T>) -> Self::Output {
15112 Force{N: T::from(self) / rhs.per_N.clone()}
15113 }
15114}
15115#[cfg(feature="num-complex")]
15117impl<T> core::ops::Div<&InverseForce<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
15118 type Output = Force<T>;
15119 fn div(self, rhs: &InverseForce<T>) -> Self::Output {
15120 Force{N: T::from(self.clone()) / rhs.per_N.clone()}
15121 }
15122}
15123
15124#[derive(UnitStruct, Debug, Clone)]
15126#[cfg_attr(feature="serde", derive(Serialize, Deserialize))]
15127pub struct InverseMomentOfInertia<T: NumLike>{
15128 pub per_kgm2: T
15130}
15131
15132impl<T> InverseMomentOfInertia<T> where T: NumLike {
15133
15134 pub fn unit_name() -> &'static str { "inverse kilogram meters squared" }
15136
15137 pub fn unit_symbol() -> &'static str { "1/kg·m²" }
15139
15140 pub fn from_per_kgm2(per_kgm2: T) -> Self { InverseMomentOfInertia{per_kgm2: per_kgm2} }
15145
15146 pub fn to_per_kgm2(&self) -> T { self.per_kgm2.clone() }
15148
15149 pub fn from_per_kilogram_meters_squared(per_kilogram_meters_squared: T) -> Self { InverseMomentOfInertia{per_kgm2: per_kilogram_meters_squared} }
15154
15155 pub fn to_per_kilogram_meters_squared(&self) -> T { self.per_kgm2.clone() }
15157
15158}
15159
15160impl<T> fmt::Display for InverseMomentOfInertia<T> where T: NumLike {
15161 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
15162 write!(f, "{} {}", &self.per_kgm2, Self::unit_symbol())
15163 }
15164}
15165
15166impl<T> InverseMomentOfInertia<T> where T: NumLike+From<f64> {
15167
15168 pub fn to_per_gcm2(&self) -> T {
15172 return self.per_kgm2.clone() * T::from(10.0_f64);
15173 }
15174
15175 pub fn from_per_gcm2(per_gcm2: T) -> Self {
15182 InverseMomentOfInertia{per_kgm2: per_gcm2 * T::from(0.1_f64)}
15183 }
15184
15185 pub fn to_per_gm2(&self) -> T {
15189 return self.per_kgm2.clone() * T::from(0.001_f64);
15190 }
15191
15192 pub fn from_per_gm2(per_gm2: T) -> Self {
15199 InverseMomentOfInertia{per_kgm2: per_gm2 * T::from(1000.0_f64)}
15200 }
15201
15202}
15203
15204
15205#[cfg(feature="num-bigfloat")]
15207impl core::ops::Mul<InverseMomentOfInertia<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
15208 type Output = InverseMomentOfInertia<num_bigfloat::BigFloat>;
15209 fn mul(self, rhs: InverseMomentOfInertia<num_bigfloat::BigFloat>) -> Self::Output {
15210 InverseMomentOfInertia{per_kgm2: self * rhs.per_kgm2}
15211 }
15212}
15213#[cfg(feature="num-bigfloat")]
15215impl core::ops::Mul<InverseMomentOfInertia<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
15216 type Output = InverseMomentOfInertia<num_bigfloat::BigFloat>;
15217 fn mul(self, rhs: InverseMomentOfInertia<num_bigfloat::BigFloat>) -> Self::Output {
15218 InverseMomentOfInertia{per_kgm2: self.clone() * rhs.per_kgm2}
15219 }
15220}
15221#[cfg(feature="num-bigfloat")]
15223impl core::ops::Mul<&InverseMomentOfInertia<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
15224 type Output = InverseMomentOfInertia<num_bigfloat::BigFloat>;
15225 fn mul(self, rhs: &InverseMomentOfInertia<num_bigfloat::BigFloat>) -> Self::Output {
15226 InverseMomentOfInertia{per_kgm2: self * rhs.per_kgm2.clone()}
15227 }
15228}
15229#[cfg(feature="num-bigfloat")]
15231impl core::ops::Mul<&InverseMomentOfInertia<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
15232 type Output = InverseMomentOfInertia<num_bigfloat::BigFloat>;
15233 fn mul(self, rhs: &InverseMomentOfInertia<num_bigfloat::BigFloat>) -> Self::Output {
15234 InverseMomentOfInertia{per_kgm2: self.clone() * rhs.per_kgm2.clone()}
15235 }
15236}
15237
15238#[cfg(feature="num-complex")]
15240impl core::ops::Mul<InverseMomentOfInertia<num_complex::Complex32>> for num_complex::Complex32 {
15241 type Output = InverseMomentOfInertia<num_complex::Complex32>;
15242 fn mul(self, rhs: InverseMomentOfInertia<num_complex::Complex32>) -> Self::Output {
15243 InverseMomentOfInertia{per_kgm2: self * rhs.per_kgm2}
15244 }
15245}
15246#[cfg(feature="num-complex")]
15248impl core::ops::Mul<InverseMomentOfInertia<num_complex::Complex32>> for &num_complex::Complex32 {
15249 type Output = InverseMomentOfInertia<num_complex::Complex32>;
15250 fn mul(self, rhs: InverseMomentOfInertia<num_complex::Complex32>) -> Self::Output {
15251 InverseMomentOfInertia{per_kgm2: self.clone() * rhs.per_kgm2}
15252 }
15253}
15254#[cfg(feature="num-complex")]
15256impl core::ops::Mul<&InverseMomentOfInertia<num_complex::Complex32>> for num_complex::Complex32 {
15257 type Output = InverseMomentOfInertia<num_complex::Complex32>;
15258 fn mul(self, rhs: &InverseMomentOfInertia<num_complex::Complex32>) -> Self::Output {
15259 InverseMomentOfInertia{per_kgm2: self * rhs.per_kgm2.clone()}
15260 }
15261}
15262#[cfg(feature="num-complex")]
15264impl core::ops::Mul<&InverseMomentOfInertia<num_complex::Complex32>> for &num_complex::Complex32 {
15265 type Output = InverseMomentOfInertia<num_complex::Complex32>;
15266 fn mul(self, rhs: &InverseMomentOfInertia<num_complex::Complex32>) -> Self::Output {
15267 InverseMomentOfInertia{per_kgm2: self.clone() * rhs.per_kgm2.clone()}
15268 }
15269}
15270
15271#[cfg(feature="num-complex")]
15273impl core::ops::Mul<InverseMomentOfInertia<num_complex::Complex64>> for num_complex::Complex64 {
15274 type Output = InverseMomentOfInertia<num_complex::Complex64>;
15275 fn mul(self, rhs: InverseMomentOfInertia<num_complex::Complex64>) -> Self::Output {
15276 InverseMomentOfInertia{per_kgm2: self * rhs.per_kgm2}
15277 }
15278}
15279#[cfg(feature="num-complex")]
15281impl core::ops::Mul<InverseMomentOfInertia<num_complex::Complex64>> for &num_complex::Complex64 {
15282 type Output = InverseMomentOfInertia<num_complex::Complex64>;
15283 fn mul(self, rhs: InverseMomentOfInertia<num_complex::Complex64>) -> Self::Output {
15284 InverseMomentOfInertia{per_kgm2: self.clone() * rhs.per_kgm2}
15285 }
15286}
15287#[cfg(feature="num-complex")]
15289impl core::ops::Mul<&InverseMomentOfInertia<num_complex::Complex64>> for num_complex::Complex64 {
15290 type Output = InverseMomentOfInertia<num_complex::Complex64>;
15291 fn mul(self, rhs: &InverseMomentOfInertia<num_complex::Complex64>) -> Self::Output {
15292 InverseMomentOfInertia{per_kgm2: self * rhs.per_kgm2.clone()}
15293 }
15294}
15295#[cfg(feature="num-complex")]
15297impl core::ops::Mul<&InverseMomentOfInertia<num_complex::Complex64>> for &num_complex::Complex64 {
15298 type Output = InverseMomentOfInertia<num_complex::Complex64>;
15299 fn mul(self, rhs: &InverseMomentOfInertia<num_complex::Complex64>) -> Self::Output {
15300 InverseMomentOfInertia{per_kgm2: self.clone() * rhs.per_kgm2.clone()}
15301 }
15302}
15303
15304
15305
15306
15307impl<T> core::ops::Div<InverseMass<T>> for InverseMomentOfInertia<T> where T: NumLike {
15310 type Output = InverseArea<T>;
15311 fn div(self, rhs: InverseMass<T>) -> Self::Output {
15312 InverseArea{per_m2: self.per_kgm2 / rhs.per_kg}
15313 }
15314}
15315impl<T> core::ops::Div<InverseMass<T>> for &InverseMomentOfInertia<T> where T: NumLike {
15317 type Output = InverseArea<T>;
15318 fn div(self, rhs: InverseMass<T>) -> Self::Output {
15319 InverseArea{per_m2: self.per_kgm2.clone() / rhs.per_kg}
15320 }
15321}
15322impl<T> core::ops::Div<&InverseMass<T>> for InverseMomentOfInertia<T> where T: NumLike {
15324 type Output = InverseArea<T>;
15325 fn div(self, rhs: &InverseMass<T>) -> Self::Output {
15326 InverseArea{per_m2: self.per_kgm2 / rhs.per_kg.clone()}
15327 }
15328}
15329impl<T> core::ops::Div<&InverseMass<T>> for &InverseMomentOfInertia<T> where T: NumLike {
15331 type Output = InverseArea<T>;
15332 fn div(self, rhs: &InverseMass<T>) -> Self::Output {
15333 InverseArea{per_m2: self.per_kgm2.clone() / rhs.per_kg.clone()}
15334 }
15335}
15336
15337impl<T> core::ops::Mul<Mass<T>> for InverseMomentOfInertia<T> where T: NumLike {
15340 type Output = InverseArea<T>;
15341 fn mul(self, rhs: Mass<T>) -> Self::Output {
15342 InverseArea{per_m2: self.per_kgm2 * rhs.kg}
15343 }
15344}
15345impl<T> core::ops::Mul<Mass<T>> for &InverseMomentOfInertia<T> where T: NumLike {
15347 type Output = InverseArea<T>;
15348 fn mul(self, rhs: Mass<T>) -> Self::Output {
15349 InverseArea{per_m2: self.per_kgm2.clone() * rhs.kg}
15350 }
15351}
15352impl<T> core::ops::Mul<&Mass<T>> for InverseMomentOfInertia<T> where T: NumLike {
15354 type Output = InverseArea<T>;
15355 fn mul(self, rhs: &Mass<T>) -> Self::Output {
15356 InverseArea{per_m2: self.per_kgm2 * rhs.kg.clone()}
15357 }
15358}
15359impl<T> core::ops::Mul<&Mass<T>> for &InverseMomentOfInertia<T> where T: NumLike {
15361 type Output = InverseArea<T>;
15362 fn mul(self, rhs: &Mass<T>) -> Self::Output {
15363 InverseArea{per_m2: self.per_kgm2.clone() * rhs.kg.clone()}
15364 }
15365}
15366
15367impl<T> core::ops::Mul<Area<T>> for InverseMomentOfInertia<T> where T: NumLike {
15370 type Output = InverseMass<T>;
15371 fn mul(self, rhs: Area<T>) -> Self::Output {
15372 InverseMass{per_kg: self.per_kgm2 * rhs.m2}
15373 }
15374}
15375impl<T> core::ops::Mul<Area<T>> for &InverseMomentOfInertia<T> where T: NumLike {
15377 type Output = InverseMass<T>;
15378 fn mul(self, rhs: Area<T>) -> Self::Output {
15379 InverseMass{per_kg: self.per_kgm2.clone() * rhs.m2}
15380 }
15381}
15382impl<T> core::ops::Mul<&Area<T>> for InverseMomentOfInertia<T> where T: NumLike {
15384 type Output = InverseMass<T>;
15385 fn mul(self, rhs: &Area<T>) -> Self::Output {
15386 InverseMass{per_kg: self.per_kgm2 * rhs.m2.clone()}
15387 }
15388}
15389impl<T> core::ops::Mul<&Area<T>> for &InverseMomentOfInertia<T> where T: NumLike {
15391 type Output = InverseMass<T>;
15392 fn mul(self, rhs: &Area<T>) -> Self::Output {
15393 InverseMass{per_kg: self.per_kgm2.clone() * rhs.m2.clone()}
15394 }
15395}
15396
15397impl<T> core::ops::Div<InverseArea<T>> for InverseMomentOfInertia<T> where T: NumLike {
15400 type Output = InverseMass<T>;
15401 fn div(self, rhs: InverseArea<T>) -> Self::Output {
15402 InverseMass{per_kg: self.per_kgm2 / rhs.per_m2}
15403 }
15404}
15405impl<T> core::ops::Div<InverseArea<T>> for &InverseMomentOfInertia<T> where T: NumLike {
15407 type Output = InverseMass<T>;
15408 fn div(self, rhs: InverseArea<T>) -> Self::Output {
15409 InverseMass{per_kg: self.per_kgm2.clone() / rhs.per_m2}
15410 }
15411}
15412impl<T> core::ops::Div<&InverseArea<T>> for InverseMomentOfInertia<T> where T: NumLike {
15414 type Output = InverseMass<T>;
15415 fn div(self, rhs: &InverseArea<T>) -> Self::Output {
15416 InverseMass{per_kg: self.per_kgm2 / rhs.per_m2.clone()}
15417 }
15418}
15419impl<T> core::ops::Div<&InverseArea<T>> for &InverseMomentOfInertia<T> where T: NumLike {
15421 type Output = InverseMass<T>;
15422 fn div(self, rhs: &InverseArea<T>) -> Self::Output {
15423 InverseMass{per_kg: self.per_kgm2.clone() / rhs.per_m2.clone()}
15424 }
15425}
15426
15427impl<T> core::ops::Mul<AngularMomentum<T>> for InverseMomentOfInertia<T> where T: NumLike {
15430 type Output = AngularVelocity<T>;
15431 fn mul(self, rhs: AngularMomentum<T>) -> Self::Output {
15432 AngularVelocity{radps: self.per_kgm2 * rhs.kgm2radps}
15433 }
15434}
15435impl<T> core::ops::Mul<AngularMomentum<T>> for &InverseMomentOfInertia<T> where T: NumLike {
15437 type Output = AngularVelocity<T>;
15438 fn mul(self, rhs: AngularMomentum<T>) -> Self::Output {
15439 AngularVelocity{radps: self.per_kgm2.clone() * rhs.kgm2radps}
15440 }
15441}
15442impl<T> core::ops::Mul<&AngularMomentum<T>> for InverseMomentOfInertia<T> where T: NumLike {
15444 type Output = AngularVelocity<T>;
15445 fn mul(self, rhs: &AngularMomentum<T>) -> Self::Output {
15446 AngularVelocity{radps: self.per_kgm2 * rhs.kgm2radps.clone()}
15447 }
15448}
15449impl<T> core::ops::Mul<&AngularMomentum<T>> for &InverseMomentOfInertia<T> where T: NumLike {
15451 type Output = AngularVelocity<T>;
15452 fn mul(self, rhs: &AngularMomentum<T>) -> Self::Output {
15453 AngularVelocity{radps: self.per_kgm2.clone() * rhs.kgm2radps.clone()}
15454 }
15455}
15456
15457impl<T> core::ops::Div<AngularVelocity<T>> for InverseMomentOfInertia<T> where T: NumLike {
15460 type Output = InverseAngularMomentum<T>;
15461 fn div(self, rhs: AngularVelocity<T>) -> Self::Output {
15462 InverseAngularMomentum{s_per_kgm2rad: self.per_kgm2 / rhs.radps}
15463 }
15464}
15465impl<T> core::ops::Div<AngularVelocity<T>> for &InverseMomentOfInertia<T> where T: NumLike {
15467 type Output = InverseAngularMomentum<T>;
15468 fn div(self, rhs: AngularVelocity<T>) -> Self::Output {
15469 InverseAngularMomentum{s_per_kgm2rad: self.per_kgm2.clone() / rhs.radps}
15470 }
15471}
15472impl<T> core::ops::Div<&AngularVelocity<T>> for InverseMomentOfInertia<T> where T: NumLike {
15474 type Output = InverseAngularMomentum<T>;
15475 fn div(self, rhs: &AngularVelocity<T>) -> Self::Output {
15476 InverseAngularMomentum{s_per_kgm2rad: self.per_kgm2 / rhs.radps.clone()}
15477 }
15478}
15479impl<T> core::ops::Div<&AngularVelocity<T>> for &InverseMomentOfInertia<T> where T: NumLike {
15481 type Output = InverseAngularMomentum<T>;
15482 fn div(self, rhs: &AngularVelocity<T>) -> Self::Output {
15483 InverseAngularMomentum{s_per_kgm2rad: self.per_kgm2.clone() / rhs.radps.clone()}
15484 }
15485}
15486
15487impl<T> core::ops::Div<InverseAngularMomentum<T>> for InverseMomentOfInertia<T> where T: NumLike {
15490 type Output = AngularVelocity<T>;
15491 fn div(self, rhs: InverseAngularMomentum<T>) -> Self::Output {
15492 AngularVelocity{radps: self.per_kgm2 / rhs.s_per_kgm2rad}
15493 }
15494}
15495impl<T> core::ops::Div<InverseAngularMomentum<T>> for &InverseMomentOfInertia<T> where T: NumLike {
15497 type Output = AngularVelocity<T>;
15498 fn div(self, rhs: InverseAngularMomentum<T>) -> Self::Output {
15499 AngularVelocity{radps: self.per_kgm2.clone() / rhs.s_per_kgm2rad}
15500 }
15501}
15502impl<T> core::ops::Div<&InverseAngularMomentum<T>> for InverseMomentOfInertia<T> where T: NumLike {
15504 type Output = AngularVelocity<T>;
15505 fn div(self, rhs: &InverseAngularMomentum<T>) -> Self::Output {
15506 AngularVelocity{radps: self.per_kgm2 / rhs.s_per_kgm2rad.clone()}
15507 }
15508}
15509impl<T> core::ops::Div<&InverseAngularMomentum<T>> for &InverseMomentOfInertia<T> where T: NumLike {
15511 type Output = AngularVelocity<T>;
15512 fn div(self, rhs: &InverseAngularMomentum<T>) -> Self::Output {
15513 AngularVelocity{radps: self.per_kgm2.clone() / rhs.s_per_kgm2rad.clone()}
15514 }
15515}
15516
15517impl<T> core::ops::Mul<InverseAngularVelocity<T>> for InverseMomentOfInertia<T> where T: NumLike {
15520 type Output = InverseAngularMomentum<T>;
15521 fn mul(self, rhs: InverseAngularVelocity<T>) -> Self::Output {
15522 InverseAngularMomentum{s_per_kgm2rad: self.per_kgm2 * rhs.s_per_rad}
15523 }
15524}
15525impl<T> core::ops::Mul<InverseAngularVelocity<T>> for &InverseMomentOfInertia<T> where T: NumLike {
15527 type Output = InverseAngularMomentum<T>;
15528 fn mul(self, rhs: InverseAngularVelocity<T>) -> Self::Output {
15529 InverseAngularMomentum{s_per_kgm2rad: self.per_kgm2.clone() * rhs.s_per_rad}
15530 }
15531}
15532impl<T> core::ops::Mul<&InverseAngularVelocity<T>> for InverseMomentOfInertia<T> where T: NumLike {
15534 type Output = InverseAngularMomentum<T>;
15535 fn mul(self, rhs: &InverseAngularVelocity<T>) -> Self::Output {
15536 InverseAngularMomentum{s_per_kgm2rad: self.per_kgm2 * rhs.s_per_rad.clone()}
15537 }
15538}
15539impl<T> core::ops::Mul<&InverseAngularVelocity<T>> for &InverseMomentOfInertia<T> where T: NumLike {
15541 type Output = InverseAngularMomentum<T>;
15542 fn mul(self, rhs: &InverseAngularVelocity<T>) -> Self::Output {
15543 InverseAngularMomentum{s_per_kgm2rad: self.per_kgm2.clone() * rhs.s_per_rad.clone()}
15544 }
15545}
15546
15547#[derive(UnitStruct, Debug, Clone)]
15549#[cfg_attr(feature="serde", derive(Serialize, Deserialize))]
15550pub struct InverseMomentum<T: NumLike>{
15551 pub s_per_kgm: T
15553}
15554
15555impl<T> InverseMomentum<T> where T: NumLike {
15556
15557 pub fn unit_name() -> &'static str { "seconds per kilogram meter" }
15559
15560 pub fn unit_symbol() -> &'static str { "s/kg·m" }
15562
15563 pub fn from_s_per_kgm(s_per_kgm: T) -> Self { InverseMomentum{s_per_kgm: s_per_kgm} }
15568
15569 pub fn to_s_per_kgm(&self) -> T { self.s_per_kgm.clone() }
15571
15572 pub fn from_seconds_per_kilogram_meter(seconds_per_kilogram_meter: T) -> Self { InverseMomentum{s_per_kgm: seconds_per_kilogram_meter} }
15577
15578 pub fn to_seconds_per_kilogram_meter(&self) -> T { self.s_per_kgm.clone() }
15580
15581}
15582
15583impl<T> fmt::Display for InverseMomentum<T> where T: NumLike {
15584 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
15585 write!(f, "{} {}", &self.s_per_kgm, Self::unit_symbol())
15586 }
15587}
15588
15589impl<T> InverseMomentum<T> where T: NumLike+From<f64> {
15590
15591 pub fn to_s_per_gcm(&self) -> T {
15595 return self.s_per_kgm.clone() * T::from(1e-05_f64);
15596 }
15597
15598 pub fn from_s_per_gcm(s_per_gcm: T) -> Self {
15605 InverseMomentum{s_per_kgm: s_per_gcm * T::from(100000.0_f64)}
15606 }
15607
15608 pub fn to_seconds_per_gram_centimeter(&self) -> T {
15612 return self.s_per_kgm.clone() * T::from(1e-05_f64);
15613 }
15614
15615 pub fn from_seconds_per_gram_centimeter(seconds_per_gram_centimeter: T) -> Self {
15622 InverseMomentum{s_per_kgm: seconds_per_gram_centimeter * T::from(100000.0_f64)}
15623 }
15624
15625}
15626
15627
15628#[cfg(feature="num-bigfloat")]
15630impl core::ops::Mul<InverseMomentum<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
15631 type Output = InverseMomentum<num_bigfloat::BigFloat>;
15632 fn mul(self, rhs: InverseMomentum<num_bigfloat::BigFloat>) -> Self::Output {
15633 InverseMomentum{s_per_kgm: self * rhs.s_per_kgm}
15634 }
15635}
15636#[cfg(feature="num-bigfloat")]
15638impl core::ops::Mul<InverseMomentum<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
15639 type Output = InverseMomentum<num_bigfloat::BigFloat>;
15640 fn mul(self, rhs: InverseMomentum<num_bigfloat::BigFloat>) -> Self::Output {
15641 InverseMomentum{s_per_kgm: self.clone() * rhs.s_per_kgm}
15642 }
15643}
15644#[cfg(feature="num-bigfloat")]
15646impl core::ops::Mul<&InverseMomentum<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
15647 type Output = InverseMomentum<num_bigfloat::BigFloat>;
15648 fn mul(self, rhs: &InverseMomentum<num_bigfloat::BigFloat>) -> Self::Output {
15649 InverseMomentum{s_per_kgm: self * rhs.s_per_kgm.clone()}
15650 }
15651}
15652#[cfg(feature="num-bigfloat")]
15654impl core::ops::Mul<&InverseMomentum<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
15655 type Output = InverseMomentum<num_bigfloat::BigFloat>;
15656 fn mul(self, rhs: &InverseMomentum<num_bigfloat::BigFloat>) -> Self::Output {
15657 InverseMomentum{s_per_kgm: self.clone() * rhs.s_per_kgm.clone()}
15658 }
15659}
15660
15661#[cfg(feature="num-complex")]
15663impl core::ops::Mul<InverseMomentum<num_complex::Complex32>> for num_complex::Complex32 {
15664 type Output = InverseMomentum<num_complex::Complex32>;
15665 fn mul(self, rhs: InverseMomentum<num_complex::Complex32>) -> Self::Output {
15666 InverseMomentum{s_per_kgm: self * rhs.s_per_kgm}
15667 }
15668}
15669#[cfg(feature="num-complex")]
15671impl core::ops::Mul<InverseMomentum<num_complex::Complex32>> for &num_complex::Complex32 {
15672 type Output = InverseMomentum<num_complex::Complex32>;
15673 fn mul(self, rhs: InverseMomentum<num_complex::Complex32>) -> Self::Output {
15674 InverseMomentum{s_per_kgm: self.clone() * rhs.s_per_kgm}
15675 }
15676}
15677#[cfg(feature="num-complex")]
15679impl core::ops::Mul<&InverseMomentum<num_complex::Complex32>> for num_complex::Complex32 {
15680 type Output = InverseMomentum<num_complex::Complex32>;
15681 fn mul(self, rhs: &InverseMomentum<num_complex::Complex32>) -> Self::Output {
15682 InverseMomentum{s_per_kgm: self * rhs.s_per_kgm.clone()}
15683 }
15684}
15685#[cfg(feature="num-complex")]
15687impl core::ops::Mul<&InverseMomentum<num_complex::Complex32>> for &num_complex::Complex32 {
15688 type Output = InverseMomentum<num_complex::Complex32>;
15689 fn mul(self, rhs: &InverseMomentum<num_complex::Complex32>) -> Self::Output {
15690 InverseMomentum{s_per_kgm: self.clone() * rhs.s_per_kgm.clone()}
15691 }
15692}
15693
15694#[cfg(feature="num-complex")]
15696impl core::ops::Mul<InverseMomentum<num_complex::Complex64>> for num_complex::Complex64 {
15697 type Output = InverseMomentum<num_complex::Complex64>;
15698 fn mul(self, rhs: InverseMomentum<num_complex::Complex64>) -> Self::Output {
15699 InverseMomentum{s_per_kgm: self * rhs.s_per_kgm}
15700 }
15701}
15702#[cfg(feature="num-complex")]
15704impl core::ops::Mul<InverseMomentum<num_complex::Complex64>> for &num_complex::Complex64 {
15705 type Output = InverseMomentum<num_complex::Complex64>;
15706 fn mul(self, rhs: InverseMomentum<num_complex::Complex64>) -> Self::Output {
15707 InverseMomentum{s_per_kgm: self.clone() * rhs.s_per_kgm}
15708 }
15709}
15710#[cfg(feature="num-complex")]
15712impl core::ops::Mul<&InverseMomentum<num_complex::Complex64>> for num_complex::Complex64 {
15713 type Output = InverseMomentum<num_complex::Complex64>;
15714 fn mul(self, rhs: &InverseMomentum<num_complex::Complex64>) -> Self::Output {
15715 InverseMomentum{s_per_kgm: self * rhs.s_per_kgm.clone()}
15716 }
15717}
15718#[cfg(feature="num-complex")]
15720impl core::ops::Mul<&InverseMomentum<num_complex::Complex64>> for &num_complex::Complex64 {
15721 type Output = InverseMomentum<num_complex::Complex64>;
15722 fn mul(self, rhs: &InverseMomentum<num_complex::Complex64>) -> Self::Output {
15723 InverseMomentum{s_per_kgm: self.clone() * rhs.s_per_kgm.clone()}
15724 }
15725}
15726
15727
15728
15729
15730impl<T> core::ops::Div<InverseMass<T>> for InverseMomentum<T> where T: NumLike {
15733 type Output = TimePerDistance<T>;
15734 fn div(self, rhs: InverseMass<T>) -> Self::Output {
15735 TimePerDistance{spm: self.s_per_kgm / rhs.per_kg}
15736 }
15737}
15738impl<T> core::ops::Div<InverseMass<T>> for &InverseMomentum<T> where T: NumLike {
15740 type Output = TimePerDistance<T>;
15741 fn div(self, rhs: InverseMass<T>) -> Self::Output {
15742 TimePerDistance{spm: self.s_per_kgm.clone() / rhs.per_kg}
15743 }
15744}
15745impl<T> core::ops::Div<&InverseMass<T>> for InverseMomentum<T> where T: NumLike {
15747 type Output = TimePerDistance<T>;
15748 fn div(self, rhs: &InverseMass<T>) -> Self::Output {
15749 TimePerDistance{spm: self.s_per_kgm / rhs.per_kg.clone()}
15750 }
15751}
15752impl<T> core::ops::Div<&InverseMass<T>> for &InverseMomentum<T> where T: NumLike {
15754 type Output = TimePerDistance<T>;
15755 fn div(self, rhs: &InverseMass<T>) -> Self::Output {
15756 TimePerDistance{spm: self.s_per_kgm.clone() / rhs.per_kg.clone()}
15757 }
15758}
15759
15760impl<T> core::ops::Mul<Mass<T>> for InverseMomentum<T> where T: NumLike {
15763 type Output = TimePerDistance<T>;
15764 fn mul(self, rhs: Mass<T>) -> Self::Output {
15765 TimePerDistance{spm: self.s_per_kgm * rhs.kg}
15766 }
15767}
15768impl<T> core::ops::Mul<Mass<T>> for &InverseMomentum<T> where T: NumLike {
15770 type Output = TimePerDistance<T>;
15771 fn mul(self, rhs: Mass<T>) -> Self::Output {
15772 TimePerDistance{spm: self.s_per_kgm.clone() * rhs.kg}
15773 }
15774}
15775impl<T> core::ops::Mul<&Mass<T>> for InverseMomentum<T> where T: NumLike {
15777 type Output = TimePerDistance<T>;
15778 fn mul(self, rhs: &Mass<T>) -> Self::Output {
15779 TimePerDistance{spm: self.s_per_kgm * rhs.kg.clone()}
15780 }
15781}
15782impl<T> core::ops::Mul<&Mass<T>> for &InverseMomentum<T> where T: NumLike {
15784 type Output = TimePerDistance<T>;
15785 fn mul(self, rhs: &Mass<T>) -> Self::Output {
15786 TimePerDistance{spm: self.s_per_kgm.clone() * rhs.kg.clone()}
15787 }
15788}
15789
15790impl<T> core::ops::Mul<Time<T>> for InverseMomentum<T> where T: NumLike {
15793 type Output = InverseForce<T>;
15794 fn mul(self, rhs: Time<T>) -> Self::Output {
15795 InverseForce{per_N: self.s_per_kgm * rhs.s}
15796 }
15797}
15798impl<T> core::ops::Mul<Time<T>> for &InverseMomentum<T> where T: NumLike {
15800 type Output = InverseForce<T>;
15801 fn mul(self, rhs: Time<T>) -> Self::Output {
15802 InverseForce{per_N: self.s_per_kgm.clone() * rhs.s}
15803 }
15804}
15805impl<T> core::ops::Mul<&Time<T>> for InverseMomentum<T> where T: NumLike {
15807 type Output = InverseForce<T>;
15808 fn mul(self, rhs: &Time<T>) -> Self::Output {
15809 InverseForce{per_N: self.s_per_kgm * rhs.s.clone()}
15810 }
15811}
15812impl<T> core::ops::Mul<&Time<T>> for &InverseMomentum<T> where T: NumLike {
15814 type Output = InverseForce<T>;
15815 fn mul(self, rhs: &Time<T>) -> Self::Output {
15816 InverseForce{per_N: self.s_per_kgm.clone() * rhs.s.clone()}
15817 }
15818}
15819
15820impl<T> core::ops::Div<Acceleration<T>> for InverseMomentum<T> where T: NumLike {
15823 type Output = InversePower<T>;
15824 fn div(self, rhs: Acceleration<T>) -> Self::Output {
15825 InversePower{per_W: self.s_per_kgm / rhs.mps2}
15826 }
15827}
15828impl<T> core::ops::Div<Acceleration<T>> for &InverseMomentum<T> where T: NumLike {
15830 type Output = InversePower<T>;
15831 fn div(self, rhs: Acceleration<T>) -> Self::Output {
15832 InversePower{per_W: self.s_per_kgm.clone() / rhs.mps2}
15833 }
15834}
15835impl<T> core::ops::Div<&Acceleration<T>> for InverseMomentum<T> where T: NumLike {
15837 type Output = InversePower<T>;
15838 fn div(self, rhs: &Acceleration<T>) -> Self::Output {
15839 InversePower{per_W: self.s_per_kgm / rhs.mps2.clone()}
15840 }
15841}
15842impl<T> core::ops::Div<&Acceleration<T>> for &InverseMomentum<T> where T: NumLike {
15844 type Output = InversePower<T>;
15845 fn div(self, rhs: &Acceleration<T>) -> Self::Output {
15846 InversePower{per_W: self.s_per_kgm.clone() / rhs.mps2.clone()}
15847 }
15848}
15849
15850impl<T> core::ops::Mul<Energy<T>> for InverseMomentum<T> where T: NumLike {
15853 type Output = Velocity<T>;
15854 fn mul(self, rhs: Energy<T>) -> Self::Output {
15855 Velocity{mps: self.s_per_kgm * rhs.J}
15856 }
15857}
15858impl<T> core::ops::Mul<Energy<T>> for &InverseMomentum<T> where T: NumLike {
15860 type Output = Velocity<T>;
15861 fn mul(self, rhs: Energy<T>) -> Self::Output {
15862 Velocity{mps: self.s_per_kgm.clone() * rhs.J}
15863 }
15864}
15865impl<T> core::ops::Mul<&Energy<T>> for InverseMomentum<T> where T: NumLike {
15867 type Output = Velocity<T>;
15868 fn mul(self, rhs: &Energy<T>) -> Self::Output {
15869 Velocity{mps: self.s_per_kgm * rhs.J.clone()}
15870 }
15871}
15872impl<T> core::ops::Mul<&Energy<T>> for &InverseMomentum<T> where T: NumLike {
15874 type Output = Velocity<T>;
15875 fn mul(self, rhs: &Energy<T>) -> Self::Output {
15876 Velocity{mps: self.s_per_kgm.clone() * rhs.J.clone()}
15877 }
15878}
15879
15880impl<T> core::ops::Mul<Torque<T>> for InverseMomentum<T> where T: NumLike {
15883 type Output = Velocity<T>;
15884 fn mul(self, rhs: Torque<T>) -> Self::Output {
15885 Velocity{mps: self.s_per_kgm * rhs.Nm}
15886 }
15887}
15888impl<T> core::ops::Mul<Torque<T>> for &InverseMomentum<T> where T: NumLike {
15890 type Output = Velocity<T>;
15891 fn mul(self, rhs: Torque<T>) -> Self::Output {
15892 Velocity{mps: self.s_per_kgm.clone() * rhs.Nm}
15893 }
15894}
15895impl<T> core::ops::Mul<&Torque<T>> for InverseMomentum<T> where T: NumLike {
15897 type Output = Velocity<T>;
15898 fn mul(self, rhs: &Torque<T>) -> Self::Output {
15899 Velocity{mps: self.s_per_kgm * rhs.Nm.clone()}
15900 }
15901}
15902impl<T> core::ops::Mul<&Torque<T>> for &InverseMomentum<T> where T: NumLike {
15904 type Output = Velocity<T>;
15905 fn mul(self, rhs: &Torque<T>) -> Self::Output {
15906 Velocity{mps: self.s_per_kgm.clone() * rhs.Nm.clone()}
15907 }
15908}
15909
15910impl<T> core::ops::Mul<Force<T>> for InverseMomentum<T> where T: NumLike {
15913 type Output = Frequency<T>;
15914 fn mul(self, rhs: Force<T>) -> Self::Output {
15915 Frequency{Hz: self.s_per_kgm * rhs.N}
15916 }
15917}
15918impl<T> core::ops::Mul<Force<T>> for &InverseMomentum<T> where T: NumLike {
15920 type Output = Frequency<T>;
15921 fn mul(self, rhs: Force<T>) -> Self::Output {
15922 Frequency{Hz: self.s_per_kgm.clone() * rhs.N}
15923 }
15924}
15925impl<T> core::ops::Mul<&Force<T>> for InverseMomentum<T> where T: NumLike {
15927 type Output = Frequency<T>;
15928 fn mul(self, rhs: &Force<T>) -> Self::Output {
15929 Frequency{Hz: self.s_per_kgm * rhs.N.clone()}
15930 }
15931}
15932impl<T> core::ops::Mul<&Force<T>> for &InverseMomentum<T> where T: NumLike {
15934 type Output = Frequency<T>;
15935 fn mul(self, rhs: &Force<T>) -> Self::Output {
15936 Frequency{Hz: self.s_per_kgm.clone() * rhs.N.clone()}
15937 }
15938}
15939
15940impl<T> core::ops::Div<Frequency<T>> for InverseMomentum<T> where T: NumLike {
15943 type Output = InverseForce<T>;
15944 fn div(self, rhs: Frequency<T>) -> Self::Output {
15945 InverseForce{per_N: self.s_per_kgm / rhs.Hz}
15946 }
15947}
15948impl<T> core::ops::Div<Frequency<T>> for &InverseMomentum<T> where T: NumLike {
15950 type Output = InverseForce<T>;
15951 fn div(self, rhs: Frequency<T>) -> Self::Output {
15952 InverseForce{per_N: self.s_per_kgm.clone() / rhs.Hz}
15953 }
15954}
15955impl<T> core::ops::Div<&Frequency<T>> for InverseMomentum<T> where T: NumLike {
15957 type Output = InverseForce<T>;
15958 fn div(self, rhs: &Frequency<T>) -> Self::Output {
15959 InverseForce{per_N: self.s_per_kgm / rhs.Hz.clone()}
15960 }
15961}
15962impl<T> core::ops::Div<&Frequency<T>> for &InverseMomentum<T> where T: NumLike {
15964 type Output = InverseForce<T>;
15965 fn div(self, rhs: &Frequency<T>) -> Self::Output {
15966 InverseForce{per_N: self.s_per_kgm.clone() / rhs.Hz.clone()}
15967 }
15968}
15969
15970impl<T> core::ops::Mul<InverseAcceleration<T>> for InverseMomentum<T> where T: NumLike {
15973 type Output = InversePower<T>;
15974 fn mul(self, rhs: InverseAcceleration<T>) -> Self::Output {
15975 InversePower{per_W: self.s_per_kgm * rhs.s2pm}
15976 }
15977}
15978impl<T> core::ops::Mul<InverseAcceleration<T>> for &InverseMomentum<T> where T: NumLike {
15980 type Output = InversePower<T>;
15981 fn mul(self, rhs: InverseAcceleration<T>) -> Self::Output {
15982 InversePower{per_W: self.s_per_kgm.clone() * rhs.s2pm}
15983 }
15984}
15985impl<T> core::ops::Mul<&InverseAcceleration<T>> for InverseMomentum<T> where T: NumLike {
15987 type Output = InversePower<T>;
15988 fn mul(self, rhs: &InverseAcceleration<T>) -> Self::Output {
15989 InversePower{per_W: self.s_per_kgm * rhs.s2pm.clone()}
15990 }
15991}
15992impl<T> core::ops::Mul<&InverseAcceleration<T>> for &InverseMomentum<T> where T: NumLike {
15994 type Output = InversePower<T>;
15995 fn mul(self, rhs: &InverseAcceleration<T>) -> Self::Output {
15996 InversePower{per_W: self.s_per_kgm.clone() * rhs.s2pm.clone()}
15997 }
15998}
15999
16000impl<T> core::ops::Div<InverseEnergy<T>> for InverseMomentum<T> where T: NumLike {
16003 type Output = Velocity<T>;
16004 fn div(self, rhs: InverseEnergy<T>) -> Self::Output {
16005 Velocity{mps: self.s_per_kgm / rhs.per_J}
16006 }
16007}
16008impl<T> core::ops::Div<InverseEnergy<T>> for &InverseMomentum<T> where T: NumLike {
16010 type Output = Velocity<T>;
16011 fn div(self, rhs: InverseEnergy<T>) -> Self::Output {
16012 Velocity{mps: self.s_per_kgm.clone() / rhs.per_J}
16013 }
16014}
16015impl<T> core::ops::Div<&InverseEnergy<T>> for InverseMomentum<T> where T: NumLike {
16017 type Output = Velocity<T>;
16018 fn div(self, rhs: &InverseEnergy<T>) -> Self::Output {
16019 Velocity{mps: self.s_per_kgm / rhs.per_J.clone()}
16020 }
16021}
16022impl<T> core::ops::Div<&InverseEnergy<T>> for &InverseMomentum<T> where T: NumLike {
16024 type Output = Velocity<T>;
16025 fn div(self, rhs: &InverseEnergy<T>) -> Self::Output {
16026 Velocity{mps: self.s_per_kgm.clone() / rhs.per_J.clone()}
16027 }
16028}
16029
16030impl<T> core::ops::Div<InverseTorque<T>> for InverseMomentum<T> where T: NumLike {
16033 type Output = Velocity<T>;
16034 fn div(self, rhs: InverseTorque<T>) -> Self::Output {
16035 Velocity{mps: self.s_per_kgm / rhs.per_Nm}
16036 }
16037}
16038impl<T> core::ops::Div<InverseTorque<T>> for &InverseMomentum<T> where T: NumLike {
16040 type Output = Velocity<T>;
16041 fn div(self, rhs: InverseTorque<T>) -> Self::Output {
16042 Velocity{mps: self.s_per_kgm.clone() / rhs.per_Nm}
16043 }
16044}
16045impl<T> core::ops::Div<&InverseTorque<T>> for InverseMomentum<T> where T: NumLike {
16047 type Output = Velocity<T>;
16048 fn div(self, rhs: &InverseTorque<T>) -> Self::Output {
16049 Velocity{mps: self.s_per_kgm / rhs.per_Nm.clone()}
16050 }
16051}
16052impl<T> core::ops::Div<&InverseTorque<T>> for &InverseMomentum<T> where T: NumLike {
16054 type Output = Velocity<T>;
16055 fn div(self, rhs: &InverseTorque<T>) -> Self::Output {
16056 Velocity{mps: self.s_per_kgm.clone() / rhs.per_Nm.clone()}
16057 }
16058}
16059
16060impl<T> core::ops::Div<InverseForce<T>> for InverseMomentum<T> where T: NumLike {
16063 type Output = Frequency<T>;
16064 fn div(self, rhs: InverseForce<T>) -> Self::Output {
16065 Frequency{Hz: self.s_per_kgm / rhs.per_N}
16066 }
16067}
16068impl<T> core::ops::Div<InverseForce<T>> for &InverseMomentum<T> where T: NumLike {
16070 type Output = Frequency<T>;
16071 fn div(self, rhs: InverseForce<T>) -> Self::Output {
16072 Frequency{Hz: self.s_per_kgm.clone() / rhs.per_N}
16073 }
16074}
16075impl<T> core::ops::Div<&InverseForce<T>> for InverseMomentum<T> where T: NumLike {
16077 type Output = Frequency<T>;
16078 fn div(self, rhs: &InverseForce<T>) -> Self::Output {
16079 Frequency{Hz: self.s_per_kgm / rhs.per_N.clone()}
16080 }
16081}
16082impl<T> core::ops::Div<&InverseForce<T>> for &InverseMomentum<T> where T: NumLike {
16084 type Output = Frequency<T>;
16085 fn div(self, rhs: &InverseForce<T>) -> Self::Output {
16086 Frequency{Hz: self.s_per_kgm.clone() / rhs.per_N.clone()}
16087 }
16088}
16089
16090impl<T> core::ops::Div<InversePower<T>> for InverseMomentum<T> where T: NumLike {
16093 type Output = Acceleration<T>;
16094 fn div(self, rhs: InversePower<T>) -> Self::Output {
16095 Acceleration{mps2: self.s_per_kgm / rhs.per_W}
16096 }
16097}
16098impl<T> core::ops::Div<InversePower<T>> for &InverseMomentum<T> where T: NumLike {
16100 type Output = Acceleration<T>;
16101 fn div(self, rhs: InversePower<T>) -> Self::Output {
16102 Acceleration{mps2: self.s_per_kgm.clone() / rhs.per_W}
16103 }
16104}
16105impl<T> core::ops::Div<&InversePower<T>> for InverseMomentum<T> where T: NumLike {
16107 type Output = Acceleration<T>;
16108 fn div(self, rhs: &InversePower<T>) -> Self::Output {
16109 Acceleration{mps2: self.s_per_kgm / rhs.per_W.clone()}
16110 }
16111}
16112impl<T> core::ops::Div<&InversePower<T>> for &InverseMomentum<T> where T: NumLike {
16114 type Output = Acceleration<T>;
16115 fn div(self, rhs: &InversePower<T>) -> Self::Output {
16116 Acceleration{mps2: self.s_per_kgm.clone() / rhs.per_W.clone()}
16117 }
16118}
16119
16120impl<T> core::ops::Mul<Power<T>> for InverseMomentum<T> where T: NumLike {
16123 type Output = Acceleration<T>;
16124 fn mul(self, rhs: Power<T>) -> Self::Output {
16125 Acceleration{mps2: self.s_per_kgm * rhs.W}
16126 }
16127}
16128impl<T> core::ops::Mul<Power<T>> for &InverseMomentum<T> where T: NumLike {
16130 type Output = Acceleration<T>;
16131 fn mul(self, rhs: Power<T>) -> Self::Output {
16132 Acceleration{mps2: self.s_per_kgm.clone() * rhs.W}
16133 }
16134}
16135impl<T> core::ops::Mul<&Power<T>> for InverseMomentum<T> where T: NumLike {
16137 type Output = Acceleration<T>;
16138 fn mul(self, rhs: &Power<T>) -> Self::Output {
16139 Acceleration{mps2: self.s_per_kgm * rhs.W.clone()}
16140 }
16141}
16142impl<T> core::ops::Mul<&Power<T>> for &InverseMomentum<T> where T: NumLike {
16144 type Output = Acceleration<T>;
16145 fn mul(self, rhs: &Power<T>) -> Self::Output {
16146 Acceleration{mps2: self.s_per_kgm.clone() * rhs.W.clone()}
16147 }
16148}
16149
16150impl<T> core::ops::Mul<TimePerDistance<T>> for InverseMomentum<T> where T: NumLike {
16153 type Output = InverseEnergy<T>;
16154 fn mul(self, rhs: TimePerDistance<T>) -> Self::Output {
16155 InverseEnergy{per_J: self.s_per_kgm * rhs.spm}
16156 }
16157}
16158impl<T> core::ops::Mul<TimePerDistance<T>> for &InverseMomentum<T> where T: NumLike {
16160 type Output = InverseEnergy<T>;
16161 fn mul(self, rhs: TimePerDistance<T>) -> Self::Output {
16162 InverseEnergy{per_J: self.s_per_kgm.clone() * rhs.spm}
16163 }
16164}
16165impl<T> core::ops::Mul<&TimePerDistance<T>> for InverseMomentum<T> where T: NumLike {
16167 type Output = InverseEnergy<T>;
16168 fn mul(self, rhs: &TimePerDistance<T>) -> Self::Output {
16169 InverseEnergy{per_J: self.s_per_kgm * rhs.spm.clone()}
16170 }
16171}
16172impl<T> core::ops::Mul<&TimePerDistance<T>> for &InverseMomentum<T> where T: NumLike {
16174 type Output = InverseEnergy<T>;
16175 fn mul(self, rhs: &TimePerDistance<T>) -> Self::Output {
16176 InverseEnergy{per_J: self.s_per_kgm.clone() * rhs.spm.clone()}
16177 }
16178}
16179
16180impl<T> core::ops::Div<TimePerDistance<T>> for InverseMomentum<T> where T: NumLike {
16183 type Output = InverseMass<T>;
16184 fn div(self, rhs: TimePerDistance<T>) -> Self::Output {
16185 InverseMass{per_kg: self.s_per_kgm / rhs.spm}
16186 }
16187}
16188impl<T> core::ops::Div<TimePerDistance<T>> for &InverseMomentum<T> where T: NumLike {
16190 type Output = InverseMass<T>;
16191 fn div(self, rhs: TimePerDistance<T>) -> Self::Output {
16192 InverseMass{per_kg: self.s_per_kgm.clone() / rhs.spm}
16193 }
16194}
16195impl<T> core::ops::Div<&TimePerDistance<T>> for InverseMomentum<T> where T: NumLike {
16197 type Output = InverseMass<T>;
16198 fn div(self, rhs: &TimePerDistance<T>) -> Self::Output {
16199 InverseMass{per_kg: self.s_per_kgm / rhs.spm.clone()}
16200 }
16201}
16202impl<T> core::ops::Div<&TimePerDistance<T>> for &InverseMomentum<T> where T: NumLike {
16204 type Output = InverseMass<T>;
16205 fn div(self, rhs: &TimePerDistance<T>) -> Self::Output {
16206 InverseMass{per_kg: self.s_per_kgm.clone() / rhs.spm.clone()}
16207 }
16208}
16209
16210impl<T> core::ops::Mul<Velocity<T>> for InverseMomentum<T> where T: NumLike {
16213 type Output = InverseMass<T>;
16214 fn mul(self, rhs: Velocity<T>) -> Self::Output {
16215 InverseMass{per_kg: self.s_per_kgm * rhs.mps}
16216 }
16217}
16218impl<T> core::ops::Mul<Velocity<T>> for &InverseMomentum<T> where T: NumLike {
16220 type Output = InverseMass<T>;
16221 fn mul(self, rhs: Velocity<T>) -> Self::Output {
16222 InverseMass{per_kg: self.s_per_kgm.clone() * rhs.mps}
16223 }
16224}
16225impl<T> core::ops::Mul<&Velocity<T>> for InverseMomentum<T> where T: NumLike {
16227 type Output = InverseMass<T>;
16228 fn mul(self, rhs: &Velocity<T>) -> Self::Output {
16229 InverseMass{per_kg: self.s_per_kgm * rhs.mps.clone()}
16230 }
16231}
16232impl<T> core::ops::Mul<&Velocity<T>> for &InverseMomentum<T> where T: NumLike {
16234 type Output = InverseMass<T>;
16235 fn mul(self, rhs: &Velocity<T>) -> Self::Output {
16236 InverseMass{per_kg: self.s_per_kgm.clone() * rhs.mps.clone()}
16237 }
16238}
16239
16240impl<T> core::ops::Div<Velocity<T>> for InverseMomentum<T> where T: NumLike {
16243 type Output = InverseEnergy<T>;
16244 fn div(self, rhs: Velocity<T>) -> Self::Output {
16245 InverseEnergy{per_J: self.s_per_kgm / rhs.mps}
16246 }
16247}
16248impl<T> core::ops::Div<Velocity<T>> for &InverseMomentum<T> where T: NumLike {
16250 type Output = InverseEnergy<T>;
16251 fn div(self, rhs: Velocity<T>) -> Self::Output {
16252 InverseEnergy{per_J: self.s_per_kgm.clone() / rhs.mps}
16253 }
16254}
16255impl<T> core::ops::Div<&Velocity<T>> for InverseMomentum<T> where T: NumLike {
16257 type Output = InverseEnergy<T>;
16258 fn div(self, rhs: &Velocity<T>) -> Self::Output {
16259 InverseEnergy{per_J: self.s_per_kgm / rhs.mps.clone()}
16260 }
16261}
16262impl<T> core::ops::Div<&Velocity<T>> for &InverseMomentum<T> where T: NumLike {
16264 type Output = InverseEnergy<T>;
16265 fn div(self, rhs: &Velocity<T>) -> Self::Output {
16266 InverseEnergy{per_J: self.s_per_kgm.clone() / rhs.mps.clone()}
16267 }
16268}
16269
16270impl<T> core::ops::Div<InverseMomentum<T>> for f64 where T: NumLike+From<f64> {
16273 type Output = Momentum<T>;
16274 fn div(self, rhs: InverseMomentum<T>) -> Self::Output {
16275 Momentum{kgmps: T::from(self) / rhs.s_per_kgm}
16276 }
16277}
16278impl<T> core::ops::Div<InverseMomentum<T>> for &f64 where T: NumLike+From<f64> {
16280 type Output = Momentum<T>;
16281 fn div(self, rhs: InverseMomentum<T>) -> Self::Output {
16282 Momentum{kgmps: T::from(self.clone()) / rhs.s_per_kgm}
16283 }
16284}
16285impl<T> core::ops::Div<&InverseMomentum<T>> for f64 where T: NumLike+From<f64> {
16287 type Output = Momentum<T>;
16288 fn div(self, rhs: &InverseMomentum<T>) -> Self::Output {
16289 Momentum{kgmps: T::from(self) / rhs.s_per_kgm.clone()}
16290 }
16291}
16292impl<T> core::ops::Div<&InverseMomentum<T>> for &f64 where T: NumLike+From<f64> {
16294 type Output = Momentum<T>;
16295 fn div(self, rhs: &InverseMomentum<T>) -> Self::Output {
16296 Momentum{kgmps: T::from(self.clone()) / rhs.s_per_kgm.clone()}
16297 }
16298}
16299
16300impl<T> core::ops::Div<InverseMomentum<T>> for f32 where T: NumLike+From<f32> {
16303 type Output = Momentum<T>;
16304 fn div(self, rhs: InverseMomentum<T>) -> Self::Output {
16305 Momentum{kgmps: T::from(self) / rhs.s_per_kgm}
16306 }
16307}
16308impl<T> core::ops::Div<InverseMomentum<T>> for &f32 where T: NumLike+From<f32> {
16310 type Output = Momentum<T>;
16311 fn div(self, rhs: InverseMomentum<T>) -> Self::Output {
16312 Momentum{kgmps: T::from(self.clone()) / rhs.s_per_kgm}
16313 }
16314}
16315impl<T> core::ops::Div<&InverseMomentum<T>> for f32 where T: NumLike+From<f32> {
16317 type Output = Momentum<T>;
16318 fn div(self, rhs: &InverseMomentum<T>) -> Self::Output {
16319 Momentum{kgmps: T::from(self) / rhs.s_per_kgm.clone()}
16320 }
16321}
16322impl<T> core::ops::Div<&InverseMomentum<T>> for &f32 where T: NumLike+From<f32> {
16324 type Output = Momentum<T>;
16325 fn div(self, rhs: &InverseMomentum<T>) -> Self::Output {
16326 Momentum{kgmps: T::from(self.clone()) / rhs.s_per_kgm.clone()}
16327 }
16328}
16329
16330impl<T> core::ops::Div<InverseMomentum<T>> for i64 where T: NumLike+From<i64> {
16333 type Output = Momentum<T>;
16334 fn div(self, rhs: InverseMomentum<T>) -> Self::Output {
16335 Momentum{kgmps: T::from(self) / rhs.s_per_kgm}
16336 }
16337}
16338impl<T> core::ops::Div<InverseMomentum<T>> for &i64 where T: NumLike+From<i64> {
16340 type Output = Momentum<T>;
16341 fn div(self, rhs: InverseMomentum<T>) -> Self::Output {
16342 Momentum{kgmps: T::from(self.clone()) / rhs.s_per_kgm}
16343 }
16344}
16345impl<T> core::ops::Div<&InverseMomentum<T>> for i64 where T: NumLike+From<i64> {
16347 type Output = Momentum<T>;
16348 fn div(self, rhs: &InverseMomentum<T>) -> Self::Output {
16349 Momentum{kgmps: T::from(self) / rhs.s_per_kgm.clone()}
16350 }
16351}
16352impl<T> core::ops::Div<&InverseMomentum<T>> for &i64 where T: NumLike+From<i64> {
16354 type Output = Momentum<T>;
16355 fn div(self, rhs: &InverseMomentum<T>) -> Self::Output {
16356 Momentum{kgmps: T::from(self.clone()) / rhs.s_per_kgm.clone()}
16357 }
16358}
16359
16360impl<T> core::ops::Div<InverseMomentum<T>> for i32 where T: NumLike+From<i32> {
16363 type Output = Momentum<T>;
16364 fn div(self, rhs: InverseMomentum<T>) -> Self::Output {
16365 Momentum{kgmps: T::from(self) / rhs.s_per_kgm}
16366 }
16367}
16368impl<T> core::ops::Div<InverseMomentum<T>> for &i32 where T: NumLike+From<i32> {
16370 type Output = Momentum<T>;
16371 fn div(self, rhs: InverseMomentum<T>) -> Self::Output {
16372 Momentum{kgmps: T::from(self.clone()) / rhs.s_per_kgm}
16373 }
16374}
16375impl<T> core::ops::Div<&InverseMomentum<T>> for i32 where T: NumLike+From<i32> {
16377 type Output = Momentum<T>;
16378 fn div(self, rhs: &InverseMomentum<T>) -> Self::Output {
16379 Momentum{kgmps: T::from(self) / rhs.s_per_kgm.clone()}
16380 }
16381}
16382impl<T> core::ops::Div<&InverseMomentum<T>> for &i32 where T: NumLike+From<i32> {
16384 type Output = Momentum<T>;
16385 fn div(self, rhs: &InverseMomentum<T>) -> Self::Output {
16386 Momentum{kgmps: T::from(self.clone()) / rhs.s_per_kgm.clone()}
16387 }
16388}
16389
16390#[cfg(feature="num-bigfloat")]
16393impl<T> core::ops::Div<InverseMomentum<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
16394 type Output = Momentum<T>;
16395 fn div(self, rhs: InverseMomentum<T>) -> Self::Output {
16396 Momentum{kgmps: T::from(self) / rhs.s_per_kgm}
16397 }
16398}
16399#[cfg(feature="num-bigfloat")]
16401impl<T> core::ops::Div<InverseMomentum<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
16402 type Output = Momentum<T>;
16403 fn div(self, rhs: InverseMomentum<T>) -> Self::Output {
16404 Momentum{kgmps: T::from(self.clone()) / rhs.s_per_kgm}
16405 }
16406}
16407#[cfg(feature="num-bigfloat")]
16409impl<T> core::ops::Div<&InverseMomentum<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
16410 type Output = Momentum<T>;
16411 fn div(self, rhs: &InverseMomentum<T>) -> Self::Output {
16412 Momentum{kgmps: T::from(self) / rhs.s_per_kgm.clone()}
16413 }
16414}
16415#[cfg(feature="num-bigfloat")]
16417impl<T> core::ops::Div<&InverseMomentum<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
16418 type Output = Momentum<T>;
16419 fn div(self, rhs: &InverseMomentum<T>) -> Self::Output {
16420 Momentum{kgmps: T::from(self.clone()) / rhs.s_per_kgm.clone()}
16421 }
16422}
16423
16424#[cfg(feature="num-complex")]
16427impl<T> core::ops::Div<InverseMomentum<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
16428 type Output = Momentum<T>;
16429 fn div(self, rhs: InverseMomentum<T>) -> Self::Output {
16430 Momentum{kgmps: T::from(self) / rhs.s_per_kgm}
16431 }
16432}
16433#[cfg(feature="num-complex")]
16435impl<T> core::ops::Div<InverseMomentum<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
16436 type Output = Momentum<T>;
16437 fn div(self, rhs: InverseMomentum<T>) -> Self::Output {
16438 Momentum{kgmps: T::from(self.clone()) / rhs.s_per_kgm}
16439 }
16440}
16441#[cfg(feature="num-complex")]
16443impl<T> core::ops::Div<&InverseMomentum<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
16444 type Output = Momentum<T>;
16445 fn div(self, rhs: &InverseMomentum<T>) -> Self::Output {
16446 Momentum{kgmps: T::from(self) / rhs.s_per_kgm.clone()}
16447 }
16448}
16449#[cfg(feature="num-complex")]
16451impl<T> core::ops::Div<&InverseMomentum<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
16452 type Output = Momentum<T>;
16453 fn div(self, rhs: &InverseMomentum<T>) -> Self::Output {
16454 Momentum{kgmps: T::from(self.clone()) / rhs.s_per_kgm.clone()}
16455 }
16456}
16457
16458#[cfg(feature="num-complex")]
16461impl<T> core::ops::Div<InverseMomentum<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
16462 type Output = Momentum<T>;
16463 fn div(self, rhs: InverseMomentum<T>) -> Self::Output {
16464 Momentum{kgmps: T::from(self) / rhs.s_per_kgm}
16465 }
16466}
16467#[cfg(feature="num-complex")]
16469impl<T> core::ops::Div<InverseMomentum<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
16470 type Output = Momentum<T>;
16471 fn div(self, rhs: InverseMomentum<T>) -> Self::Output {
16472 Momentum{kgmps: T::from(self.clone()) / rhs.s_per_kgm}
16473 }
16474}
16475#[cfg(feature="num-complex")]
16477impl<T> core::ops::Div<&InverseMomentum<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
16478 type Output = Momentum<T>;
16479 fn div(self, rhs: &InverseMomentum<T>) -> Self::Output {
16480 Momentum{kgmps: T::from(self) / rhs.s_per_kgm.clone()}
16481 }
16482}
16483#[cfg(feature="num-complex")]
16485impl<T> core::ops::Div<&InverseMomentum<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
16486 type Output = Momentum<T>;
16487 fn div(self, rhs: &InverseMomentum<T>) -> Self::Output {
16488 Momentum{kgmps: T::from(self.clone()) / rhs.s_per_kgm.clone()}
16489 }
16490}
16491
16492#[derive(UnitStruct, Debug, Clone)]
16494#[cfg_attr(feature="serde", derive(Serialize, Deserialize))]
16495pub struct InversePower<T: NumLike>{
16496 pub per_W: T
16498}
16499
16500impl<T> InversePower<T> where T: NumLike {
16501
16502 pub fn unit_name() -> &'static str { "inverse watts" }
16504
16505 pub fn unit_symbol() -> &'static str { "1/W" }
16507
16508 pub fn from_per_W(per_W: T) -> Self { InversePower{per_W: per_W} }
16513
16514 pub fn to_per_W(&self) -> T { self.per_W.clone() }
16516
16517 pub fn from_per_watt(per_watt: T) -> Self { InversePower{per_W: per_watt} }
16522
16523 pub fn to_per_watt(&self) -> T { self.per_W.clone() }
16525
16526}
16527
16528impl<T> fmt::Display for InversePower<T> where T: NumLike {
16529 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
16530 write!(f, "{} {}", &self.per_W, Self::unit_symbol())
16531 }
16532}
16533
16534impl<T> InversePower<T> where T: NumLike+From<f64> {
16535
16536 pub fn to_per_mW(&self) -> T {
16540 return self.per_W.clone() * T::from(0.001_f64);
16541 }
16542
16543 pub fn from_per_mW(per_mW: T) -> Self {
16550 InversePower{per_W: per_mW * T::from(1000.0_f64)}
16551 }
16552
16553 pub fn to_per_uW(&self) -> T {
16557 return self.per_W.clone() * T::from(1e-06_f64);
16558 }
16559
16560 pub fn from_per_uW(per_uW: T) -> Self {
16567 InversePower{per_W: per_uW * T::from(1000000.0_f64)}
16568 }
16569
16570 pub fn to_per_nW(&self) -> T {
16574 return self.per_W.clone() * T::from(1e-09_f64);
16575 }
16576
16577 pub fn from_per_nW(per_nW: T) -> Self {
16584 InversePower{per_W: per_nW * T::from(1000000000.0_f64)}
16585 }
16586
16587 pub fn to_per_kW(&self) -> T {
16591 return self.per_W.clone() * T::from(1000.0_f64);
16592 }
16593
16594 pub fn from_per_kW(per_kW: T) -> Self {
16601 InversePower{per_W: per_kW * T::from(0.001_f64)}
16602 }
16603
16604 pub fn to_per_MW(&self) -> T {
16608 return self.per_W.clone() * T::from(1000000.0_f64);
16609 }
16610
16611 pub fn from_per_MW(per_MW: T) -> Self {
16618 InversePower{per_W: per_MW * T::from(1e-06_f64)}
16619 }
16620
16621 pub fn to_per_GW(&self) -> T {
16625 return self.per_W.clone() * T::from(1000000000.0_f64);
16626 }
16627
16628 pub fn from_per_GW(per_GW: T) -> Self {
16635 InversePower{per_W: per_GW * T::from(1e-09_f64)}
16636 }
16637
16638 pub fn to_per_horsepower(&self) -> T {
16642 return self.per_W.clone() * T::from(745.7_f64);
16643 }
16644
16645 pub fn from_per_horsepower(per_horsepower: T) -> Self {
16652 InversePower{per_W: per_horsepower * T::from(0.0013410218586563_f64)}
16653 }
16654
16655}
16656
16657
16658#[cfg(feature="num-bigfloat")]
16660impl core::ops::Mul<InversePower<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
16661 type Output = InversePower<num_bigfloat::BigFloat>;
16662 fn mul(self, rhs: InversePower<num_bigfloat::BigFloat>) -> Self::Output {
16663 InversePower{per_W: self * rhs.per_W}
16664 }
16665}
16666#[cfg(feature="num-bigfloat")]
16668impl core::ops::Mul<InversePower<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
16669 type Output = InversePower<num_bigfloat::BigFloat>;
16670 fn mul(self, rhs: InversePower<num_bigfloat::BigFloat>) -> Self::Output {
16671 InversePower{per_W: self.clone() * rhs.per_W}
16672 }
16673}
16674#[cfg(feature="num-bigfloat")]
16676impl core::ops::Mul<&InversePower<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
16677 type Output = InversePower<num_bigfloat::BigFloat>;
16678 fn mul(self, rhs: &InversePower<num_bigfloat::BigFloat>) -> Self::Output {
16679 InversePower{per_W: self * rhs.per_W.clone()}
16680 }
16681}
16682#[cfg(feature="num-bigfloat")]
16684impl core::ops::Mul<&InversePower<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
16685 type Output = InversePower<num_bigfloat::BigFloat>;
16686 fn mul(self, rhs: &InversePower<num_bigfloat::BigFloat>) -> Self::Output {
16687 InversePower{per_W: self.clone() * rhs.per_W.clone()}
16688 }
16689}
16690
16691#[cfg(feature="num-complex")]
16693impl core::ops::Mul<InversePower<num_complex::Complex32>> for num_complex::Complex32 {
16694 type Output = InversePower<num_complex::Complex32>;
16695 fn mul(self, rhs: InversePower<num_complex::Complex32>) -> Self::Output {
16696 InversePower{per_W: self * rhs.per_W}
16697 }
16698}
16699#[cfg(feature="num-complex")]
16701impl core::ops::Mul<InversePower<num_complex::Complex32>> for &num_complex::Complex32 {
16702 type Output = InversePower<num_complex::Complex32>;
16703 fn mul(self, rhs: InversePower<num_complex::Complex32>) -> Self::Output {
16704 InversePower{per_W: self.clone() * rhs.per_W}
16705 }
16706}
16707#[cfg(feature="num-complex")]
16709impl core::ops::Mul<&InversePower<num_complex::Complex32>> for num_complex::Complex32 {
16710 type Output = InversePower<num_complex::Complex32>;
16711 fn mul(self, rhs: &InversePower<num_complex::Complex32>) -> Self::Output {
16712 InversePower{per_W: self * rhs.per_W.clone()}
16713 }
16714}
16715#[cfg(feature="num-complex")]
16717impl core::ops::Mul<&InversePower<num_complex::Complex32>> for &num_complex::Complex32 {
16718 type Output = InversePower<num_complex::Complex32>;
16719 fn mul(self, rhs: &InversePower<num_complex::Complex32>) -> Self::Output {
16720 InversePower{per_W: self.clone() * rhs.per_W.clone()}
16721 }
16722}
16723
16724#[cfg(feature="num-complex")]
16726impl core::ops::Mul<InversePower<num_complex::Complex64>> for num_complex::Complex64 {
16727 type Output = InversePower<num_complex::Complex64>;
16728 fn mul(self, rhs: InversePower<num_complex::Complex64>) -> Self::Output {
16729 InversePower{per_W: self * rhs.per_W}
16730 }
16731}
16732#[cfg(feature="num-complex")]
16734impl core::ops::Mul<InversePower<num_complex::Complex64>> for &num_complex::Complex64 {
16735 type Output = InversePower<num_complex::Complex64>;
16736 fn mul(self, rhs: InversePower<num_complex::Complex64>) -> Self::Output {
16737 InversePower{per_W: self.clone() * rhs.per_W}
16738 }
16739}
16740#[cfg(feature="num-complex")]
16742impl core::ops::Mul<&InversePower<num_complex::Complex64>> for num_complex::Complex64 {
16743 type Output = InversePower<num_complex::Complex64>;
16744 fn mul(self, rhs: &InversePower<num_complex::Complex64>) -> Self::Output {
16745 InversePower{per_W: self * rhs.per_W.clone()}
16746 }
16747}
16748#[cfg(feature="num-complex")]
16750impl core::ops::Mul<&InversePower<num_complex::Complex64>> for &num_complex::Complex64 {
16751 type Output = InversePower<num_complex::Complex64>;
16752 fn mul(self, rhs: &InversePower<num_complex::Complex64>) -> Self::Output {
16753 InversePower{per_W: self.clone() * rhs.per_W.clone()}
16754 }
16755}
16756
16757
16758
16759
16760impl<T> core::ops::Mul<Current<T>> for InversePower<T> where T: NumLike {
16763 type Output = InverseVoltage<T>;
16764 fn mul(self, rhs: Current<T>) -> Self::Output {
16765 InverseVoltage{per_V: self.per_W * rhs.A}
16766 }
16767}
16768impl<T> core::ops::Mul<Current<T>> for &InversePower<T> where T: NumLike {
16770 type Output = InverseVoltage<T>;
16771 fn mul(self, rhs: Current<T>) -> Self::Output {
16772 InverseVoltage{per_V: self.per_W.clone() * rhs.A}
16773 }
16774}
16775impl<T> core::ops::Mul<&Current<T>> for InversePower<T> where T: NumLike {
16777 type Output = InverseVoltage<T>;
16778 fn mul(self, rhs: &Current<T>) -> Self::Output {
16779 InverseVoltage{per_V: self.per_W * rhs.A.clone()}
16780 }
16781}
16782impl<T> core::ops::Mul<&Current<T>> for &InversePower<T> where T: NumLike {
16784 type Output = InverseVoltage<T>;
16785 fn mul(self, rhs: &Current<T>) -> Self::Output {
16786 InverseVoltage{per_V: self.per_W.clone() * rhs.A.clone()}
16787 }
16788}
16789
16790impl<T> core::ops::Div<InverseCurrent<T>> for InversePower<T> where T: NumLike {
16793 type Output = InverseVoltage<T>;
16794 fn div(self, rhs: InverseCurrent<T>) -> Self::Output {
16795 InverseVoltage{per_V: self.per_W / rhs.per_A}
16796 }
16797}
16798impl<T> core::ops::Div<InverseCurrent<T>> for &InversePower<T> where T: NumLike {
16800 type Output = InverseVoltage<T>;
16801 fn div(self, rhs: InverseCurrent<T>) -> Self::Output {
16802 InverseVoltage{per_V: self.per_W.clone() / rhs.per_A}
16803 }
16804}
16805impl<T> core::ops::Div<&InverseCurrent<T>> for InversePower<T> where T: NumLike {
16807 type Output = InverseVoltage<T>;
16808 fn div(self, rhs: &InverseCurrent<T>) -> Self::Output {
16809 InverseVoltage{per_V: self.per_W / rhs.per_A.clone()}
16810 }
16811}
16812impl<T> core::ops::Div<&InverseCurrent<T>> for &InversePower<T> where T: NumLike {
16814 type Output = InverseVoltage<T>;
16815 fn div(self, rhs: &InverseCurrent<T>) -> Self::Output {
16816 InverseVoltage{per_V: self.per_W.clone() / rhs.per_A.clone()}
16817 }
16818}
16819
16820impl<T> core::ops::Div<Time<T>> for InversePower<T> where T: NumLike {
16823 type Output = InverseEnergy<T>;
16824 fn div(self, rhs: Time<T>) -> Self::Output {
16825 InverseEnergy{per_J: self.per_W / rhs.s}
16826 }
16827}
16828impl<T> core::ops::Div<Time<T>> for &InversePower<T> where T: NumLike {
16830 type Output = InverseEnergy<T>;
16831 fn div(self, rhs: Time<T>) -> Self::Output {
16832 InverseEnergy{per_J: self.per_W.clone() / rhs.s}
16833 }
16834}
16835impl<T> core::ops::Div<&Time<T>> for InversePower<T> where T: NumLike {
16837 type Output = InverseEnergy<T>;
16838 fn div(self, rhs: &Time<T>) -> Self::Output {
16839 InverseEnergy{per_J: self.per_W / rhs.s.clone()}
16840 }
16841}
16842impl<T> core::ops::Div<&Time<T>> for &InversePower<T> where T: NumLike {
16844 type Output = InverseEnergy<T>;
16845 fn div(self, rhs: &Time<T>) -> Self::Output {
16846 InverseEnergy{per_J: self.per_W.clone() / rhs.s.clone()}
16847 }
16848}
16849
16850impl<T> core::ops::Div<InverseVoltage<T>> for InversePower<T> where T: NumLike {
16853 type Output = InverseCurrent<T>;
16854 fn div(self, rhs: InverseVoltage<T>) -> Self::Output {
16855 InverseCurrent{per_A: self.per_W / rhs.per_V}
16856 }
16857}
16858impl<T> core::ops::Div<InverseVoltage<T>> for &InversePower<T> where T: NumLike {
16860 type Output = InverseCurrent<T>;
16861 fn div(self, rhs: InverseVoltage<T>) -> Self::Output {
16862 InverseCurrent{per_A: self.per_W.clone() / rhs.per_V}
16863 }
16864}
16865impl<T> core::ops::Div<&InverseVoltage<T>> for InversePower<T> where T: NumLike {
16867 type Output = InverseCurrent<T>;
16868 fn div(self, rhs: &InverseVoltage<T>) -> Self::Output {
16869 InverseCurrent{per_A: self.per_W / rhs.per_V.clone()}
16870 }
16871}
16872impl<T> core::ops::Div<&InverseVoltage<T>> for &InversePower<T> where T: NumLike {
16874 type Output = InverseCurrent<T>;
16875 fn div(self, rhs: &InverseVoltage<T>) -> Self::Output {
16876 InverseCurrent{per_A: self.per_W.clone() / rhs.per_V.clone()}
16877 }
16878}
16879
16880impl<T> core::ops::Mul<Voltage<T>> for InversePower<T> where T: NumLike {
16883 type Output = InverseCurrent<T>;
16884 fn mul(self, rhs: Voltage<T>) -> Self::Output {
16885 InverseCurrent{per_A: self.per_W * rhs.V}
16886 }
16887}
16888impl<T> core::ops::Mul<Voltage<T>> for &InversePower<T> where T: NumLike {
16890 type Output = InverseCurrent<T>;
16891 fn mul(self, rhs: Voltage<T>) -> Self::Output {
16892 InverseCurrent{per_A: self.per_W.clone() * rhs.V}
16893 }
16894}
16895impl<T> core::ops::Mul<&Voltage<T>> for InversePower<T> where T: NumLike {
16897 type Output = InverseCurrent<T>;
16898 fn mul(self, rhs: &Voltage<T>) -> Self::Output {
16899 InverseCurrent{per_A: self.per_W * rhs.V.clone()}
16900 }
16901}
16902impl<T> core::ops::Mul<&Voltage<T>> for &InversePower<T> where T: NumLike {
16904 type Output = InverseCurrent<T>;
16905 fn mul(self, rhs: &Voltage<T>) -> Self::Output {
16906 InverseCurrent{per_A: self.per_W.clone() * rhs.V.clone()}
16907 }
16908}
16909
16910impl<T> core::ops::Mul<Acceleration<T>> for InversePower<T> where T: NumLike {
16913 type Output = InverseMomentum<T>;
16914 fn mul(self, rhs: Acceleration<T>) -> Self::Output {
16915 InverseMomentum{s_per_kgm: self.per_W * rhs.mps2}
16916 }
16917}
16918impl<T> core::ops::Mul<Acceleration<T>> for &InversePower<T> where T: NumLike {
16920 type Output = InverseMomentum<T>;
16921 fn mul(self, rhs: Acceleration<T>) -> Self::Output {
16922 InverseMomentum{s_per_kgm: self.per_W.clone() * rhs.mps2}
16923 }
16924}
16925impl<T> core::ops::Mul<&Acceleration<T>> for InversePower<T> where T: NumLike {
16927 type Output = InverseMomentum<T>;
16928 fn mul(self, rhs: &Acceleration<T>) -> Self::Output {
16929 InverseMomentum{s_per_kgm: self.per_W * rhs.mps2.clone()}
16930 }
16931}
16932impl<T> core::ops::Mul<&Acceleration<T>> for &InversePower<T> where T: NumLike {
16934 type Output = InverseMomentum<T>;
16935 fn mul(self, rhs: &Acceleration<T>) -> Self::Output {
16936 InverseMomentum{s_per_kgm: self.per_W.clone() * rhs.mps2.clone()}
16937 }
16938}
16939
16940impl<T> core::ops::Mul<Energy<T>> for InversePower<T> where T: NumLike {
16943 type Output = Time<T>;
16944 fn mul(self, rhs: Energy<T>) -> Self::Output {
16945 Time{s: self.per_W * rhs.J}
16946 }
16947}
16948impl<T> core::ops::Mul<Energy<T>> for &InversePower<T> where T: NumLike {
16950 type Output = Time<T>;
16951 fn mul(self, rhs: Energy<T>) -> Self::Output {
16952 Time{s: self.per_W.clone() * rhs.J}
16953 }
16954}
16955impl<T> core::ops::Mul<&Energy<T>> for InversePower<T> where T: NumLike {
16957 type Output = Time<T>;
16958 fn mul(self, rhs: &Energy<T>) -> Self::Output {
16959 Time{s: self.per_W * rhs.J.clone()}
16960 }
16961}
16962impl<T> core::ops::Mul<&Energy<T>> for &InversePower<T> where T: NumLike {
16964 type Output = Time<T>;
16965 fn mul(self, rhs: &Energy<T>) -> Self::Output {
16966 Time{s: self.per_W.clone() * rhs.J.clone()}
16967 }
16968}
16969
16970impl<T> core::ops::Mul<Torque<T>> for InversePower<T> where T: NumLike {
16973 type Output = Time<T>;
16974 fn mul(self, rhs: Torque<T>) -> Self::Output {
16975 Time{s: self.per_W * rhs.Nm}
16976 }
16977}
16978impl<T> core::ops::Mul<Torque<T>> for &InversePower<T> where T: NumLike {
16980 type Output = Time<T>;
16981 fn mul(self, rhs: Torque<T>) -> Self::Output {
16982 Time{s: self.per_W.clone() * rhs.Nm}
16983 }
16984}
16985impl<T> core::ops::Mul<&Torque<T>> for InversePower<T> where T: NumLike {
16987 type Output = Time<T>;
16988 fn mul(self, rhs: &Torque<T>) -> Self::Output {
16989 Time{s: self.per_W * rhs.Nm.clone()}
16990 }
16991}
16992impl<T> core::ops::Mul<&Torque<T>> for &InversePower<T> where T: NumLike {
16994 type Output = Time<T>;
16995 fn mul(self, rhs: &Torque<T>) -> Self::Output {
16996 Time{s: self.per_W.clone() * rhs.Nm.clone()}
16997 }
16998}
16999
17000impl<T> core::ops::Mul<Force<T>> for InversePower<T> where T: NumLike {
17003 type Output = TimePerDistance<T>;
17004 fn mul(self, rhs: Force<T>) -> Self::Output {
17005 TimePerDistance{spm: self.per_W * rhs.N}
17006 }
17007}
17008impl<T> core::ops::Mul<Force<T>> for &InversePower<T> where T: NumLike {
17010 type Output = TimePerDistance<T>;
17011 fn mul(self, rhs: Force<T>) -> Self::Output {
17012 TimePerDistance{spm: self.per_W.clone() * rhs.N}
17013 }
17014}
17015impl<T> core::ops::Mul<&Force<T>> for InversePower<T> where T: NumLike {
17017 type Output = TimePerDistance<T>;
17018 fn mul(self, rhs: &Force<T>) -> Self::Output {
17019 TimePerDistance{spm: self.per_W * rhs.N.clone()}
17020 }
17021}
17022impl<T> core::ops::Mul<&Force<T>> for &InversePower<T> where T: NumLike {
17024 type Output = TimePerDistance<T>;
17025 fn mul(self, rhs: &Force<T>) -> Self::Output {
17026 TimePerDistance{spm: self.per_W.clone() * rhs.N.clone()}
17027 }
17028}
17029
17030impl<T> core::ops::Mul<Frequency<T>> for InversePower<T> where T: NumLike {
17033 type Output = InverseEnergy<T>;
17034 fn mul(self, rhs: Frequency<T>) -> Self::Output {
17035 InverseEnergy{per_J: self.per_W * rhs.Hz}
17036 }
17037}
17038impl<T> core::ops::Mul<Frequency<T>> for &InversePower<T> where T: NumLike {
17040 type Output = InverseEnergy<T>;
17041 fn mul(self, rhs: Frequency<T>) -> Self::Output {
17042 InverseEnergy{per_J: self.per_W.clone() * rhs.Hz}
17043 }
17044}
17045impl<T> core::ops::Mul<&Frequency<T>> for InversePower<T> where T: NumLike {
17047 type Output = InverseEnergy<T>;
17048 fn mul(self, rhs: &Frequency<T>) -> Self::Output {
17049 InverseEnergy{per_J: self.per_W * rhs.Hz.clone()}
17050 }
17051}
17052impl<T> core::ops::Mul<&Frequency<T>> for &InversePower<T> where T: NumLike {
17054 type Output = InverseEnergy<T>;
17055 fn mul(self, rhs: &Frequency<T>) -> Self::Output {
17056 InverseEnergy{per_J: self.per_W.clone() * rhs.Hz.clone()}
17057 }
17058}
17059
17060impl<T> core::ops::Div<InverseAcceleration<T>> for InversePower<T> where T: NumLike {
17063 type Output = InverseMomentum<T>;
17064 fn div(self, rhs: InverseAcceleration<T>) -> Self::Output {
17065 InverseMomentum{s_per_kgm: self.per_W / rhs.s2pm}
17066 }
17067}
17068impl<T> core::ops::Div<InverseAcceleration<T>> for &InversePower<T> where T: NumLike {
17070 type Output = InverseMomentum<T>;
17071 fn div(self, rhs: InverseAcceleration<T>) -> Self::Output {
17072 InverseMomentum{s_per_kgm: self.per_W.clone() / rhs.s2pm}
17073 }
17074}
17075impl<T> core::ops::Div<&InverseAcceleration<T>> for InversePower<T> where T: NumLike {
17077 type Output = InverseMomentum<T>;
17078 fn div(self, rhs: &InverseAcceleration<T>) -> Self::Output {
17079 InverseMomentum{s_per_kgm: self.per_W / rhs.s2pm.clone()}
17080 }
17081}
17082impl<T> core::ops::Div<&InverseAcceleration<T>> for &InversePower<T> where T: NumLike {
17084 type Output = InverseMomentum<T>;
17085 fn div(self, rhs: &InverseAcceleration<T>) -> Self::Output {
17086 InverseMomentum{s_per_kgm: self.per_W.clone() / rhs.s2pm.clone()}
17087 }
17088}
17089
17090impl<T> core::ops::Div<InverseEnergy<T>> for InversePower<T> where T: NumLike {
17093 type Output = Time<T>;
17094 fn div(self, rhs: InverseEnergy<T>) -> Self::Output {
17095 Time{s: self.per_W / rhs.per_J}
17096 }
17097}
17098impl<T> core::ops::Div<InverseEnergy<T>> for &InversePower<T> where T: NumLike {
17100 type Output = Time<T>;
17101 fn div(self, rhs: InverseEnergy<T>) -> Self::Output {
17102 Time{s: self.per_W.clone() / rhs.per_J}
17103 }
17104}
17105impl<T> core::ops::Div<&InverseEnergy<T>> for InversePower<T> where T: NumLike {
17107 type Output = Time<T>;
17108 fn div(self, rhs: &InverseEnergy<T>) -> Self::Output {
17109 Time{s: self.per_W / rhs.per_J.clone()}
17110 }
17111}
17112impl<T> core::ops::Div<&InverseEnergy<T>> for &InversePower<T> where T: NumLike {
17114 type Output = Time<T>;
17115 fn div(self, rhs: &InverseEnergy<T>) -> Self::Output {
17116 Time{s: self.per_W.clone() / rhs.per_J.clone()}
17117 }
17118}
17119
17120impl<T> core::ops::Div<InverseTorque<T>> for InversePower<T> where T: NumLike {
17123 type Output = Time<T>;
17124 fn div(self, rhs: InverseTorque<T>) -> Self::Output {
17125 Time{s: self.per_W / rhs.per_Nm}
17126 }
17127}
17128impl<T> core::ops::Div<InverseTorque<T>> for &InversePower<T> where T: NumLike {
17130 type Output = Time<T>;
17131 fn div(self, rhs: InverseTorque<T>) -> Self::Output {
17132 Time{s: self.per_W.clone() / rhs.per_Nm}
17133 }
17134}
17135impl<T> core::ops::Div<&InverseTorque<T>> for InversePower<T> where T: NumLike {
17137 type Output = Time<T>;
17138 fn div(self, rhs: &InverseTorque<T>) -> Self::Output {
17139 Time{s: self.per_W / rhs.per_Nm.clone()}
17140 }
17141}
17142impl<T> core::ops::Div<&InverseTorque<T>> for &InversePower<T> where T: NumLike {
17144 type Output = Time<T>;
17145 fn div(self, rhs: &InverseTorque<T>) -> Self::Output {
17146 Time{s: self.per_W.clone() / rhs.per_Nm.clone()}
17147 }
17148}
17149
17150impl<T> core::ops::Div<InverseForce<T>> for InversePower<T> where T: NumLike {
17153 type Output = TimePerDistance<T>;
17154 fn div(self, rhs: InverseForce<T>) -> Self::Output {
17155 TimePerDistance{spm: self.per_W / rhs.per_N}
17156 }
17157}
17158impl<T> core::ops::Div<InverseForce<T>> for &InversePower<T> where T: NumLike {
17160 type Output = TimePerDistance<T>;
17161 fn div(self, rhs: InverseForce<T>) -> Self::Output {
17162 TimePerDistance{spm: self.per_W.clone() / rhs.per_N}
17163 }
17164}
17165impl<T> core::ops::Div<&InverseForce<T>> for InversePower<T> where T: NumLike {
17167 type Output = TimePerDistance<T>;
17168 fn div(self, rhs: &InverseForce<T>) -> Self::Output {
17169 TimePerDistance{spm: self.per_W / rhs.per_N.clone()}
17170 }
17171}
17172impl<T> core::ops::Div<&InverseForce<T>> for &InversePower<T> where T: NumLike {
17174 type Output = TimePerDistance<T>;
17175 fn div(self, rhs: &InverseForce<T>) -> Self::Output {
17176 TimePerDistance{spm: self.per_W.clone() / rhs.per_N.clone()}
17177 }
17178}
17179
17180impl<T> core::ops::Div<InverseMomentum<T>> for InversePower<T> where T: NumLike {
17183 type Output = InverseAcceleration<T>;
17184 fn div(self, rhs: InverseMomentum<T>) -> Self::Output {
17185 InverseAcceleration{s2pm: self.per_W / rhs.s_per_kgm}
17186 }
17187}
17188impl<T> core::ops::Div<InverseMomentum<T>> for &InversePower<T> where T: NumLike {
17190 type Output = InverseAcceleration<T>;
17191 fn div(self, rhs: InverseMomentum<T>) -> Self::Output {
17192 InverseAcceleration{s2pm: self.per_W.clone() / rhs.s_per_kgm}
17193 }
17194}
17195impl<T> core::ops::Div<&InverseMomentum<T>> for InversePower<T> where T: NumLike {
17197 type Output = InverseAcceleration<T>;
17198 fn div(self, rhs: &InverseMomentum<T>) -> Self::Output {
17199 InverseAcceleration{s2pm: self.per_W / rhs.s_per_kgm.clone()}
17200 }
17201}
17202impl<T> core::ops::Div<&InverseMomentum<T>> for &InversePower<T> where T: NumLike {
17204 type Output = InverseAcceleration<T>;
17205 fn div(self, rhs: &InverseMomentum<T>) -> Self::Output {
17206 InverseAcceleration{s2pm: self.per_W.clone() / rhs.s_per_kgm.clone()}
17207 }
17208}
17209
17210impl<T> core::ops::Mul<Momentum<T>> for InversePower<T> where T: NumLike {
17213 type Output = InverseAcceleration<T>;
17214 fn mul(self, rhs: Momentum<T>) -> Self::Output {
17215 InverseAcceleration{s2pm: self.per_W * rhs.kgmps}
17216 }
17217}
17218impl<T> core::ops::Mul<Momentum<T>> for &InversePower<T> where T: NumLike {
17220 type Output = InverseAcceleration<T>;
17221 fn mul(self, rhs: Momentum<T>) -> Self::Output {
17222 InverseAcceleration{s2pm: self.per_W.clone() * rhs.kgmps}
17223 }
17224}
17225impl<T> core::ops::Mul<&Momentum<T>> for InversePower<T> where T: NumLike {
17227 type Output = InverseAcceleration<T>;
17228 fn mul(self, rhs: &Momentum<T>) -> Self::Output {
17229 InverseAcceleration{s2pm: self.per_W * rhs.kgmps.clone()}
17230 }
17231}
17232impl<T> core::ops::Mul<&Momentum<T>> for &InversePower<T> where T: NumLike {
17234 type Output = InverseAcceleration<T>;
17235 fn mul(self, rhs: &Momentum<T>) -> Self::Output {
17236 InverseAcceleration{s2pm: self.per_W.clone() * rhs.kgmps.clone()}
17237 }
17238}
17239
17240impl<T> core::ops::Div<TimePerDistance<T>> for InversePower<T> where T: NumLike {
17243 type Output = InverseForce<T>;
17244 fn div(self, rhs: TimePerDistance<T>) -> Self::Output {
17245 InverseForce{per_N: self.per_W / rhs.spm}
17246 }
17247}
17248impl<T> core::ops::Div<TimePerDistance<T>> for &InversePower<T> where T: NumLike {
17250 type Output = InverseForce<T>;
17251 fn div(self, rhs: TimePerDistance<T>) -> Self::Output {
17252 InverseForce{per_N: self.per_W.clone() / rhs.spm}
17253 }
17254}
17255impl<T> core::ops::Div<&TimePerDistance<T>> for InversePower<T> where T: NumLike {
17257 type Output = InverseForce<T>;
17258 fn div(self, rhs: &TimePerDistance<T>) -> Self::Output {
17259 InverseForce{per_N: self.per_W / rhs.spm.clone()}
17260 }
17261}
17262impl<T> core::ops::Div<&TimePerDistance<T>> for &InversePower<T> where T: NumLike {
17264 type Output = InverseForce<T>;
17265 fn div(self, rhs: &TimePerDistance<T>) -> Self::Output {
17266 InverseForce{per_N: self.per_W.clone() / rhs.spm.clone()}
17267 }
17268}
17269
17270impl<T> core::ops::Mul<Velocity<T>> for InversePower<T> where T: NumLike {
17273 type Output = InverseForce<T>;
17274 fn mul(self, rhs: Velocity<T>) -> Self::Output {
17275 InverseForce{per_N: self.per_W * rhs.mps}
17276 }
17277}
17278impl<T> core::ops::Mul<Velocity<T>> for &InversePower<T> where T: NumLike {
17280 type Output = InverseForce<T>;
17281 fn mul(self, rhs: Velocity<T>) -> Self::Output {
17282 InverseForce{per_N: self.per_W.clone() * rhs.mps}
17283 }
17284}
17285impl<T> core::ops::Mul<&Velocity<T>> for InversePower<T> where T: NumLike {
17287 type Output = InverseForce<T>;
17288 fn mul(self, rhs: &Velocity<T>) -> Self::Output {
17289 InverseForce{per_N: self.per_W * rhs.mps.clone()}
17290 }
17291}
17292impl<T> core::ops::Mul<&Velocity<T>> for &InversePower<T> where T: NumLike {
17294 type Output = InverseForce<T>;
17295 fn mul(self, rhs: &Velocity<T>) -> Self::Output {
17296 InverseForce{per_N: self.per_W.clone() * rhs.mps.clone()}
17297 }
17298}
17299
17300impl<T> core::ops::Div<InversePower<T>> for f64 where T: NumLike+From<f64> {
17303 type Output = Power<T>;
17304 fn div(self, rhs: InversePower<T>) -> Self::Output {
17305 Power{W: T::from(self) / rhs.per_W}
17306 }
17307}
17308impl<T> core::ops::Div<InversePower<T>> for &f64 where T: NumLike+From<f64> {
17310 type Output = Power<T>;
17311 fn div(self, rhs: InversePower<T>) -> Self::Output {
17312 Power{W: T::from(self.clone()) / rhs.per_W}
17313 }
17314}
17315impl<T> core::ops::Div<&InversePower<T>> for f64 where T: NumLike+From<f64> {
17317 type Output = Power<T>;
17318 fn div(self, rhs: &InversePower<T>) -> Self::Output {
17319 Power{W: T::from(self) / rhs.per_W.clone()}
17320 }
17321}
17322impl<T> core::ops::Div<&InversePower<T>> for &f64 where T: NumLike+From<f64> {
17324 type Output = Power<T>;
17325 fn div(self, rhs: &InversePower<T>) -> Self::Output {
17326 Power{W: T::from(self.clone()) / rhs.per_W.clone()}
17327 }
17328}
17329
17330impl<T> core::ops::Div<InversePower<T>> for f32 where T: NumLike+From<f32> {
17333 type Output = Power<T>;
17334 fn div(self, rhs: InversePower<T>) -> Self::Output {
17335 Power{W: T::from(self) / rhs.per_W}
17336 }
17337}
17338impl<T> core::ops::Div<InversePower<T>> for &f32 where T: NumLike+From<f32> {
17340 type Output = Power<T>;
17341 fn div(self, rhs: InversePower<T>) -> Self::Output {
17342 Power{W: T::from(self.clone()) / rhs.per_W}
17343 }
17344}
17345impl<T> core::ops::Div<&InversePower<T>> for f32 where T: NumLike+From<f32> {
17347 type Output = Power<T>;
17348 fn div(self, rhs: &InversePower<T>) -> Self::Output {
17349 Power{W: T::from(self) / rhs.per_W.clone()}
17350 }
17351}
17352impl<T> core::ops::Div<&InversePower<T>> for &f32 where T: NumLike+From<f32> {
17354 type Output = Power<T>;
17355 fn div(self, rhs: &InversePower<T>) -> Self::Output {
17356 Power{W: T::from(self.clone()) / rhs.per_W.clone()}
17357 }
17358}
17359
17360impl<T> core::ops::Div<InversePower<T>> for i64 where T: NumLike+From<i64> {
17363 type Output = Power<T>;
17364 fn div(self, rhs: InversePower<T>) -> Self::Output {
17365 Power{W: T::from(self) / rhs.per_W}
17366 }
17367}
17368impl<T> core::ops::Div<InversePower<T>> for &i64 where T: NumLike+From<i64> {
17370 type Output = Power<T>;
17371 fn div(self, rhs: InversePower<T>) -> Self::Output {
17372 Power{W: T::from(self.clone()) / rhs.per_W}
17373 }
17374}
17375impl<T> core::ops::Div<&InversePower<T>> for i64 where T: NumLike+From<i64> {
17377 type Output = Power<T>;
17378 fn div(self, rhs: &InversePower<T>) -> Self::Output {
17379 Power{W: T::from(self) / rhs.per_W.clone()}
17380 }
17381}
17382impl<T> core::ops::Div<&InversePower<T>> for &i64 where T: NumLike+From<i64> {
17384 type Output = Power<T>;
17385 fn div(self, rhs: &InversePower<T>) -> Self::Output {
17386 Power{W: T::from(self.clone()) / rhs.per_W.clone()}
17387 }
17388}
17389
17390impl<T> core::ops::Div<InversePower<T>> for i32 where T: NumLike+From<i32> {
17393 type Output = Power<T>;
17394 fn div(self, rhs: InversePower<T>) -> Self::Output {
17395 Power{W: T::from(self) / rhs.per_W}
17396 }
17397}
17398impl<T> core::ops::Div<InversePower<T>> for &i32 where T: NumLike+From<i32> {
17400 type Output = Power<T>;
17401 fn div(self, rhs: InversePower<T>) -> Self::Output {
17402 Power{W: T::from(self.clone()) / rhs.per_W}
17403 }
17404}
17405impl<T> core::ops::Div<&InversePower<T>> for i32 where T: NumLike+From<i32> {
17407 type Output = Power<T>;
17408 fn div(self, rhs: &InversePower<T>) -> Self::Output {
17409 Power{W: T::from(self) / rhs.per_W.clone()}
17410 }
17411}
17412impl<T> core::ops::Div<&InversePower<T>> for &i32 where T: NumLike+From<i32> {
17414 type Output = Power<T>;
17415 fn div(self, rhs: &InversePower<T>) -> Self::Output {
17416 Power{W: T::from(self.clone()) / rhs.per_W.clone()}
17417 }
17418}
17419
17420#[cfg(feature="num-bigfloat")]
17423impl<T> core::ops::Div<InversePower<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
17424 type Output = Power<T>;
17425 fn div(self, rhs: InversePower<T>) -> Self::Output {
17426 Power{W: T::from(self) / rhs.per_W}
17427 }
17428}
17429#[cfg(feature="num-bigfloat")]
17431impl<T> core::ops::Div<InversePower<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
17432 type Output = Power<T>;
17433 fn div(self, rhs: InversePower<T>) -> Self::Output {
17434 Power{W: T::from(self.clone()) / rhs.per_W}
17435 }
17436}
17437#[cfg(feature="num-bigfloat")]
17439impl<T> core::ops::Div<&InversePower<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
17440 type Output = Power<T>;
17441 fn div(self, rhs: &InversePower<T>) -> Self::Output {
17442 Power{W: T::from(self) / rhs.per_W.clone()}
17443 }
17444}
17445#[cfg(feature="num-bigfloat")]
17447impl<T> core::ops::Div<&InversePower<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
17448 type Output = Power<T>;
17449 fn div(self, rhs: &InversePower<T>) -> Self::Output {
17450 Power{W: T::from(self.clone()) / rhs.per_W.clone()}
17451 }
17452}
17453
17454#[cfg(feature="num-complex")]
17457impl<T> core::ops::Div<InversePower<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
17458 type Output = Power<T>;
17459 fn div(self, rhs: InversePower<T>) -> Self::Output {
17460 Power{W: T::from(self) / rhs.per_W}
17461 }
17462}
17463#[cfg(feature="num-complex")]
17465impl<T> core::ops::Div<InversePower<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
17466 type Output = Power<T>;
17467 fn div(self, rhs: InversePower<T>) -> Self::Output {
17468 Power{W: T::from(self.clone()) / rhs.per_W}
17469 }
17470}
17471#[cfg(feature="num-complex")]
17473impl<T> core::ops::Div<&InversePower<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
17474 type Output = Power<T>;
17475 fn div(self, rhs: &InversePower<T>) -> Self::Output {
17476 Power{W: T::from(self) / rhs.per_W.clone()}
17477 }
17478}
17479#[cfg(feature="num-complex")]
17481impl<T> core::ops::Div<&InversePower<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
17482 type Output = Power<T>;
17483 fn div(self, rhs: &InversePower<T>) -> Self::Output {
17484 Power{W: T::from(self.clone()) / rhs.per_W.clone()}
17485 }
17486}
17487
17488#[cfg(feature="num-complex")]
17491impl<T> core::ops::Div<InversePower<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
17492 type Output = Power<T>;
17493 fn div(self, rhs: InversePower<T>) -> Self::Output {
17494 Power{W: T::from(self) / rhs.per_W}
17495 }
17496}
17497#[cfg(feature="num-complex")]
17499impl<T> core::ops::Div<InversePower<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
17500 type Output = Power<T>;
17501 fn div(self, rhs: InversePower<T>) -> Self::Output {
17502 Power{W: T::from(self.clone()) / rhs.per_W}
17503 }
17504}
17505#[cfg(feature="num-complex")]
17507impl<T> core::ops::Div<&InversePower<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
17508 type Output = Power<T>;
17509 fn div(self, rhs: &InversePower<T>) -> Self::Output {
17510 Power{W: T::from(self) / rhs.per_W.clone()}
17511 }
17512}
17513#[cfg(feature="num-complex")]
17515impl<T> core::ops::Div<&InversePower<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
17516 type Output = Power<T>;
17517 fn div(self, rhs: &InversePower<T>) -> Self::Output {
17518 Power{W: T::from(self.clone()) / rhs.per_W.clone()}
17519 }
17520}
17521
17522#[derive(UnitStruct, Debug, Clone)]
17524#[cfg_attr(feature="serde", derive(Serialize, Deserialize))]
17525pub struct InversePressure<T: NumLike>{
17526 pub per_Pa: T
17528}
17529
17530impl<T> InversePressure<T> where T: NumLike {
17531
17532 pub fn unit_name() -> &'static str { "inverse pascals" }
17534
17535 pub fn unit_symbol() -> &'static str { "1/Pa" }
17537
17538 pub fn from_per_Pa(per_Pa: T) -> Self { InversePressure{per_Pa: per_Pa} }
17543
17544 pub fn to_per_Pa(&self) -> T { self.per_Pa.clone() }
17546
17547 pub fn from_per_pascal(per_pascal: T) -> Self { InversePressure{per_Pa: per_pascal} }
17552
17553 pub fn to_per_pascal(&self) -> T { self.per_Pa.clone() }
17555
17556}
17557
17558impl<T> fmt::Display for InversePressure<T> where T: NumLike {
17559 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
17560 write!(f, "{} {}", &self.per_Pa, Self::unit_symbol())
17561 }
17562}
17563
17564impl<T> InversePressure<T> where T: NumLike+From<f64> {
17565
17566 pub fn to_per_psi(&self) -> T {
17570 return self.per_Pa.clone() * T::from(6894.7572931783_f64);
17571 }
17572
17573 pub fn from_per_psi(per_psi: T) -> Self {
17580 InversePressure{per_Pa: per_psi * T::from(0.00014503773773_f64)}
17581 }
17582
17583 pub fn to_per_mPa(&self) -> T {
17587 return self.per_Pa.clone() * T::from(0.001_f64);
17588 }
17589
17590 pub fn from_per_mPa(per_mPa: T) -> Self {
17597 InversePressure{per_Pa: per_mPa * T::from(1000.0_f64)}
17598 }
17599
17600 pub fn to_per_uPa(&self) -> T {
17604 return self.per_Pa.clone() * T::from(1e-06_f64);
17605 }
17606
17607 pub fn from_per_uPa(per_uPa: T) -> Self {
17614 InversePressure{per_Pa: per_uPa * T::from(1000000.0_f64)}
17615 }
17616
17617 pub fn to_per_nPa(&self) -> T {
17621 return self.per_Pa.clone() * T::from(1e-09_f64);
17622 }
17623
17624 pub fn from_per_nPa(per_nPa: T) -> Self {
17631 InversePressure{per_Pa: per_nPa * T::from(1000000000.0_f64)}
17632 }
17633
17634 pub fn to_per_kPa(&self) -> T {
17638 return self.per_Pa.clone() * T::from(1000.0_f64);
17639 }
17640
17641 pub fn from_per_kPa(per_kPa: T) -> Self {
17648 InversePressure{per_Pa: per_kPa * T::from(0.001_f64)}
17649 }
17650
17651 pub fn to_per_MPa(&self) -> T {
17655 return self.per_Pa.clone() * T::from(1000000.0_f64);
17656 }
17657
17658 pub fn from_per_MPa(per_MPa: T) -> Self {
17665 InversePressure{per_Pa: per_MPa * T::from(1e-06_f64)}
17666 }
17667
17668 pub fn to_per_GPa(&self) -> T {
17672 return self.per_Pa.clone() * T::from(1000000000.0_f64);
17673 }
17674
17675 pub fn from_per_GPa(per_GPa: T) -> Self {
17682 InversePressure{per_Pa: per_GPa * T::from(1e-09_f64)}
17683 }
17684
17685 pub fn to_per_hPa(&self) -> T {
17689 return self.per_Pa.clone() * T::from(100.0_f64);
17690 }
17691
17692 pub fn from_per_hPa(per_hPa: T) -> Self {
17699 InversePressure{per_Pa: per_hPa * T::from(0.01_f64)}
17700 }
17701
17702 pub fn to_per_bar(&self) -> T {
17706 return self.per_Pa.clone() * T::from(100000.0_f64);
17707 }
17708
17709 pub fn from_per_bar(per_bar: T) -> Self {
17716 InversePressure{per_Pa: per_bar * T::from(1e-05_f64)}
17717 }
17718
17719 pub fn to_per_mbar(&self) -> T {
17723 return self.per_Pa.clone() * T::from(100.0_f64);
17724 }
17725
17726 pub fn from_per_mbar(per_mbar: T) -> Self {
17733 InversePressure{per_Pa: per_mbar * T::from(0.01_f64)}
17734 }
17735
17736 pub fn to_per_atm(&self) -> T {
17740 return self.per_Pa.clone() * T::from(101325.0_f64);
17741 }
17742
17743 pub fn from_per_atm(per_atm: T) -> Self {
17750 InversePressure{per_Pa: per_atm * T::from(9.87e-06_f64)}
17751 }
17752
17753 pub fn to_per_torr(&self) -> T {
17757 return self.per_Pa.clone() * T::from(133.3223684211_f64);
17758 }
17759
17760 pub fn from_per_torr(per_torr: T) -> Self {
17767 InversePressure{per_Pa: per_torr * T::from(0.007500616827039_f64)}
17768 }
17769
17770 pub fn to_per_mmHg(&self) -> T {
17774 return self.per_Pa.clone() * T::from(133.3223684211_f64);
17775 }
17776
17777 pub fn from_per_mmHg(per_mmHg: T) -> Self {
17784 InversePressure{per_Pa: per_mmHg * T::from(0.007500616827039_f64)}
17785 }
17786
17787}
17788
17789
17790#[cfg(feature="num-bigfloat")]
17792impl core::ops::Mul<InversePressure<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
17793 type Output = InversePressure<num_bigfloat::BigFloat>;
17794 fn mul(self, rhs: InversePressure<num_bigfloat::BigFloat>) -> Self::Output {
17795 InversePressure{per_Pa: self * rhs.per_Pa}
17796 }
17797}
17798#[cfg(feature="num-bigfloat")]
17800impl core::ops::Mul<InversePressure<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
17801 type Output = InversePressure<num_bigfloat::BigFloat>;
17802 fn mul(self, rhs: InversePressure<num_bigfloat::BigFloat>) -> Self::Output {
17803 InversePressure{per_Pa: self.clone() * rhs.per_Pa}
17804 }
17805}
17806#[cfg(feature="num-bigfloat")]
17808impl core::ops::Mul<&InversePressure<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
17809 type Output = InversePressure<num_bigfloat::BigFloat>;
17810 fn mul(self, rhs: &InversePressure<num_bigfloat::BigFloat>) -> Self::Output {
17811 InversePressure{per_Pa: self * rhs.per_Pa.clone()}
17812 }
17813}
17814#[cfg(feature="num-bigfloat")]
17816impl core::ops::Mul<&InversePressure<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
17817 type Output = InversePressure<num_bigfloat::BigFloat>;
17818 fn mul(self, rhs: &InversePressure<num_bigfloat::BigFloat>) -> Self::Output {
17819 InversePressure{per_Pa: self.clone() * rhs.per_Pa.clone()}
17820 }
17821}
17822
17823#[cfg(feature="num-complex")]
17825impl core::ops::Mul<InversePressure<num_complex::Complex32>> for num_complex::Complex32 {
17826 type Output = InversePressure<num_complex::Complex32>;
17827 fn mul(self, rhs: InversePressure<num_complex::Complex32>) -> Self::Output {
17828 InversePressure{per_Pa: self * rhs.per_Pa}
17829 }
17830}
17831#[cfg(feature="num-complex")]
17833impl core::ops::Mul<InversePressure<num_complex::Complex32>> for &num_complex::Complex32 {
17834 type Output = InversePressure<num_complex::Complex32>;
17835 fn mul(self, rhs: InversePressure<num_complex::Complex32>) -> Self::Output {
17836 InversePressure{per_Pa: self.clone() * rhs.per_Pa}
17837 }
17838}
17839#[cfg(feature="num-complex")]
17841impl core::ops::Mul<&InversePressure<num_complex::Complex32>> for num_complex::Complex32 {
17842 type Output = InversePressure<num_complex::Complex32>;
17843 fn mul(self, rhs: &InversePressure<num_complex::Complex32>) -> Self::Output {
17844 InversePressure{per_Pa: self * rhs.per_Pa.clone()}
17845 }
17846}
17847#[cfg(feature="num-complex")]
17849impl core::ops::Mul<&InversePressure<num_complex::Complex32>> for &num_complex::Complex32 {
17850 type Output = InversePressure<num_complex::Complex32>;
17851 fn mul(self, rhs: &InversePressure<num_complex::Complex32>) -> Self::Output {
17852 InversePressure{per_Pa: self.clone() * rhs.per_Pa.clone()}
17853 }
17854}
17855
17856#[cfg(feature="num-complex")]
17858impl core::ops::Mul<InversePressure<num_complex::Complex64>> for num_complex::Complex64 {
17859 type Output = InversePressure<num_complex::Complex64>;
17860 fn mul(self, rhs: InversePressure<num_complex::Complex64>) -> Self::Output {
17861 InversePressure{per_Pa: self * rhs.per_Pa}
17862 }
17863}
17864#[cfg(feature="num-complex")]
17866impl core::ops::Mul<InversePressure<num_complex::Complex64>> for &num_complex::Complex64 {
17867 type Output = InversePressure<num_complex::Complex64>;
17868 fn mul(self, rhs: InversePressure<num_complex::Complex64>) -> Self::Output {
17869 InversePressure{per_Pa: self.clone() * rhs.per_Pa}
17870 }
17871}
17872#[cfg(feature="num-complex")]
17874impl core::ops::Mul<&InversePressure<num_complex::Complex64>> for num_complex::Complex64 {
17875 type Output = InversePressure<num_complex::Complex64>;
17876 fn mul(self, rhs: &InversePressure<num_complex::Complex64>) -> Self::Output {
17877 InversePressure{per_Pa: self * rhs.per_Pa.clone()}
17878 }
17879}
17880#[cfg(feature="num-complex")]
17882impl core::ops::Mul<&InversePressure<num_complex::Complex64>> for &num_complex::Complex64 {
17883 type Output = InversePressure<num_complex::Complex64>;
17884 fn mul(self, rhs: &InversePressure<num_complex::Complex64>) -> Self::Output {
17885 InversePressure{per_Pa: self.clone() * rhs.per_Pa.clone()}
17886 }
17887}
17888
17889
17890
17891
17892impl<T> core::ops::Div<Area<T>> for InversePressure<T> where T: NumLike {
17895 type Output = InverseForce<T>;
17896 fn div(self, rhs: Area<T>) -> Self::Output {
17897 InverseForce{per_N: self.per_Pa / rhs.m2}
17898 }
17899}
17900impl<T> core::ops::Div<Area<T>> for &InversePressure<T> where T: NumLike {
17902 type Output = InverseForce<T>;
17903 fn div(self, rhs: Area<T>) -> Self::Output {
17904 InverseForce{per_N: self.per_Pa.clone() / rhs.m2}
17905 }
17906}
17907impl<T> core::ops::Div<&Area<T>> for InversePressure<T> where T: NumLike {
17909 type Output = InverseForce<T>;
17910 fn div(self, rhs: &Area<T>) -> Self::Output {
17911 InverseForce{per_N: self.per_Pa / rhs.m2.clone()}
17912 }
17913}
17914impl<T> core::ops::Div<&Area<T>> for &InversePressure<T> where T: NumLike {
17916 type Output = InverseForce<T>;
17917 fn div(self, rhs: &Area<T>) -> Self::Output {
17918 InverseForce{per_N: self.per_Pa.clone() / rhs.m2.clone()}
17919 }
17920}
17921
17922impl<T> core::ops::Mul<InverseArea<T>> for InversePressure<T> where T: NumLike {
17925 type Output = InverseForce<T>;
17926 fn mul(self, rhs: InverseArea<T>) -> Self::Output {
17927 InverseForce{per_N: self.per_Pa * rhs.per_m2}
17928 }
17929}
17930impl<T> core::ops::Mul<InverseArea<T>> for &InversePressure<T> where T: NumLike {
17932 type Output = InverseForce<T>;
17933 fn mul(self, rhs: InverseArea<T>) -> Self::Output {
17934 InverseForce{per_N: self.per_Pa.clone() * rhs.per_m2}
17935 }
17936}
17937impl<T> core::ops::Mul<&InverseArea<T>> for InversePressure<T> where T: NumLike {
17939 type Output = InverseForce<T>;
17940 fn mul(self, rhs: &InverseArea<T>) -> Self::Output {
17941 InverseForce{per_N: self.per_Pa * rhs.per_m2.clone()}
17942 }
17943}
17944impl<T> core::ops::Mul<&InverseArea<T>> for &InversePressure<T> where T: NumLike {
17946 type Output = InverseForce<T>;
17947 fn mul(self, rhs: &InverseArea<T>) -> Self::Output {
17948 InverseForce{per_N: self.per_Pa.clone() * rhs.per_m2.clone()}
17949 }
17950}
17951
17952impl<T> core::ops::Mul<InverseVolume<T>> for InversePressure<T> where T: NumLike {
17955 type Output = InverseEnergy<T>;
17956 fn mul(self, rhs: InverseVolume<T>) -> Self::Output {
17957 InverseEnergy{per_J: self.per_Pa * rhs.per_m3}
17958 }
17959}
17960impl<T> core::ops::Mul<InverseVolume<T>> for &InversePressure<T> where T: NumLike {
17962 type Output = InverseEnergy<T>;
17963 fn mul(self, rhs: InverseVolume<T>) -> Self::Output {
17964 InverseEnergy{per_J: self.per_Pa.clone() * rhs.per_m3}
17965 }
17966}
17967impl<T> core::ops::Mul<&InverseVolume<T>> for InversePressure<T> where T: NumLike {
17969 type Output = InverseEnergy<T>;
17970 fn mul(self, rhs: &InverseVolume<T>) -> Self::Output {
17971 InverseEnergy{per_J: self.per_Pa * rhs.per_m3.clone()}
17972 }
17973}
17974impl<T> core::ops::Mul<&InverseVolume<T>> for &InversePressure<T> where T: NumLike {
17976 type Output = InverseEnergy<T>;
17977 fn mul(self, rhs: &InverseVolume<T>) -> Self::Output {
17978 InverseEnergy{per_J: self.per_Pa.clone() * rhs.per_m3.clone()}
17979 }
17980}
17981
17982impl<T> core::ops::Div<Volume<T>> for InversePressure<T> where T: NumLike {
17985 type Output = InverseEnergy<T>;
17986 fn div(self, rhs: Volume<T>) -> Self::Output {
17987 InverseEnergy{per_J: self.per_Pa / rhs.m3}
17988 }
17989}
17990impl<T> core::ops::Div<Volume<T>> for &InversePressure<T> where T: NumLike {
17992 type Output = InverseEnergy<T>;
17993 fn div(self, rhs: Volume<T>) -> Self::Output {
17994 InverseEnergy{per_J: self.per_Pa.clone() / rhs.m3}
17995 }
17996}
17997impl<T> core::ops::Div<&Volume<T>> for InversePressure<T> where T: NumLike {
17999 type Output = InverseEnergy<T>;
18000 fn div(self, rhs: &Volume<T>) -> Self::Output {
18001 InverseEnergy{per_J: self.per_Pa / rhs.m3.clone()}
18002 }
18003}
18004impl<T> core::ops::Div<&Volume<T>> for &InversePressure<T> where T: NumLike {
18006 type Output = InverseEnergy<T>;
18007 fn div(self, rhs: &Volume<T>) -> Self::Output {
18008 InverseEnergy{per_J: self.per_Pa.clone() / rhs.m3.clone()}
18009 }
18010}
18011
18012impl<T> core::ops::Mul<Acceleration<T>> for InversePressure<T> where T: NumLike {
18015 type Output = AreaPerMass<T>;
18016 fn mul(self, rhs: Acceleration<T>) -> Self::Output {
18017 AreaPerMass{m2_per_kg: self.per_Pa * rhs.mps2}
18018 }
18019}
18020impl<T> core::ops::Mul<Acceleration<T>> for &InversePressure<T> where T: NumLike {
18022 type Output = AreaPerMass<T>;
18023 fn mul(self, rhs: Acceleration<T>) -> Self::Output {
18024 AreaPerMass{m2_per_kg: self.per_Pa.clone() * rhs.mps2}
18025 }
18026}
18027impl<T> core::ops::Mul<&Acceleration<T>> for InversePressure<T> where T: NumLike {
18029 type Output = AreaPerMass<T>;
18030 fn mul(self, rhs: &Acceleration<T>) -> Self::Output {
18031 AreaPerMass{m2_per_kg: self.per_Pa * rhs.mps2.clone()}
18032 }
18033}
18034impl<T> core::ops::Mul<&Acceleration<T>> for &InversePressure<T> where T: NumLike {
18036 type Output = AreaPerMass<T>;
18037 fn mul(self, rhs: &Acceleration<T>) -> Self::Output {
18038 AreaPerMass{m2_per_kg: self.per_Pa.clone() * rhs.mps2.clone()}
18039 }
18040}
18041
18042impl<T> core::ops::Mul<AreaDensity<T>> for InversePressure<T> where T: NumLike {
18045 type Output = InverseAcceleration<T>;
18046 fn mul(self, rhs: AreaDensity<T>) -> Self::Output {
18047 InverseAcceleration{s2pm: self.per_Pa * rhs.kgpm2}
18048 }
18049}
18050impl<T> core::ops::Mul<AreaDensity<T>> for &InversePressure<T> where T: NumLike {
18052 type Output = InverseAcceleration<T>;
18053 fn mul(self, rhs: AreaDensity<T>) -> Self::Output {
18054 InverseAcceleration{s2pm: self.per_Pa.clone() * rhs.kgpm2}
18055 }
18056}
18057impl<T> core::ops::Mul<&AreaDensity<T>> for InversePressure<T> where T: NumLike {
18059 type Output = InverseAcceleration<T>;
18060 fn mul(self, rhs: &AreaDensity<T>) -> Self::Output {
18061 InverseAcceleration{s2pm: self.per_Pa * rhs.kgpm2.clone()}
18062 }
18063}
18064impl<T> core::ops::Mul<&AreaDensity<T>> for &InversePressure<T> where T: NumLike {
18066 type Output = InverseAcceleration<T>;
18067 fn mul(self, rhs: &AreaDensity<T>) -> Self::Output {
18068 InverseAcceleration{s2pm: self.per_Pa.clone() * rhs.kgpm2.clone()}
18069 }
18070}
18071
18072impl<T> core::ops::Div<AreaPerMass<T>> for InversePressure<T> where T: NumLike {
18075 type Output = InverseAcceleration<T>;
18076 fn div(self, rhs: AreaPerMass<T>) -> Self::Output {
18077 InverseAcceleration{s2pm: self.per_Pa / rhs.m2_per_kg}
18078 }
18079}
18080impl<T> core::ops::Div<AreaPerMass<T>> for &InversePressure<T> where T: NumLike {
18082 type Output = InverseAcceleration<T>;
18083 fn div(self, rhs: AreaPerMass<T>) -> Self::Output {
18084 InverseAcceleration{s2pm: self.per_Pa.clone() / rhs.m2_per_kg}
18085 }
18086}
18087impl<T> core::ops::Div<&AreaPerMass<T>> for InversePressure<T> where T: NumLike {
18089 type Output = InverseAcceleration<T>;
18090 fn div(self, rhs: &AreaPerMass<T>) -> Self::Output {
18091 InverseAcceleration{s2pm: self.per_Pa / rhs.m2_per_kg.clone()}
18092 }
18093}
18094impl<T> core::ops::Div<&AreaPerMass<T>> for &InversePressure<T> where T: NumLike {
18096 type Output = InverseAcceleration<T>;
18097 fn div(self, rhs: &AreaPerMass<T>) -> Self::Output {
18098 InverseAcceleration{s2pm: self.per_Pa.clone() / rhs.m2_per_kg.clone()}
18099 }
18100}
18101
18102impl<T> core::ops::Mul<Energy<T>> for InversePressure<T> where T: NumLike {
18105 type Output = Volume<T>;
18106 fn mul(self, rhs: Energy<T>) -> Self::Output {
18107 Volume{m3: self.per_Pa * rhs.J}
18108 }
18109}
18110impl<T> core::ops::Mul<Energy<T>> for &InversePressure<T> where T: NumLike {
18112 type Output = Volume<T>;
18113 fn mul(self, rhs: Energy<T>) -> Self::Output {
18114 Volume{m3: self.per_Pa.clone() * rhs.J}
18115 }
18116}
18117impl<T> core::ops::Mul<&Energy<T>> for InversePressure<T> where T: NumLike {
18119 type Output = Volume<T>;
18120 fn mul(self, rhs: &Energy<T>) -> Self::Output {
18121 Volume{m3: self.per_Pa * rhs.J.clone()}
18122 }
18123}
18124impl<T> core::ops::Mul<&Energy<T>> for &InversePressure<T> where T: NumLike {
18126 type Output = Volume<T>;
18127 fn mul(self, rhs: &Energy<T>) -> Self::Output {
18128 Volume{m3: self.per_Pa.clone() * rhs.J.clone()}
18129 }
18130}
18131
18132impl<T> core::ops::Mul<Torque<T>> for InversePressure<T> where T: NumLike {
18135 type Output = Volume<T>;
18136 fn mul(self, rhs: Torque<T>) -> Self::Output {
18137 Volume{m3: self.per_Pa * rhs.Nm}
18138 }
18139}
18140impl<T> core::ops::Mul<Torque<T>> for &InversePressure<T> where T: NumLike {
18142 type Output = Volume<T>;
18143 fn mul(self, rhs: Torque<T>) -> Self::Output {
18144 Volume{m3: self.per_Pa.clone() * rhs.Nm}
18145 }
18146}
18147impl<T> core::ops::Mul<&Torque<T>> for InversePressure<T> where T: NumLike {
18149 type Output = Volume<T>;
18150 fn mul(self, rhs: &Torque<T>) -> Self::Output {
18151 Volume{m3: self.per_Pa * rhs.Nm.clone()}
18152 }
18153}
18154impl<T> core::ops::Mul<&Torque<T>> for &InversePressure<T> where T: NumLike {
18156 type Output = Volume<T>;
18157 fn mul(self, rhs: &Torque<T>) -> Self::Output {
18158 Volume{m3: self.per_Pa.clone() * rhs.Nm.clone()}
18159 }
18160}
18161
18162impl<T> core::ops::Mul<Force<T>> for InversePressure<T> where T: NumLike {
18165 type Output = Area<T>;
18166 fn mul(self, rhs: Force<T>) -> Self::Output {
18167 Area{m2: self.per_Pa * rhs.N}
18168 }
18169}
18170impl<T> core::ops::Mul<Force<T>> for &InversePressure<T> where T: NumLike {
18172 type Output = Area<T>;
18173 fn mul(self, rhs: Force<T>) -> Self::Output {
18174 Area{m2: self.per_Pa.clone() * rhs.N}
18175 }
18176}
18177impl<T> core::ops::Mul<&Force<T>> for InversePressure<T> where T: NumLike {
18179 type Output = Area<T>;
18180 fn mul(self, rhs: &Force<T>) -> Self::Output {
18181 Area{m2: self.per_Pa * rhs.N.clone()}
18182 }
18183}
18184impl<T> core::ops::Mul<&Force<T>> for &InversePressure<T> where T: NumLike {
18186 type Output = Area<T>;
18187 fn mul(self, rhs: &Force<T>) -> Self::Output {
18188 Area{m2: self.per_Pa.clone() * rhs.N.clone()}
18189 }
18190}
18191
18192impl<T> core::ops::Div<InverseAcceleration<T>> for InversePressure<T> where T: NumLike {
18195 type Output = AreaPerMass<T>;
18196 fn div(self, rhs: InverseAcceleration<T>) -> Self::Output {
18197 AreaPerMass{m2_per_kg: self.per_Pa / rhs.s2pm}
18198 }
18199}
18200impl<T> core::ops::Div<InverseAcceleration<T>> for &InversePressure<T> where T: NumLike {
18202 type Output = AreaPerMass<T>;
18203 fn div(self, rhs: InverseAcceleration<T>) -> Self::Output {
18204 AreaPerMass{m2_per_kg: self.per_Pa.clone() / rhs.s2pm}
18205 }
18206}
18207impl<T> core::ops::Div<&InverseAcceleration<T>> for InversePressure<T> where T: NumLike {
18209 type Output = AreaPerMass<T>;
18210 fn div(self, rhs: &InverseAcceleration<T>) -> Self::Output {
18211 AreaPerMass{m2_per_kg: self.per_Pa / rhs.s2pm.clone()}
18212 }
18213}
18214impl<T> core::ops::Div<&InverseAcceleration<T>> for &InversePressure<T> where T: NumLike {
18216 type Output = AreaPerMass<T>;
18217 fn div(self, rhs: &InverseAcceleration<T>) -> Self::Output {
18218 AreaPerMass{m2_per_kg: self.per_Pa.clone() / rhs.s2pm.clone()}
18219 }
18220}
18221
18222impl<T> core::ops::Div<InverseEnergy<T>> for InversePressure<T> where T: NumLike {
18225 type Output = Volume<T>;
18226 fn div(self, rhs: InverseEnergy<T>) -> Self::Output {
18227 Volume{m3: self.per_Pa / rhs.per_J}
18228 }
18229}
18230impl<T> core::ops::Div<InverseEnergy<T>> for &InversePressure<T> where T: NumLike {
18232 type Output = Volume<T>;
18233 fn div(self, rhs: InverseEnergy<T>) -> Self::Output {
18234 Volume{m3: self.per_Pa.clone() / rhs.per_J}
18235 }
18236}
18237impl<T> core::ops::Div<&InverseEnergy<T>> for InversePressure<T> where T: NumLike {
18239 type Output = Volume<T>;
18240 fn div(self, rhs: &InverseEnergy<T>) -> Self::Output {
18241 Volume{m3: self.per_Pa / rhs.per_J.clone()}
18242 }
18243}
18244impl<T> core::ops::Div<&InverseEnergy<T>> for &InversePressure<T> where T: NumLike {
18246 type Output = Volume<T>;
18247 fn div(self, rhs: &InverseEnergy<T>) -> Self::Output {
18248 Volume{m3: self.per_Pa.clone() / rhs.per_J.clone()}
18249 }
18250}
18251
18252impl<T> core::ops::Div<InverseTorque<T>> for InversePressure<T> where T: NumLike {
18255 type Output = Volume<T>;
18256 fn div(self, rhs: InverseTorque<T>) -> Self::Output {
18257 Volume{m3: self.per_Pa / rhs.per_Nm}
18258 }
18259}
18260impl<T> core::ops::Div<InverseTorque<T>> for &InversePressure<T> where T: NumLike {
18262 type Output = Volume<T>;
18263 fn div(self, rhs: InverseTorque<T>) -> Self::Output {
18264 Volume{m3: self.per_Pa.clone() / rhs.per_Nm}
18265 }
18266}
18267impl<T> core::ops::Div<&InverseTorque<T>> for InversePressure<T> where T: NumLike {
18269 type Output = Volume<T>;
18270 fn div(self, rhs: &InverseTorque<T>) -> Self::Output {
18271 Volume{m3: self.per_Pa / rhs.per_Nm.clone()}
18272 }
18273}
18274impl<T> core::ops::Div<&InverseTorque<T>> for &InversePressure<T> where T: NumLike {
18276 type Output = Volume<T>;
18277 fn div(self, rhs: &InverseTorque<T>) -> Self::Output {
18278 Volume{m3: self.per_Pa.clone() / rhs.per_Nm.clone()}
18279 }
18280}
18281
18282impl<T> core::ops::Div<InverseForce<T>> for InversePressure<T> where T: NumLike {
18285 type Output = Area<T>;
18286 fn div(self, rhs: InverseForce<T>) -> Self::Output {
18287 Area{m2: self.per_Pa / rhs.per_N}
18288 }
18289}
18290impl<T> core::ops::Div<InverseForce<T>> for &InversePressure<T> where T: NumLike {
18292 type Output = Area<T>;
18293 fn div(self, rhs: InverseForce<T>) -> Self::Output {
18294 Area{m2: self.per_Pa.clone() / rhs.per_N}
18295 }
18296}
18297impl<T> core::ops::Div<&InverseForce<T>> for InversePressure<T> where T: NumLike {
18299 type Output = Area<T>;
18300 fn div(self, rhs: &InverseForce<T>) -> Self::Output {
18301 Area{m2: self.per_Pa / rhs.per_N.clone()}
18302 }
18303}
18304impl<T> core::ops::Div<&InverseForce<T>> for &InversePressure<T> where T: NumLike {
18306 type Output = Area<T>;
18307 fn div(self, rhs: &InverseForce<T>) -> Self::Output {
18308 Area{m2: self.per_Pa.clone() / rhs.per_N.clone()}
18309 }
18310}
18311
18312impl<T> core::ops::Div<InverseAbsorbedDose<T>> for InversePressure<T> where T: NumLike {
18315 type Output = VolumePerMass<T>;
18316 fn div(self, rhs: InverseAbsorbedDose<T>) -> Self::Output {
18317 VolumePerMass{m3_per_kg: self.per_Pa / rhs.per_Gy}
18318 }
18319}
18320impl<T> core::ops::Div<InverseAbsorbedDose<T>> for &InversePressure<T> where T: NumLike {
18322 type Output = VolumePerMass<T>;
18323 fn div(self, rhs: InverseAbsorbedDose<T>) -> Self::Output {
18324 VolumePerMass{m3_per_kg: self.per_Pa.clone() / rhs.per_Gy}
18325 }
18326}
18327impl<T> core::ops::Div<&InverseAbsorbedDose<T>> for InversePressure<T> where T: NumLike {
18329 type Output = VolumePerMass<T>;
18330 fn div(self, rhs: &InverseAbsorbedDose<T>) -> Self::Output {
18331 VolumePerMass{m3_per_kg: self.per_Pa / rhs.per_Gy.clone()}
18332 }
18333}
18334impl<T> core::ops::Div<&InverseAbsorbedDose<T>> for &InversePressure<T> where T: NumLike {
18336 type Output = VolumePerMass<T>;
18337 fn div(self, rhs: &InverseAbsorbedDose<T>) -> Self::Output {
18338 VolumePerMass{m3_per_kg: self.per_Pa.clone() / rhs.per_Gy.clone()}
18339 }
18340}
18341
18342impl<T> core::ops::Div<InverseDoseEquivalent<T>> for InversePressure<T> where T: NumLike {
18345 type Output = VolumePerMass<T>;
18346 fn div(self, rhs: InverseDoseEquivalent<T>) -> Self::Output {
18347 VolumePerMass{m3_per_kg: self.per_Pa / rhs.per_Sv}
18348 }
18349}
18350impl<T> core::ops::Div<InverseDoseEquivalent<T>> for &InversePressure<T> where T: NumLike {
18352 type Output = VolumePerMass<T>;
18353 fn div(self, rhs: InverseDoseEquivalent<T>) -> Self::Output {
18354 VolumePerMass{m3_per_kg: self.per_Pa.clone() / rhs.per_Sv}
18355 }
18356}
18357impl<T> core::ops::Div<&InverseDoseEquivalent<T>> for InversePressure<T> where T: NumLike {
18359 type Output = VolumePerMass<T>;
18360 fn div(self, rhs: &InverseDoseEquivalent<T>) -> Self::Output {
18361 VolumePerMass{m3_per_kg: self.per_Pa / rhs.per_Sv.clone()}
18362 }
18363}
18364impl<T> core::ops::Div<&InverseDoseEquivalent<T>> for &InversePressure<T> where T: NumLike {
18366 type Output = VolumePerMass<T>;
18367 fn div(self, rhs: &InverseDoseEquivalent<T>) -> Self::Output {
18368 VolumePerMass{m3_per_kg: self.per_Pa.clone() / rhs.per_Sv.clone()}
18369 }
18370}
18371
18372impl<T> core::ops::Div<InversePressure<T>> for f64 where T: NumLike+From<f64> {
18375 type Output = Pressure<T>;
18376 fn div(self, rhs: InversePressure<T>) -> Self::Output {
18377 Pressure{Pa: T::from(self) / rhs.per_Pa}
18378 }
18379}
18380impl<T> core::ops::Div<InversePressure<T>> for &f64 where T: NumLike+From<f64> {
18382 type Output = Pressure<T>;
18383 fn div(self, rhs: InversePressure<T>) -> Self::Output {
18384 Pressure{Pa: T::from(self.clone()) / rhs.per_Pa}
18385 }
18386}
18387impl<T> core::ops::Div<&InversePressure<T>> for f64 where T: NumLike+From<f64> {
18389 type Output = Pressure<T>;
18390 fn div(self, rhs: &InversePressure<T>) -> Self::Output {
18391 Pressure{Pa: T::from(self) / rhs.per_Pa.clone()}
18392 }
18393}
18394impl<T> core::ops::Div<&InversePressure<T>> for &f64 where T: NumLike+From<f64> {
18396 type Output = Pressure<T>;
18397 fn div(self, rhs: &InversePressure<T>) -> Self::Output {
18398 Pressure{Pa: T::from(self.clone()) / rhs.per_Pa.clone()}
18399 }
18400}
18401
18402impl<T> core::ops::Div<InversePressure<T>> for f32 where T: NumLike+From<f32> {
18405 type Output = Pressure<T>;
18406 fn div(self, rhs: InversePressure<T>) -> Self::Output {
18407 Pressure{Pa: T::from(self) / rhs.per_Pa}
18408 }
18409}
18410impl<T> core::ops::Div<InversePressure<T>> for &f32 where T: NumLike+From<f32> {
18412 type Output = Pressure<T>;
18413 fn div(self, rhs: InversePressure<T>) -> Self::Output {
18414 Pressure{Pa: T::from(self.clone()) / rhs.per_Pa}
18415 }
18416}
18417impl<T> core::ops::Div<&InversePressure<T>> for f32 where T: NumLike+From<f32> {
18419 type Output = Pressure<T>;
18420 fn div(self, rhs: &InversePressure<T>) -> Self::Output {
18421 Pressure{Pa: T::from(self) / rhs.per_Pa.clone()}
18422 }
18423}
18424impl<T> core::ops::Div<&InversePressure<T>> for &f32 where T: NumLike+From<f32> {
18426 type Output = Pressure<T>;
18427 fn div(self, rhs: &InversePressure<T>) -> Self::Output {
18428 Pressure{Pa: T::from(self.clone()) / rhs.per_Pa.clone()}
18429 }
18430}
18431
18432impl<T> core::ops::Div<InversePressure<T>> for i64 where T: NumLike+From<i64> {
18435 type Output = Pressure<T>;
18436 fn div(self, rhs: InversePressure<T>) -> Self::Output {
18437 Pressure{Pa: T::from(self) / rhs.per_Pa}
18438 }
18439}
18440impl<T> core::ops::Div<InversePressure<T>> for &i64 where T: NumLike+From<i64> {
18442 type Output = Pressure<T>;
18443 fn div(self, rhs: InversePressure<T>) -> Self::Output {
18444 Pressure{Pa: T::from(self.clone()) / rhs.per_Pa}
18445 }
18446}
18447impl<T> core::ops::Div<&InversePressure<T>> for i64 where T: NumLike+From<i64> {
18449 type Output = Pressure<T>;
18450 fn div(self, rhs: &InversePressure<T>) -> Self::Output {
18451 Pressure{Pa: T::from(self) / rhs.per_Pa.clone()}
18452 }
18453}
18454impl<T> core::ops::Div<&InversePressure<T>> for &i64 where T: NumLike+From<i64> {
18456 type Output = Pressure<T>;
18457 fn div(self, rhs: &InversePressure<T>) -> Self::Output {
18458 Pressure{Pa: T::from(self.clone()) / rhs.per_Pa.clone()}
18459 }
18460}
18461
18462impl<T> core::ops::Div<InversePressure<T>> for i32 where T: NumLike+From<i32> {
18465 type Output = Pressure<T>;
18466 fn div(self, rhs: InversePressure<T>) -> Self::Output {
18467 Pressure{Pa: T::from(self) / rhs.per_Pa}
18468 }
18469}
18470impl<T> core::ops::Div<InversePressure<T>> for &i32 where T: NumLike+From<i32> {
18472 type Output = Pressure<T>;
18473 fn div(self, rhs: InversePressure<T>) -> Self::Output {
18474 Pressure{Pa: T::from(self.clone()) / rhs.per_Pa}
18475 }
18476}
18477impl<T> core::ops::Div<&InversePressure<T>> for i32 where T: NumLike+From<i32> {
18479 type Output = Pressure<T>;
18480 fn div(self, rhs: &InversePressure<T>) -> Self::Output {
18481 Pressure{Pa: T::from(self) / rhs.per_Pa.clone()}
18482 }
18483}
18484impl<T> core::ops::Div<&InversePressure<T>> for &i32 where T: NumLike+From<i32> {
18486 type Output = Pressure<T>;
18487 fn div(self, rhs: &InversePressure<T>) -> Self::Output {
18488 Pressure{Pa: T::from(self.clone()) / rhs.per_Pa.clone()}
18489 }
18490}
18491
18492#[cfg(feature="num-bigfloat")]
18495impl<T> core::ops::Div<InversePressure<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
18496 type Output = Pressure<T>;
18497 fn div(self, rhs: InversePressure<T>) -> Self::Output {
18498 Pressure{Pa: T::from(self) / rhs.per_Pa}
18499 }
18500}
18501#[cfg(feature="num-bigfloat")]
18503impl<T> core::ops::Div<InversePressure<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
18504 type Output = Pressure<T>;
18505 fn div(self, rhs: InversePressure<T>) -> Self::Output {
18506 Pressure{Pa: T::from(self.clone()) / rhs.per_Pa}
18507 }
18508}
18509#[cfg(feature="num-bigfloat")]
18511impl<T> core::ops::Div<&InversePressure<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
18512 type Output = Pressure<T>;
18513 fn div(self, rhs: &InversePressure<T>) -> Self::Output {
18514 Pressure{Pa: T::from(self) / rhs.per_Pa.clone()}
18515 }
18516}
18517#[cfg(feature="num-bigfloat")]
18519impl<T> core::ops::Div<&InversePressure<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
18520 type Output = Pressure<T>;
18521 fn div(self, rhs: &InversePressure<T>) -> Self::Output {
18522 Pressure{Pa: T::from(self.clone()) / rhs.per_Pa.clone()}
18523 }
18524}
18525
18526#[cfg(feature="num-complex")]
18529impl<T> core::ops::Div<InversePressure<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
18530 type Output = Pressure<T>;
18531 fn div(self, rhs: InversePressure<T>) -> Self::Output {
18532 Pressure{Pa: T::from(self) / rhs.per_Pa}
18533 }
18534}
18535#[cfg(feature="num-complex")]
18537impl<T> core::ops::Div<InversePressure<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
18538 type Output = Pressure<T>;
18539 fn div(self, rhs: InversePressure<T>) -> Self::Output {
18540 Pressure{Pa: T::from(self.clone()) / rhs.per_Pa}
18541 }
18542}
18543#[cfg(feature="num-complex")]
18545impl<T> core::ops::Div<&InversePressure<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
18546 type Output = Pressure<T>;
18547 fn div(self, rhs: &InversePressure<T>) -> Self::Output {
18548 Pressure{Pa: T::from(self) / rhs.per_Pa.clone()}
18549 }
18550}
18551#[cfg(feature="num-complex")]
18553impl<T> core::ops::Div<&InversePressure<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
18554 type Output = Pressure<T>;
18555 fn div(self, rhs: &InversePressure<T>) -> Self::Output {
18556 Pressure{Pa: T::from(self.clone()) / rhs.per_Pa.clone()}
18557 }
18558}
18559
18560#[cfg(feature="num-complex")]
18563impl<T> core::ops::Div<InversePressure<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
18564 type Output = Pressure<T>;
18565 fn div(self, rhs: InversePressure<T>) -> Self::Output {
18566 Pressure{Pa: T::from(self) / rhs.per_Pa}
18567 }
18568}
18569#[cfg(feature="num-complex")]
18571impl<T> core::ops::Div<InversePressure<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
18572 type Output = Pressure<T>;
18573 fn div(self, rhs: InversePressure<T>) -> Self::Output {
18574 Pressure{Pa: T::from(self.clone()) / rhs.per_Pa}
18575 }
18576}
18577#[cfg(feature="num-complex")]
18579impl<T> core::ops::Div<&InversePressure<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
18580 type Output = Pressure<T>;
18581 fn div(self, rhs: &InversePressure<T>) -> Self::Output {
18582 Pressure{Pa: T::from(self) / rhs.per_Pa.clone()}
18583 }
18584}
18585#[cfg(feature="num-complex")]
18587impl<T> core::ops::Div<&InversePressure<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
18588 type Output = Pressure<T>;
18589 fn div(self, rhs: &InversePressure<T>) -> Self::Output {
18590 Pressure{Pa: T::from(self.clone()) / rhs.per_Pa.clone()}
18591 }
18592}
18593
18594#[derive(UnitStruct, Debug, Clone)]
18596#[cfg_attr(feature="serde", derive(Serialize, Deserialize))]
18597pub struct InverseTorque<T: NumLike>{
18598 pub per_Nm: T
18600}
18601
18602impl<T> InverseTorque<T> where T: NumLike {
18603
18604 pub fn unit_name() -> &'static str { "inverse newton meters" }
18606
18607 pub fn unit_symbol() -> &'static str { "1/Nm" }
18609
18610 pub fn from_per_Nm(per_Nm: T) -> Self { InverseTorque{per_Nm: per_Nm} }
18615
18616 pub fn to_per_Nm(&self) -> T { self.per_Nm.clone() }
18618
18619 pub fn from_per_newton_meter(per_newton_meter: T) -> Self { InverseTorque{per_Nm: per_newton_meter} }
18624
18625 pub fn to_per_newton_meter(&self) -> T { self.per_Nm.clone() }
18627
18628}
18629
18630impl<T> fmt::Display for InverseTorque<T> where T: NumLike {
18631 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
18632 write!(f, "{} {}", &self.per_Nm, Self::unit_symbol())
18633 }
18634}
18635
18636impl<T> InverseTorque<T> where T: NumLike+From<f64> {
18637
18638 pub fn to_per_ftlb(&self) -> T {
18642 return self.per_Nm.clone() * T::from(1.35581794833139_f64);
18643 }
18644
18645 pub fn from_per_ftlb(per_ftlb: T) -> Self {
18652 InverseTorque{per_Nm: per_ftlb * T::from(0.73756214927727_f64)}
18653 }
18654
18655}
18656
18657
18658#[cfg(feature="num-bigfloat")]
18660impl core::ops::Mul<InverseTorque<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
18661 type Output = InverseTorque<num_bigfloat::BigFloat>;
18662 fn mul(self, rhs: InverseTorque<num_bigfloat::BigFloat>) -> Self::Output {
18663 InverseTorque{per_Nm: self * rhs.per_Nm}
18664 }
18665}
18666#[cfg(feature="num-bigfloat")]
18668impl core::ops::Mul<InverseTorque<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
18669 type Output = InverseTorque<num_bigfloat::BigFloat>;
18670 fn mul(self, rhs: InverseTorque<num_bigfloat::BigFloat>) -> Self::Output {
18671 InverseTorque{per_Nm: self.clone() * rhs.per_Nm}
18672 }
18673}
18674#[cfg(feature="num-bigfloat")]
18676impl core::ops::Mul<&InverseTorque<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
18677 type Output = InverseTorque<num_bigfloat::BigFloat>;
18678 fn mul(self, rhs: &InverseTorque<num_bigfloat::BigFloat>) -> Self::Output {
18679 InverseTorque{per_Nm: self * rhs.per_Nm.clone()}
18680 }
18681}
18682#[cfg(feature="num-bigfloat")]
18684impl core::ops::Mul<&InverseTorque<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
18685 type Output = InverseTorque<num_bigfloat::BigFloat>;
18686 fn mul(self, rhs: &InverseTorque<num_bigfloat::BigFloat>) -> Self::Output {
18687 InverseTorque{per_Nm: self.clone() * rhs.per_Nm.clone()}
18688 }
18689}
18690
18691#[cfg(feature="num-complex")]
18693impl core::ops::Mul<InverseTorque<num_complex::Complex32>> for num_complex::Complex32 {
18694 type Output = InverseTorque<num_complex::Complex32>;
18695 fn mul(self, rhs: InverseTorque<num_complex::Complex32>) -> Self::Output {
18696 InverseTorque{per_Nm: self * rhs.per_Nm}
18697 }
18698}
18699#[cfg(feature="num-complex")]
18701impl core::ops::Mul<InverseTorque<num_complex::Complex32>> for &num_complex::Complex32 {
18702 type Output = InverseTorque<num_complex::Complex32>;
18703 fn mul(self, rhs: InverseTorque<num_complex::Complex32>) -> Self::Output {
18704 InverseTorque{per_Nm: self.clone() * rhs.per_Nm}
18705 }
18706}
18707#[cfg(feature="num-complex")]
18709impl core::ops::Mul<&InverseTorque<num_complex::Complex32>> for num_complex::Complex32 {
18710 type Output = InverseTorque<num_complex::Complex32>;
18711 fn mul(self, rhs: &InverseTorque<num_complex::Complex32>) -> Self::Output {
18712 InverseTorque{per_Nm: self * rhs.per_Nm.clone()}
18713 }
18714}
18715#[cfg(feature="num-complex")]
18717impl core::ops::Mul<&InverseTorque<num_complex::Complex32>> for &num_complex::Complex32 {
18718 type Output = InverseTorque<num_complex::Complex32>;
18719 fn mul(self, rhs: &InverseTorque<num_complex::Complex32>) -> Self::Output {
18720 InverseTorque{per_Nm: self.clone() * rhs.per_Nm.clone()}
18721 }
18722}
18723
18724#[cfg(feature="num-complex")]
18726impl core::ops::Mul<InverseTorque<num_complex::Complex64>> for num_complex::Complex64 {
18727 type Output = InverseTorque<num_complex::Complex64>;
18728 fn mul(self, rhs: InverseTorque<num_complex::Complex64>) -> Self::Output {
18729 InverseTorque{per_Nm: self * rhs.per_Nm}
18730 }
18731}
18732#[cfg(feature="num-complex")]
18734impl core::ops::Mul<InverseTorque<num_complex::Complex64>> for &num_complex::Complex64 {
18735 type Output = InverseTorque<num_complex::Complex64>;
18736 fn mul(self, rhs: InverseTorque<num_complex::Complex64>) -> Self::Output {
18737 InverseTorque{per_Nm: self.clone() * rhs.per_Nm}
18738 }
18739}
18740#[cfg(feature="num-complex")]
18742impl core::ops::Mul<&InverseTorque<num_complex::Complex64>> for num_complex::Complex64 {
18743 type Output = InverseTorque<num_complex::Complex64>;
18744 fn mul(self, rhs: &InverseTorque<num_complex::Complex64>) -> Self::Output {
18745 InverseTorque{per_Nm: self * rhs.per_Nm.clone()}
18746 }
18747}
18748#[cfg(feature="num-complex")]
18750impl core::ops::Mul<&InverseTorque<num_complex::Complex64>> for &num_complex::Complex64 {
18751 type Output = InverseTorque<num_complex::Complex64>;
18752 fn mul(self, rhs: &InverseTorque<num_complex::Complex64>) -> Self::Output {
18753 InverseTorque{per_Nm: self.clone() * rhs.per_Nm.clone()}
18754 }
18755}
18756
18757
18758
18759
18760impl<T> core::ops::Mul<Current<T>> for InverseTorque<T> where T: NumLike {
18763 type Output = InverseMagneticFlux<T>;
18764 fn mul(self, rhs: Current<T>) -> Self::Output {
18765 InverseMagneticFlux{per_Wb: self.per_Nm * rhs.A}
18766 }
18767}
18768impl<T> core::ops::Mul<Current<T>> for &InverseTorque<T> where T: NumLike {
18770 type Output = InverseMagneticFlux<T>;
18771 fn mul(self, rhs: Current<T>) -> Self::Output {
18772 InverseMagneticFlux{per_Wb: self.per_Nm.clone() * rhs.A}
18773 }
18774}
18775impl<T> core::ops::Mul<&Current<T>> for InverseTorque<T> where T: NumLike {
18777 type Output = InverseMagneticFlux<T>;
18778 fn mul(self, rhs: &Current<T>) -> Self::Output {
18779 InverseMagneticFlux{per_Wb: self.per_Nm * rhs.A.clone()}
18780 }
18781}
18782impl<T> core::ops::Mul<&Current<T>> for &InverseTorque<T> where T: NumLike {
18784 type Output = InverseMagneticFlux<T>;
18785 fn mul(self, rhs: &Current<T>) -> Self::Output {
18786 InverseMagneticFlux{per_Wb: self.per_Nm.clone() * rhs.A.clone()}
18787 }
18788}
18789
18790impl<T> core::ops::Mul<Distance<T>> for InverseTorque<T> where T: NumLike {
18793 type Output = InverseForce<T>;
18794 fn mul(self, rhs: Distance<T>) -> Self::Output {
18795 InverseForce{per_N: self.per_Nm * rhs.m}
18796 }
18797}
18798impl<T> core::ops::Mul<Distance<T>> for &InverseTorque<T> where T: NumLike {
18800 type Output = InverseForce<T>;
18801 fn mul(self, rhs: Distance<T>) -> Self::Output {
18802 InverseForce{per_N: self.per_Nm.clone() * rhs.m}
18803 }
18804}
18805impl<T> core::ops::Mul<&Distance<T>> for InverseTorque<T> where T: NumLike {
18807 type Output = InverseForce<T>;
18808 fn mul(self, rhs: &Distance<T>) -> Self::Output {
18809 InverseForce{per_N: self.per_Nm * rhs.m.clone()}
18810 }
18811}
18812impl<T> core::ops::Mul<&Distance<T>> for &InverseTorque<T> where T: NumLike {
18814 type Output = InverseForce<T>;
18815 fn mul(self, rhs: &Distance<T>) -> Self::Output {
18816 InverseForce{per_N: self.per_Nm.clone() * rhs.m.clone()}
18817 }
18818}
18819
18820impl<T> core::ops::Div<InverseCurrent<T>> for InverseTorque<T> where T: NumLike {
18823 type Output = InverseMagneticFlux<T>;
18824 fn div(self, rhs: InverseCurrent<T>) -> Self::Output {
18825 InverseMagneticFlux{per_Wb: self.per_Nm / rhs.per_A}
18826 }
18827}
18828impl<T> core::ops::Div<InverseCurrent<T>> for &InverseTorque<T> where T: NumLike {
18830 type Output = InverseMagneticFlux<T>;
18831 fn div(self, rhs: InverseCurrent<T>) -> Self::Output {
18832 InverseMagneticFlux{per_Wb: self.per_Nm.clone() / rhs.per_A}
18833 }
18834}
18835impl<T> core::ops::Div<&InverseCurrent<T>> for InverseTorque<T> where T: NumLike {
18837 type Output = InverseMagneticFlux<T>;
18838 fn div(self, rhs: &InverseCurrent<T>) -> Self::Output {
18839 InverseMagneticFlux{per_Wb: self.per_Nm / rhs.per_A.clone()}
18840 }
18841}
18842impl<T> core::ops::Div<&InverseCurrent<T>> for &InverseTorque<T> where T: NumLike {
18844 type Output = InverseMagneticFlux<T>;
18845 fn div(self, rhs: &InverseCurrent<T>) -> Self::Output {
18846 InverseMagneticFlux{per_Wb: self.per_Nm.clone() / rhs.per_A.clone()}
18847 }
18848}
18849
18850impl<T> core::ops::Div<InverseDistance<T>> for InverseTorque<T> where T: NumLike {
18853 type Output = InverseForce<T>;
18854 fn div(self, rhs: InverseDistance<T>) -> Self::Output {
18855 InverseForce{per_N: self.per_Nm / rhs.per_m}
18856 }
18857}
18858impl<T> core::ops::Div<InverseDistance<T>> for &InverseTorque<T> where T: NumLike {
18860 type Output = InverseForce<T>;
18861 fn div(self, rhs: InverseDistance<T>) -> Self::Output {
18862 InverseForce{per_N: self.per_Nm.clone() / rhs.per_m}
18863 }
18864}
18865impl<T> core::ops::Div<&InverseDistance<T>> for InverseTorque<T> where T: NumLike {
18867 type Output = InverseForce<T>;
18868 fn div(self, rhs: &InverseDistance<T>) -> Self::Output {
18869 InverseForce{per_N: self.per_Nm / rhs.per_m.clone()}
18870 }
18871}
18872impl<T> core::ops::Div<&InverseDistance<T>> for &InverseTorque<T> where T: NumLike {
18874 type Output = InverseForce<T>;
18875 fn div(self, rhs: &InverseDistance<T>) -> Self::Output {
18876 InverseForce{per_N: self.per_Nm.clone() / rhs.per_m.clone()}
18877 }
18878}
18879
18880impl<T> core::ops::Mul<Time<T>> for InverseTorque<T> where T: NumLike {
18883 type Output = InversePower<T>;
18884 fn mul(self, rhs: Time<T>) -> Self::Output {
18885 InversePower{per_W: self.per_Nm * rhs.s}
18886 }
18887}
18888impl<T> core::ops::Mul<Time<T>> for &InverseTorque<T> where T: NumLike {
18890 type Output = InversePower<T>;
18891 fn mul(self, rhs: Time<T>) -> Self::Output {
18892 InversePower{per_W: self.per_Nm.clone() * rhs.s}
18893 }
18894}
18895impl<T> core::ops::Mul<&Time<T>> for InverseTorque<T> where T: NumLike {
18897 type Output = InversePower<T>;
18898 fn mul(self, rhs: &Time<T>) -> Self::Output {
18899 InversePower{per_W: self.per_Nm * rhs.s.clone()}
18900 }
18901}
18902impl<T> core::ops::Mul<&Time<T>> for &InverseTorque<T> where T: NumLike {
18904 type Output = InversePower<T>;
18905 fn mul(self, rhs: &Time<T>) -> Self::Output {
18906 InversePower{per_W: self.per_Nm.clone() * rhs.s.clone()}
18907 }
18908}
18909
18910impl<T> core::ops::Mul<Charge<T>> for InverseTorque<T> where T: NumLike {
18913 type Output = InverseVoltage<T>;
18914 fn mul(self, rhs: Charge<T>) -> Self::Output {
18915 InverseVoltage{per_V: self.per_Nm * rhs.C}
18916 }
18917}
18918impl<T> core::ops::Mul<Charge<T>> for &InverseTorque<T> where T: NumLike {
18920 type Output = InverseVoltage<T>;
18921 fn mul(self, rhs: Charge<T>) -> Self::Output {
18922 InverseVoltage{per_V: self.per_Nm.clone() * rhs.C}
18923 }
18924}
18925impl<T> core::ops::Mul<&Charge<T>> for InverseTorque<T> where T: NumLike {
18927 type Output = InverseVoltage<T>;
18928 fn mul(self, rhs: &Charge<T>) -> Self::Output {
18929 InverseVoltage{per_V: self.per_Nm * rhs.C.clone()}
18930 }
18931}
18932impl<T> core::ops::Mul<&Charge<T>> for &InverseTorque<T> where T: NumLike {
18934 type Output = InverseVoltage<T>;
18935 fn mul(self, rhs: &Charge<T>) -> Self::Output {
18936 InverseVoltage{per_V: self.per_Nm.clone() * rhs.C.clone()}
18937 }
18938}
18939
18940impl<T> core::ops::Div<InverseCharge<T>> for InverseTorque<T> where T: NumLike {
18943 type Output = InverseVoltage<T>;
18944 fn div(self, rhs: InverseCharge<T>) -> Self::Output {
18945 InverseVoltage{per_V: self.per_Nm / rhs.per_C}
18946 }
18947}
18948impl<T> core::ops::Div<InverseCharge<T>> for &InverseTorque<T> where T: NumLike {
18950 type Output = InverseVoltage<T>;
18951 fn div(self, rhs: InverseCharge<T>) -> Self::Output {
18952 InverseVoltage{per_V: self.per_Nm.clone() / rhs.per_C}
18953 }
18954}
18955impl<T> core::ops::Div<&InverseCharge<T>> for InverseTorque<T> where T: NumLike {
18957 type Output = InverseVoltage<T>;
18958 fn div(self, rhs: &InverseCharge<T>) -> Self::Output {
18959 InverseVoltage{per_V: self.per_Nm / rhs.per_C.clone()}
18960 }
18961}
18962impl<T> core::ops::Div<&InverseCharge<T>> for &InverseTorque<T> where T: NumLike {
18964 type Output = InverseVoltage<T>;
18965 fn div(self, rhs: &InverseCharge<T>) -> Self::Output {
18966 InverseVoltage{per_V: self.per_Nm.clone() / rhs.per_C.clone()}
18967 }
18968}
18969
18970impl<T> core::ops::Div<InverseMagneticFlux<T>> for InverseTorque<T> where T: NumLike {
18973 type Output = InverseCurrent<T>;
18974 fn div(self, rhs: InverseMagneticFlux<T>) -> Self::Output {
18975 InverseCurrent{per_A: self.per_Nm / rhs.per_Wb}
18976 }
18977}
18978impl<T> core::ops::Div<InverseMagneticFlux<T>> for &InverseTorque<T> where T: NumLike {
18980 type Output = InverseCurrent<T>;
18981 fn div(self, rhs: InverseMagneticFlux<T>) -> Self::Output {
18982 InverseCurrent{per_A: self.per_Nm.clone() / rhs.per_Wb}
18983 }
18984}
18985impl<T> core::ops::Div<&InverseMagneticFlux<T>> for InverseTorque<T> where T: NumLike {
18987 type Output = InverseCurrent<T>;
18988 fn div(self, rhs: &InverseMagneticFlux<T>) -> Self::Output {
18989 InverseCurrent{per_A: self.per_Nm / rhs.per_Wb.clone()}
18990 }
18991}
18992impl<T> core::ops::Div<&InverseMagneticFlux<T>> for &InverseTorque<T> where T: NumLike {
18994 type Output = InverseCurrent<T>;
18995 fn div(self, rhs: &InverseMagneticFlux<T>) -> Self::Output {
18996 InverseCurrent{per_A: self.per_Nm.clone() / rhs.per_Wb.clone()}
18997 }
18998}
18999
19000impl<T> core::ops::Div<InverseVoltage<T>> for InverseTorque<T> where T: NumLike {
19003 type Output = InverseCharge<T>;
19004 fn div(self, rhs: InverseVoltage<T>) -> Self::Output {
19005 InverseCharge{per_C: self.per_Nm / rhs.per_V}
19006 }
19007}
19008impl<T> core::ops::Div<InverseVoltage<T>> for &InverseTorque<T> where T: NumLike {
19010 type Output = InverseCharge<T>;
19011 fn div(self, rhs: InverseVoltage<T>) -> Self::Output {
19012 InverseCharge{per_C: self.per_Nm.clone() / rhs.per_V}
19013 }
19014}
19015impl<T> core::ops::Div<&InverseVoltage<T>> for InverseTorque<T> where T: NumLike {
19017 type Output = InverseCharge<T>;
19018 fn div(self, rhs: &InverseVoltage<T>) -> Self::Output {
19019 InverseCharge{per_C: self.per_Nm / rhs.per_V.clone()}
19020 }
19021}
19022impl<T> core::ops::Div<&InverseVoltage<T>> for &InverseTorque<T> where T: NumLike {
19024 type Output = InverseCharge<T>;
19025 fn div(self, rhs: &InverseVoltage<T>) -> Self::Output {
19026 InverseCharge{per_C: self.per_Nm.clone() / rhs.per_V.clone()}
19027 }
19028}
19029
19030impl<T> core::ops::Mul<MagneticFlux<T>> for InverseTorque<T> where T: NumLike {
19033 type Output = InverseCurrent<T>;
19034 fn mul(self, rhs: MagneticFlux<T>) -> Self::Output {
19035 InverseCurrent{per_A: self.per_Nm * rhs.Wb}
19036 }
19037}
19038impl<T> core::ops::Mul<MagneticFlux<T>> for &InverseTorque<T> where T: NumLike {
19040 type Output = InverseCurrent<T>;
19041 fn mul(self, rhs: MagneticFlux<T>) -> Self::Output {
19042 InverseCurrent{per_A: self.per_Nm.clone() * rhs.Wb}
19043 }
19044}
19045impl<T> core::ops::Mul<&MagneticFlux<T>> for InverseTorque<T> where T: NumLike {
19047 type Output = InverseCurrent<T>;
19048 fn mul(self, rhs: &MagneticFlux<T>) -> Self::Output {
19049 InverseCurrent{per_A: self.per_Nm * rhs.Wb.clone()}
19050 }
19051}
19052impl<T> core::ops::Mul<&MagneticFlux<T>> for &InverseTorque<T> where T: NumLike {
19054 type Output = InverseCurrent<T>;
19055 fn mul(self, rhs: &MagneticFlux<T>) -> Self::Output {
19056 InverseCurrent{per_A: self.per_Nm.clone() * rhs.Wb.clone()}
19057 }
19058}
19059
19060impl<T> core::ops::Mul<Voltage<T>> for InverseTorque<T> where T: NumLike {
19063 type Output = InverseCharge<T>;
19064 fn mul(self, rhs: Voltage<T>) -> Self::Output {
19065 InverseCharge{per_C: self.per_Nm * rhs.V}
19066 }
19067}
19068impl<T> core::ops::Mul<Voltage<T>> for &InverseTorque<T> where T: NumLike {
19070 type Output = InverseCharge<T>;
19071 fn mul(self, rhs: Voltage<T>) -> Self::Output {
19072 InverseCharge{per_C: self.per_Nm.clone() * rhs.V}
19073 }
19074}
19075impl<T> core::ops::Mul<&Voltage<T>> for InverseTorque<T> where T: NumLike {
19077 type Output = InverseCharge<T>;
19078 fn mul(self, rhs: &Voltage<T>) -> Self::Output {
19079 InverseCharge{per_C: self.per_Nm * rhs.V.clone()}
19080 }
19081}
19082impl<T> core::ops::Mul<&Voltage<T>> for &InverseTorque<T> where T: NumLike {
19084 type Output = InverseCharge<T>;
19085 fn mul(self, rhs: &Voltage<T>) -> Self::Output {
19086 InverseCharge{per_C: self.per_Nm.clone() * rhs.V.clone()}
19087 }
19088}
19089
19090impl<T> core::ops::Div<InverseVolume<T>> for InverseTorque<T> where T: NumLike {
19093 type Output = InversePressure<T>;
19094 fn div(self, rhs: InverseVolume<T>) -> Self::Output {
19095 InversePressure{per_Pa: self.per_Nm / rhs.per_m3}
19096 }
19097}
19098impl<T> core::ops::Div<InverseVolume<T>> for &InverseTorque<T> where T: NumLike {
19100 type Output = InversePressure<T>;
19101 fn div(self, rhs: InverseVolume<T>) -> Self::Output {
19102 InversePressure{per_Pa: self.per_Nm.clone() / rhs.per_m3}
19103 }
19104}
19105impl<T> core::ops::Div<&InverseVolume<T>> for InverseTorque<T> where T: NumLike {
19107 type Output = InversePressure<T>;
19108 fn div(self, rhs: &InverseVolume<T>) -> Self::Output {
19109 InversePressure{per_Pa: self.per_Nm / rhs.per_m3.clone()}
19110 }
19111}
19112impl<T> core::ops::Div<&InverseVolume<T>> for &InverseTorque<T> where T: NumLike {
19114 type Output = InversePressure<T>;
19115 fn div(self, rhs: &InverseVolume<T>) -> Self::Output {
19116 InversePressure{per_Pa: self.per_Nm.clone() / rhs.per_m3.clone()}
19117 }
19118}
19119
19120impl<T> core::ops::Mul<Volume<T>> for InverseTorque<T> where T: NumLike {
19123 type Output = InversePressure<T>;
19124 fn mul(self, rhs: Volume<T>) -> Self::Output {
19125 InversePressure{per_Pa: self.per_Nm * rhs.m3}
19126 }
19127}
19128impl<T> core::ops::Mul<Volume<T>> for &InverseTorque<T> where T: NumLike {
19130 type Output = InversePressure<T>;
19131 fn mul(self, rhs: Volume<T>) -> Self::Output {
19132 InversePressure{per_Pa: self.per_Nm.clone() * rhs.m3}
19133 }
19134}
19135impl<T> core::ops::Mul<&Volume<T>> for InverseTorque<T> where T: NumLike {
19137 type Output = InversePressure<T>;
19138 fn mul(self, rhs: &Volume<T>) -> Self::Output {
19139 InversePressure{per_Pa: self.per_Nm * rhs.m3.clone()}
19140 }
19141}
19142impl<T> core::ops::Mul<&Volume<T>> for &InverseTorque<T> where T: NumLike {
19144 type Output = InversePressure<T>;
19145 fn mul(self, rhs: &Volume<T>) -> Self::Output {
19146 InversePressure{per_Pa: self.per_Nm.clone() * rhs.m3.clone()}
19147 }
19148}
19149
19150impl<T> core::ops::Mul<Force<T>> for InverseTorque<T> where T: NumLike {
19153 type Output = InverseDistance<T>;
19154 fn mul(self, rhs: Force<T>) -> Self::Output {
19155 InverseDistance{per_m: self.per_Nm * rhs.N}
19156 }
19157}
19158impl<T> core::ops::Mul<Force<T>> for &InverseTorque<T> where T: NumLike {
19160 type Output = InverseDistance<T>;
19161 fn mul(self, rhs: Force<T>) -> Self::Output {
19162 InverseDistance{per_m: self.per_Nm.clone() * rhs.N}
19163 }
19164}
19165impl<T> core::ops::Mul<&Force<T>> for InverseTorque<T> where T: NumLike {
19167 type Output = InverseDistance<T>;
19168 fn mul(self, rhs: &Force<T>) -> Self::Output {
19169 InverseDistance{per_m: self.per_Nm * rhs.N.clone()}
19170 }
19171}
19172impl<T> core::ops::Mul<&Force<T>> for &InverseTorque<T> where T: NumLike {
19174 type Output = InverseDistance<T>;
19175 fn mul(self, rhs: &Force<T>) -> Self::Output {
19176 InverseDistance{per_m: self.per_Nm.clone() * rhs.N.clone()}
19177 }
19178}
19179
19180impl<T> core::ops::Div<Frequency<T>> for InverseTorque<T> where T: NumLike {
19183 type Output = InversePower<T>;
19184 fn div(self, rhs: Frequency<T>) -> Self::Output {
19185 InversePower{per_W: self.per_Nm / rhs.Hz}
19186 }
19187}
19188impl<T> core::ops::Div<Frequency<T>> for &InverseTorque<T> where T: NumLike {
19190 type Output = InversePower<T>;
19191 fn div(self, rhs: Frequency<T>) -> Self::Output {
19192 InversePower{per_W: self.per_Nm.clone() / rhs.Hz}
19193 }
19194}
19195impl<T> core::ops::Div<&Frequency<T>> for InverseTorque<T> where T: NumLike {
19197 type Output = InversePower<T>;
19198 fn div(self, rhs: &Frequency<T>) -> Self::Output {
19199 InversePower{per_W: self.per_Nm / rhs.Hz.clone()}
19200 }
19201}
19202impl<T> core::ops::Div<&Frequency<T>> for &InverseTorque<T> where T: NumLike {
19204 type Output = InversePower<T>;
19205 fn div(self, rhs: &Frequency<T>) -> Self::Output {
19206 InversePower{per_W: self.per_Nm.clone() / rhs.Hz.clone()}
19207 }
19208}
19209
19210impl<T> core::ops::Div<InverseForce<T>> for InverseTorque<T> where T: NumLike {
19213 type Output = InverseDistance<T>;
19214 fn div(self, rhs: InverseForce<T>) -> Self::Output {
19215 InverseDistance{per_m: self.per_Nm / rhs.per_N}
19216 }
19217}
19218impl<T> core::ops::Div<InverseForce<T>> for &InverseTorque<T> where T: NumLike {
19220 type Output = InverseDistance<T>;
19221 fn div(self, rhs: InverseForce<T>) -> Self::Output {
19222 InverseDistance{per_m: self.per_Nm.clone() / rhs.per_N}
19223 }
19224}
19225impl<T> core::ops::Div<&InverseForce<T>> for InverseTorque<T> where T: NumLike {
19227 type Output = InverseDistance<T>;
19228 fn div(self, rhs: &InverseForce<T>) -> Self::Output {
19229 InverseDistance{per_m: self.per_Nm / rhs.per_N.clone()}
19230 }
19231}
19232impl<T> core::ops::Div<&InverseForce<T>> for &InverseTorque<T> where T: NumLike {
19234 type Output = InverseDistance<T>;
19235 fn div(self, rhs: &InverseForce<T>) -> Self::Output {
19236 InverseDistance{per_m: self.per_Nm.clone() / rhs.per_N.clone()}
19237 }
19238}
19239
19240impl<T> core::ops::Div<InverseMomentum<T>> for InverseTorque<T> where T: NumLike {
19243 type Output = TimePerDistance<T>;
19244 fn div(self, rhs: InverseMomentum<T>) -> Self::Output {
19245 TimePerDistance{spm: self.per_Nm / rhs.s_per_kgm}
19246 }
19247}
19248impl<T> core::ops::Div<InverseMomentum<T>> for &InverseTorque<T> where T: NumLike {
19250 type Output = TimePerDistance<T>;
19251 fn div(self, rhs: InverseMomentum<T>) -> Self::Output {
19252 TimePerDistance{spm: self.per_Nm.clone() / rhs.s_per_kgm}
19253 }
19254}
19255impl<T> core::ops::Div<&InverseMomentum<T>> for InverseTorque<T> where T: NumLike {
19257 type Output = TimePerDistance<T>;
19258 fn div(self, rhs: &InverseMomentum<T>) -> Self::Output {
19259 TimePerDistance{spm: self.per_Nm / rhs.s_per_kgm.clone()}
19260 }
19261}
19262impl<T> core::ops::Div<&InverseMomentum<T>> for &InverseTorque<T> where T: NumLike {
19264 type Output = TimePerDistance<T>;
19265 fn div(self, rhs: &InverseMomentum<T>) -> Self::Output {
19266 TimePerDistance{spm: self.per_Nm.clone() / rhs.s_per_kgm.clone()}
19267 }
19268}
19269
19270impl<T> core::ops::Div<InversePower<T>> for InverseTorque<T> where T: NumLike {
19273 type Output = Frequency<T>;
19274 fn div(self, rhs: InversePower<T>) -> Self::Output {
19275 Frequency{Hz: self.per_Nm / rhs.per_W}
19276 }
19277}
19278impl<T> core::ops::Div<InversePower<T>> for &InverseTorque<T> where T: NumLike {
19280 type Output = Frequency<T>;
19281 fn div(self, rhs: InversePower<T>) -> Self::Output {
19282 Frequency{Hz: self.per_Nm.clone() / rhs.per_W}
19283 }
19284}
19285impl<T> core::ops::Div<&InversePower<T>> for InverseTorque<T> where T: NumLike {
19287 type Output = Frequency<T>;
19288 fn div(self, rhs: &InversePower<T>) -> Self::Output {
19289 Frequency{Hz: self.per_Nm / rhs.per_W.clone()}
19290 }
19291}
19292impl<T> core::ops::Div<&InversePower<T>> for &InverseTorque<T> where T: NumLike {
19294 type Output = Frequency<T>;
19295 fn div(self, rhs: &InversePower<T>) -> Self::Output {
19296 Frequency{Hz: self.per_Nm.clone() / rhs.per_W.clone()}
19297 }
19298}
19299
19300impl<T> core::ops::Div<InversePressure<T>> for InverseTorque<T> where T: NumLike {
19303 type Output = InverseVolume<T>;
19304 fn div(self, rhs: InversePressure<T>) -> Self::Output {
19305 InverseVolume{per_m3: self.per_Nm / rhs.per_Pa}
19306 }
19307}
19308impl<T> core::ops::Div<InversePressure<T>> for &InverseTorque<T> where T: NumLike {
19310 type Output = InverseVolume<T>;
19311 fn div(self, rhs: InversePressure<T>) -> Self::Output {
19312 InverseVolume{per_m3: self.per_Nm.clone() / rhs.per_Pa}
19313 }
19314}
19315impl<T> core::ops::Div<&InversePressure<T>> for InverseTorque<T> where T: NumLike {
19317 type Output = InverseVolume<T>;
19318 fn div(self, rhs: &InversePressure<T>) -> Self::Output {
19319 InverseVolume{per_m3: self.per_Nm / rhs.per_Pa.clone()}
19320 }
19321}
19322impl<T> core::ops::Div<&InversePressure<T>> for &InverseTorque<T> where T: NumLike {
19324 type Output = InverseVolume<T>;
19325 fn div(self, rhs: &InversePressure<T>) -> Self::Output {
19326 InverseVolume{per_m3: self.per_Nm.clone() / rhs.per_Pa.clone()}
19327 }
19328}
19329
19330impl<T> core::ops::Mul<Momentum<T>> for InverseTorque<T> where T: NumLike {
19333 type Output = TimePerDistance<T>;
19334 fn mul(self, rhs: Momentum<T>) -> Self::Output {
19335 TimePerDistance{spm: self.per_Nm * rhs.kgmps}
19336 }
19337}
19338impl<T> core::ops::Mul<Momentum<T>> for &InverseTorque<T> where T: NumLike {
19340 type Output = TimePerDistance<T>;
19341 fn mul(self, rhs: Momentum<T>) -> Self::Output {
19342 TimePerDistance{spm: self.per_Nm.clone() * rhs.kgmps}
19343 }
19344}
19345impl<T> core::ops::Mul<&Momentum<T>> for InverseTorque<T> where T: NumLike {
19347 type Output = TimePerDistance<T>;
19348 fn mul(self, rhs: &Momentum<T>) -> Self::Output {
19349 TimePerDistance{spm: self.per_Nm * rhs.kgmps.clone()}
19350 }
19351}
19352impl<T> core::ops::Mul<&Momentum<T>> for &InverseTorque<T> where T: NumLike {
19354 type Output = TimePerDistance<T>;
19355 fn mul(self, rhs: &Momentum<T>) -> Self::Output {
19356 TimePerDistance{spm: self.per_Nm.clone() * rhs.kgmps.clone()}
19357 }
19358}
19359
19360impl<T> core::ops::Mul<Power<T>> for InverseTorque<T> where T: NumLike {
19363 type Output = Frequency<T>;
19364 fn mul(self, rhs: Power<T>) -> Self::Output {
19365 Frequency{Hz: self.per_Nm * rhs.W}
19366 }
19367}
19368impl<T> core::ops::Mul<Power<T>> for &InverseTorque<T> where T: NumLike {
19370 type Output = Frequency<T>;
19371 fn mul(self, rhs: Power<T>) -> Self::Output {
19372 Frequency{Hz: self.per_Nm.clone() * rhs.W}
19373 }
19374}
19375impl<T> core::ops::Mul<&Power<T>> for InverseTorque<T> where T: NumLike {
19377 type Output = Frequency<T>;
19378 fn mul(self, rhs: &Power<T>) -> Self::Output {
19379 Frequency{Hz: self.per_Nm * rhs.W.clone()}
19380 }
19381}
19382impl<T> core::ops::Mul<&Power<T>> for &InverseTorque<T> where T: NumLike {
19384 type Output = Frequency<T>;
19385 fn mul(self, rhs: &Power<T>) -> Self::Output {
19386 Frequency{Hz: self.per_Nm.clone() * rhs.W.clone()}
19387 }
19388}
19389
19390impl<T> core::ops::Mul<Pressure<T>> for InverseTorque<T> where T: NumLike {
19393 type Output = InverseVolume<T>;
19394 fn mul(self, rhs: Pressure<T>) -> Self::Output {
19395 InverseVolume{per_m3: self.per_Nm * rhs.Pa}
19396 }
19397}
19398impl<T> core::ops::Mul<Pressure<T>> for &InverseTorque<T> where T: NumLike {
19400 type Output = InverseVolume<T>;
19401 fn mul(self, rhs: Pressure<T>) -> Self::Output {
19402 InverseVolume{per_m3: self.per_Nm.clone() * rhs.Pa}
19403 }
19404}
19405impl<T> core::ops::Mul<&Pressure<T>> for InverseTorque<T> where T: NumLike {
19407 type Output = InverseVolume<T>;
19408 fn mul(self, rhs: &Pressure<T>) -> Self::Output {
19409 InverseVolume{per_m3: self.per_Nm * rhs.Pa.clone()}
19410 }
19411}
19412impl<T> core::ops::Mul<&Pressure<T>> for &InverseTorque<T> where T: NumLike {
19414 type Output = InverseVolume<T>;
19415 fn mul(self, rhs: &Pressure<T>) -> Self::Output {
19416 InverseVolume{per_m3: self.per_Nm.clone() * rhs.Pa.clone()}
19417 }
19418}
19419
19420impl<T> core::ops::Div<TimePerDistance<T>> for InverseTorque<T> where T: NumLike {
19423 type Output = InverseMomentum<T>;
19424 fn div(self, rhs: TimePerDistance<T>) -> Self::Output {
19425 InverseMomentum{s_per_kgm: self.per_Nm / rhs.spm}
19426 }
19427}
19428impl<T> core::ops::Div<TimePerDistance<T>> for &InverseTorque<T> where T: NumLike {
19430 type Output = InverseMomentum<T>;
19431 fn div(self, rhs: TimePerDistance<T>) -> Self::Output {
19432 InverseMomentum{s_per_kgm: self.per_Nm.clone() / rhs.spm}
19433 }
19434}
19435impl<T> core::ops::Div<&TimePerDistance<T>> for InverseTorque<T> where T: NumLike {
19437 type Output = InverseMomentum<T>;
19438 fn div(self, rhs: &TimePerDistance<T>) -> Self::Output {
19439 InverseMomentum{s_per_kgm: self.per_Nm / rhs.spm.clone()}
19440 }
19441}
19442impl<T> core::ops::Div<&TimePerDistance<T>> for &InverseTorque<T> where T: NumLike {
19444 type Output = InverseMomentum<T>;
19445 fn div(self, rhs: &TimePerDistance<T>) -> Self::Output {
19446 InverseMomentum{s_per_kgm: self.per_Nm.clone() / rhs.spm.clone()}
19447 }
19448}
19449
19450impl<T> core::ops::Mul<Velocity<T>> for InverseTorque<T> where T: NumLike {
19453 type Output = InverseMomentum<T>;
19454 fn mul(self, rhs: Velocity<T>) -> Self::Output {
19455 InverseMomentum{s_per_kgm: self.per_Nm * rhs.mps}
19456 }
19457}
19458impl<T> core::ops::Mul<Velocity<T>> for &InverseTorque<T> where T: NumLike {
19460 type Output = InverseMomentum<T>;
19461 fn mul(self, rhs: Velocity<T>) -> Self::Output {
19462 InverseMomentum{s_per_kgm: self.per_Nm.clone() * rhs.mps}
19463 }
19464}
19465impl<T> core::ops::Mul<&Velocity<T>> for InverseTorque<T> where T: NumLike {
19467 type Output = InverseMomentum<T>;
19468 fn mul(self, rhs: &Velocity<T>) -> Self::Output {
19469 InverseMomentum{s_per_kgm: self.per_Nm * rhs.mps.clone()}
19470 }
19471}
19472impl<T> core::ops::Mul<&Velocity<T>> for &InverseTorque<T> where T: NumLike {
19474 type Output = InverseMomentum<T>;
19475 fn mul(self, rhs: &Velocity<T>) -> Self::Output {
19476 InverseMomentum{s_per_kgm: self.per_Nm.clone() * rhs.mps.clone()}
19477 }
19478}
19479
19480impl<T> core::ops::Div<InverseAbsorbedDose<T>> for InverseTorque<T> where T: NumLike {
19483 type Output = InverseMass<T>;
19484 fn div(self, rhs: InverseAbsorbedDose<T>) -> Self::Output {
19485 InverseMass{per_kg: self.per_Nm / rhs.per_Gy}
19486 }
19487}
19488impl<T> core::ops::Div<InverseAbsorbedDose<T>> for &InverseTorque<T> where T: NumLike {
19490 type Output = InverseMass<T>;
19491 fn div(self, rhs: InverseAbsorbedDose<T>) -> Self::Output {
19492 InverseMass{per_kg: self.per_Nm.clone() / rhs.per_Gy}
19493 }
19494}
19495impl<T> core::ops::Div<&InverseAbsorbedDose<T>> for InverseTorque<T> where T: NumLike {
19497 type Output = InverseMass<T>;
19498 fn div(self, rhs: &InverseAbsorbedDose<T>) -> Self::Output {
19499 InverseMass{per_kg: self.per_Nm / rhs.per_Gy.clone()}
19500 }
19501}
19502impl<T> core::ops::Div<&InverseAbsorbedDose<T>> for &InverseTorque<T> where T: NumLike {
19504 type Output = InverseMass<T>;
19505 fn div(self, rhs: &InverseAbsorbedDose<T>) -> Self::Output {
19506 InverseMass{per_kg: self.per_Nm.clone() / rhs.per_Gy.clone()}
19507 }
19508}
19509
19510impl<T> core::ops::Div<InverseDoseEquivalent<T>> for InverseTorque<T> where T: NumLike {
19513 type Output = InverseMass<T>;
19514 fn div(self, rhs: InverseDoseEquivalent<T>) -> Self::Output {
19515 InverseMass{per_kg: self.per_Nm / rhs.per_Sv}
19516 }
19517}
19518impl<T> core::ops::Div<InverseDoseEquivalent<T>> for &InverseTorque<T> where T: NumLike {
19520 type Output = InverseMass<T>;
19521 fn div(self, rhs: InverseDoseEquivalent<T>) -> Self::Output {
19522 InverseMass{per_kg: self.per_Nm.clone() / rhs.per_Sv}
19523 }
19524}
19525impl<T> core::ops::Div<&InverseDoseEquivalent<T>> for InverseTorque<T> where T: NumLike {
19527 type Output = InverseMass<T>;
19528 fn div(self, rhs: &InverseDoseEquivalent<T>) -> Self::Output {
19529 InverseMass{per_kg: self.per_Nm / rhs.per_Sv.clone()}
19530 }
19531}
19532impl<T> core::ops::Div<&InverseDoseEquivalent<T>> for &InverseTorque<T> where T: NumLike {
19534 type Output = InverseMass<T>;
19535 fn div(self, rhs: &InverseDoseEquivalent<T>) -> Self::Output {
19536 InverseMass{per_kg: self.per_Nm.clone() / rhs.per_Sv.clone()}
19537 }
19538}
19539
19540impl<T> core::ops::Div<InverseTorque<T>> for f64 where T: NumLike+From<f64> {
19543 type Output = Energy<T>;
19544 fn div(self, rhs: InverseTorque<T>) -> Self::Output {
19545 Energy{J: T::from(self) / rhs.per_Nm}
19546 }
19547}
19548impl<T> core::ops::Div<InverseTorque<T>> for &f64 where T: NumLike+From<f64> {
19550 type Output = Energy<T>;
19551 fn div(self, rhs: InverseTorque<T>) -> Self::Output {
19552 Energy{J: T::from(self.clone()) / rhs.per_Nm}
19553 }
19554}
19555impl<T> core::ops::Div<&InverseTorque<T>> for f64 where T: NumLike+From<f64> {
19557 type Output = Energy<T>;
19558 fn div(self, rhs: &InverseTorque<T>) -> Self::Output {
19559 Energy{J: T::from(self) / rhs.per_Nm.clone()}
19560 }
19561}
19562impl<T> core::ops::Div<&InverseTorque<T>> for &f64 where T: NumLike+From<f64> {
19564 type Output = Energy<T>;
19565 fn div(self, rhs: &InverseTorque<T>) -> Self::Output {
19566 Energy{J: T::from(self.clone()) / rhs.per_Nm.clone()}
19567 }
19568}
19569
19570impl<T> core::ops::Div<InverseTorque<T>> for f32 where T: NumLike+From<f32> {
19573 type Output = Energy<T>;
19574 fn div(self, rhs: InverseTorque<T>) -> Self::Output {
19575 Energy{J: T::from(self) / rhs.per_Nm}
19576 }
19577}
19578impl<T> core::ops::Div<InverseTorque<T>> for &f32 where T: NumLike+From<f32> {
19580 type Output = Energy<T>;
19581 fn div(self, rhs: InverseTorque<T>) -> Self::Output {
19582 Energy{J: T::from(self.clone()) / rhs.per_Nm}
19583 }
19584}
19585impl<T> core::ops::Div<&InverseTorque<T>> for f32 where T: NumLike+From<f32> {
19587 type Output = Energy<T>;
19588 fn div(self, rhs: &InverseTorque<T>) -> Self::Output {
19589 Energy{J: T::from(self) / rhs.per_Nm.clone()}
19590 }
19591}
19592impl<T> core::ops::Div<&InverseTorque<T>> for &f32 where T: NumLike+From<f32> {
19594 type Output = Energy<T>;
19595 fn div(self, rhs: &InverseTorque<T>) -> Self::Output {
19596 Energy{J: T::from(self.clone()) / rhs.per_Nm.clone()}
19597 }
19598}
19599
19600impl<T> core::ops::Div<InverseTorque<T>> for i64 where T: NumLike+From<i64> {
19603 type Output = Energy<T>;
19604 fn div(self, rhs: InverseTorque<T>) -> Self::Output {
19605 Energy{J: T::from(self) / rhs.per_Nm}
19606 }
19607}
19608impl<T> core::ops::Div<InverseTorque<T>> for &i64 where T: NumLike+From<i64> {
19610 type Output = Energy<T>;
19611 fn div(self, rhs: InverseTorque<T>) -> Self::Output {
19612 Energy{J: T::from(self.clone()) / rhs.per_Nm}
19613 }
19614}
19615impl<T> core::ops::Div<&InverseTorque<T>> for i64 where T: NumLike+From<i64> {
19617 type Output = Energy<T>;
19618 fn div(self, rhs: &InverseTorque<T>) -> Self::Output {
19619 Energy{J: T::from(self) / rhs.per_Nm.clone()}
19620 }
19621}
19622impl<T> core::ops::Div<&InverseTorque<T>> for &i64 where T: NumLike+From<i64> {
19624 type Output = Energy<T>;
19625 fn div(self, rhs: &InverseTorque<T>) -> Self::Output {
19626 Energy{J: T::from(self.clone()) / rhs.per_Nm.clone()}
19627 }
19628}
19629
19630impl<T> core::ops::Div<InverseTorque<T>> for i32 where T: NumLike+From<i32> {
19633 type Output = Energy<T>;
19634 fn div(self, rhs: InverseTorque<T>) -> Self::Output {
19635 Energy{J: T::from(self) / rhs.per_Nm}
19636 }
19637}
19638impl<T> core::ops::Div<InverseTorque<T>> for &i32 where T: NumLike+From<i32> {
19640 type Output = Energy<T>;
19641 fn div(self, rhs: InverseTorque<T>) -> Self::Output {
19642 Energy{J: T::from(self.clone()) / rhs.per_Nm}
19643 }
19644}
19645impl<T> core::ops::Div<&InverseTorque<T>> for i32 where T: NumLike+From<i32> {
19647 type Output = Energy<T>;
19648 fn div(self, rhs: &InverseTorque<T>) -> Self::Output {
19649 Energy{J: T::from(self) / rhs.per_Nm.clone()}
19650 }
19651}
19652impl<T> core::ops::Div<&InverseTorque<T>> for &i32 where T: NumLike+From<i32> {
19654 type Output = Energy<T>;
19655 fn div(self, rhs: &InverseTorque<T>) -> Self::Output {
19656 Energy{J: T::from(self.clone()) / rhs.per_Nm.clone()}
19657 }
19658}
19659
19660#[cfg(feature="num-bigfloat")]
19663impl<T> core::ops::Div<InverseTorque<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
19664 type Output = Energy<T>;
19665 fn div(self, rhs: InverseTorque<T>) -> Self::Output {
19666 Energy{J: T::from(self) / rhs.per_Nm}
19667 }
19668}
19669#[cfg(feature="num-bigfloat")]
19671impl<T> core::ops::Div<InverseTorque<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
19672 type Output = Energy<T>;
19673 fn div(self, rhs: InverseTorque<T>) -> Self::Output {
19674 Energy{J: T::from(self.clone()) / rhs.per_Nm}
19675 }
19676}
19677#[cfg(feature="num-bigfloat")]
19679impl<T> core::ops::Div<&InverseTorque<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
19680 type Output = Energy<T>;
19681 fn div(self, rhs: &InverseTorque<T>) -> Self::Output {
19682 Energy{J: T::from(self) / rhs.per_Nm.clone()}
19683 }
19684}
19685#[cfg(feature="num-bigfloat")]
19687impl<T> core::ops::Div<&InverseTorque<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
19688 type Output = Energy<T>;
19689 fn div(self, rhs: &InverseTorque<T>) -> Self::Output {
19690 Energy{J: T::from(self.clone()) / rhs.per_Nm.clone()}
19691 }
19692}
19693
19694#[cfg(feature="num-complex")]
19697impl<T> core::ops::Div<InverseTorque<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
19698 type Output = Energy<T>;
19699 fn div(self, rhs: InverseTorque<T>) -> Self::Output {
19700 Energy{J: T::from(self) / rhs.per_Nm}
19701 }
19702}
19703#[cfg(feature="num-complex")]
19705impl<T> core::ops::Div<InverseTorque<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
19706 type Output = Energy<T>;
19707 fn div(self, rhs: InverseTorque<T>) -> Self::Output {
19708 Energy{J: T::from(self.clone()) / rhs.per_Nm}
19709 }
19710}
19711#[cfg(feature="num-complex")]
19713impl<T> core::ops::Div<&InverseTorque<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
19714 type Output = Energy<T>;
19715 fn div(self, rhs: &InverseTorque<T>) -> Self::Output {
19716 Energy{J: T::from(self) / rhs.per_Nm.clone()}
19717 }
19718}
19719#[cfg(feature="num-complex")]
19721impl<T> core::ops::Div<&InverseTorque<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
19722 type Output = Energy<T>;
19723 fn div(self, rhs: &InverseTorque<T>) -> Self::Output {
19724 Energy{J: T::from(self.clone()) / rhs.per_Nm.clone()}
19725 }
19726}
19727
19728#[cfg(feature="num-complex")]
19731impl<T> core::ops::Div<InverseTorque<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
19732 type Output = Energy<T>;
19733 fn div(self, rhs: InverseTorque<T>) -> Self::Output {
19734 Energy{J: T::from(self) / rhs.per_Nm}
19735 }
19736}
19737#[cfg(feature="num-complex")]
19739impl<T> core::ops::Div<InverseTorque<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
19740 type Output = Energy<T>;
19741 fn div(self, rhs: InverseTorque<T>) -> Self::Output {
19742 Energy{J: T::from(self.clone()) / rhs.per_Nm}
19743 }
19744}
19745#[cfg(feature="num-complex")]
19747impl<T> core::ops::Div<&InverseTorque<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
19748 type Output = Energy<T>;
19749 fn div(self, rhs: &InverseTorque<T>) -> Self::Output {
19750 Energy{J: T::from(self) / rhs.per_Nm.clone()}
19751 }
19752}
19753#[cfg(feature="num-complex")]
19755impl<T> core::ops::Div<&InverseTorque<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
19756 type Output = Energy<T>;
19757 fn div(self, rhs: &InverseTorque<T>) -> Self::Output {
19758 Energy{J: T::from(self.clone()) / rhs.per_Nm.clone()}
19759 }
19760}
19761
19762#[derive(UnitStruct, Debug, Clone)]
19764#[cfg_attr(feature="serde", derive(Serialize, Deserialize))]
19765pub struct MomentOfInertia<T: NumLike>{
19766 pub kgm2: T
19768}
19769
19770impl<T> MomentOfInertia<T> where T: NumLike {
19771
19772 pub fn unit_name() -> &'static str { "kilogram meters squared" }
19774
19775 pub fn unit_symbol() -> &'static str { "kg·m²" }
19777
19778 pub fn from_kgm2(kgm2: T) -> Self { MomentOfInertia{kgm2: kgm2} }
19783
19784 pub fn to_kgm2(&self) -> T { self.kgm2.clone() }
19786
19787 pub fn from_kilogram_meters_squared(kilogram_meters_squared: T) -> Self { MomentOfInertia{kgm2: kilogram_meters_squared} }
19792
19793 pub fn to_kilogram_meters_squared(&self) -> T { self.kgm2.clone() }
19795
19796}
19797
19798impl<T> fmt::Display for MomentOfInertia<T> where T: NumLike {
19799 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
19800 write!(f, "{} {}", &self.kgm2, Self::unit_symbol())
19801 }
19802}
19803
19804impl<T> MomentOfInertia<T> where T: NumLike+From<f64> {
19805
19806 pub fn to_gcm2(&self) -> T {
19810 return self.kgm2.clone() * T::from(0.1_f64);
19811 }
19812
19813 pub fn from_gcm2(gcm2: T) -> Self {
19820 MomentOfInertia{kgm2: gcm2 * T::from(10.0_f64)}
19821 }
19822
19823 pub fn to_gm2(&self) -> T {
19827 return self.kgm2.clone() * T::from(1000.0_f64);
19828 }
19829
19830 pub fn from_gm2(gm2: T) -> Self {
19837 MomentOfInertia{kgm2: gm2 * T::from(0.001_f64)}
19838 }
19839
19840}
19841
19842
19843#[cfg(feature="num-bigfloat")]
19845impl core::ops::Mul<MomentOfInertia<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
19846 type Output = MomentOfInertia<num_bigfloat::BigFloat>;
19847 fn mul(self, rhs: MomentOfInertia<num_bigfloat::BigFloat>) -> Self::Output {
19848 MomentOfInertia{kgm2: self * rhs.kgm2}
19849 }
19850}
19851#[cfg(feature="num-bigfloat")]
19853impl core::ops::Mul<MomentOfInertia<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
19854 type Output = MomentOfInertia<num_bigfloat::BigFloat>;
19855 fn mul(self, rhs: MomentOfInertia<num_bigfloat::BigFloat>) -> Self::Output {
19856 MomentOfInertia{kgm2: self.clone() * rhs.kgm2}
19857 }
19858}
19859#[cfg(feature="num-bigfloat")]
19861impl core::ops::Mul<&MomentOfInertia<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
19862 type Output = MomentOfInertia<num_bigfloat::BigFloat>;
19863 fn mul(self, rhs: &MomentOfInertia<num_bigfloat::BigFloat>) -> Self::Output {
19864 MomentOfInertia{kgm2: self * rhs.kgm2.clone()}
19865 }
19866}
19867#[cfg(feature="num-bigfloat")]
19869impl core::ops::Mul<&MomentOfInertia<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
19870 type Output = MomentOfInertia<num_bigfloat::BigFloat>;
19871 fn mul(self, rhs: &MomentOfInertia<num_bigfloat::BigFloat>) -> Self::Output {
19872 MomentOfInertia{kgm2: self.clone() * rhs.kgm2.clone()}
19873 }
19874}
19875
19876#[cfg(feature="num-complex")]
19878impl core::ops::Mul<MomentOfInertia<num_complex::Complex32>> for num_complex::Complex32 {
19879 type Output = MomentOfInertia<num_complex::Complex32>;
19880 fn mul(self, rhs: MomentOfInertia<num_complex::Complex32>) -> Self::Output {
19881 MomentOfInertia{kgm2: self * rhs.kgm2}
19882 }
19883}
19884#[cfg(feature="num-complex")]
19886impl core::ops::Mul<MomentOfInertia<num_complex::Complex32>> for &num_complex::Complex32 {
19887 type Output = MomentOfInertia<num_complex::Complex32>;
19888 fn mul(self, rhs: MomentOfInertia<num_complex::Complex32>) -> Self::Output {
19889 MomentOfInertia{kgm2: self.clone() * rhs.kgm2}
19890 }
19891}
19892#[cfg(feature="num-complex")]
19894impl core::ops::Mul<&MomentOfInertia<num_complex::Complex32>> for num_complex::Complex32 {
19895 type Output = MomentOfInertia<num_complex::Complex32>;
19896 fn mul(self, rhs: &MomentOfInertia<num_complex::Complex32>) -> Self::Output {
19897 MomentOfInertia{kgm2: self * rhs.kgm2.clone()}
19898 }
19899}
19900#[cfg(feature="num-complex")]
19902impl core::ops::Mul<&MomentOfInertia<num_complex::Complex32>> for &num_complex::Complex32 {
19903 type Output = MomentOfInertia<num_complex::Complex32>;
19904 fn mul(self, rhs: &MomentOfInertia<num_complex::Complex32>) -> Self::Output {
19905 MomentOfInertia{kgm2: self.clone() * rhs.kgm2.clone()}
19906 }
19907}
19908
19909#[cfg(feature="num-complex")]
19911impl core::ops::Mul<MomentOfInertia<num_complex::Complex64>> for num_complex::Complex64 {
19912 type Output = MomentOfInertia<num_complex::Complex64>;
19913 fn mul(self, rhs: MomentOfInertia<num_complex::Complex64>) -> Self::Output {
19914 MomentOfInertia{kgm2: self * rhs.kgm2}
19915 }
19916}
19917#[cfg(feature="num-complex")]
19919impl core::ops::Mul<MomentOfInertia<num_complex::Complex64>> for &num_complex::Complex64 {
19920 type Output = MomentOfInertia<num_complex::Complex64>;
19921 fn mul(self, rhs: MomentOfInertia<num_complex::Complex64>) -> Self::Output {
19922 MomentOfInertia{kgm2: self.clone() * rhs.kgm2}
19923 }
19924}
19925#[cfg(feature="num-complex")]
19927impl core::ops::Mul<&MomentOfInertia<num_complex::Complex64>> for num_complex::Complex64 {
19928 type Output = MomentOfInertia<num_complex::Complex64>;
19929 fn mul(self, rhs: &MomentOfInertia<num_complex::Complex64>) -> Self::Output {
19930 MomentOfInertia{kgm2: self * rhs.kgm2.clone()}
19931 }
19932}
19933#[cfg(feature="num-complex")]
19935impl core::ops::Mul<&MomentOfInertia<num_complex::Complex64>> for &num_complex::Complex64 {
19936 type Output = MomentOfInertia<num_complex::Complex64>;
19937 fn mul(self, rhs: &MomentOfInertia<num_complex::Complex64>) -> Self::Output {
19938 MomentOfInertia{kgm2: self.clone() * rhs.kgm2.clone()}
19939 }
19940}
19941
19942
19943
19944#[cfg(feature = "uom")]
19946impl<T> Into<uom::si::f32::MomentOfInertia> for MomentOfInertia<T> where T: NumLike+Into<f32> {
19947 fn into(self) -> uom::si::f32::MomentOfInertia {
19948 uom::si::f32::MomentOfInertia::new::<uom::si::moment_of_inertia::kilogram_square_meter>(self.kgm2.into())
19949 }
19950}
19951
19952#[cfg(feature = "uom")]
19954impl<T> From<uom::si::f32::MomentOfInertia> for MomentOfInertia<T> where T: NumLike+From<f32> {
19955 fn from(src: uom::si::f32::MomentOfInertia) -> Self {
19956 MomentOfInertia{kgm2: T::from(src.value)}
19957 }
19958}
19959
19960#[cfg(feature = "uom")]
19962impl<T> Into<uom::si::f64::MomentOfInertia> for MomentOfInertia<T> where T: NumLike+Into<f64> {
19963 fn into(self) -> uom::si::f64::MomentOfInertia {
19964 uom::si::f64::MomentOfInertia::new::<uom::si::moment_of_inertia::kilogram_square_meter>(self.kgm2.into())
19965 }
19966}
19967
19968#[cfg(feature = "uom")]
19970impl<T> From<uom::si::f64::MomentOfInertia> for MomentOfInertia<T> where T: NumLike+From<f64> {
19971 fn from(src: uom::si::f64::MomentOfInertia) -> Self {
19972 MomentOfInertia{kgm2: T::from(src.value)}
19973 }
19974}
19975
19976
19977impl<T> core::ops::Mul<InverseMass<T>> for MomentOfInertia<T> where T: NumLike {
19980 type Output = Area<T>;
19981 fn mul(self, rhs: InverseMass<T>) -> Self::Output {
19982 Area{m2: self.kgm2 * rhs.per_kg}
19983 }
19984}
19985impl<T> core::ops::Mul<InverseMass<T>> for &MomentOfInertia<T> where T: NumLike {
19987 type Output = Area<T>;
19988 fn mul(self, rhs: InverseMass<T>) -> Self::Output {
19989 Area{m2: self.kgm2.clone() * rhs.per_kg}
19990 }
19991}
19992impl<T> core::ops::Mul<&InverseMass<T>> for MomentOfInertia<T> where T: NumLike {
19994 type Output = Area<T>;
19995 fn mul(self, rhs: &InverseMass<T>) -> Self::Output {
19996 Area{m2: self.kgm2 * rhs.per_kg.clone()}
19997 }
19998}
19999impl<T> core::ops::Mul<&InverseMass<T>> for &MomentOfInertia<T> where T: NumLike {
20001 type Output = Area<T>;
20002 fn mul(self, rhs: &InverseMass<T>) -> Self::Output {
20003 Area{m2: self.kgm2.clone() * rhs.per_kg.clone()}
20004 }
20005}
20006
20007impl<T> core::ops::Div<Mass<T>> for MomentOfInertia<T> where T: NumLike {
20010 type Output = Area<T>;
20011 fn div(self, rhs: Mass<T>) -> Self::Output {
20012 Area{m2: self.kgm2 / rhs.kg}
20013 }
20014}
20015impl<T> core::ops::Div<Mass<T>> for &MomentOfInertia<T> where T: NumLike {
20017 type Output = Area<T>;
20018 fn div(self, rhs: Mass<T>) -> Self::Output {
20019 Area{m2: self.kgm2.clone() / rhs.kg}
20020 }
20021}
20022impl<T> core::ops::Div<&Mass<T>> for MomentOfInertia<T> where T: NumLike {
20024 type Output = Area<T>;
20025 fn div(self, rhs: &Mass<T>) -> Self::Output {
20026 Area{m2: self.kgm2 / rhs.kg.clone()}
20027 }
20028}
20029impl<T> core::ops::Div<&Mass<T>> for &MomentOfInertia<T> where T: NumLike {
20031 type Output = Area<T>;
20032 fn div(self, rhs: &Mass<T>) -> Self::Output {
20033 Area{m2: self.kgm2.clone() / rhs.kg.clone()}
20034 }
20035}
20036
20037impl<T> core::ops::Div<Area<T>> for MomentOfInertia<T> where T: NumLike {
20040 type Output = Mass<T>;
20041 fn div(self, rhs: Area<T>) -> Self::Output {
20042 Mass{kg: self.kgm2 / rhs.m2}
20043 }
20044}
20045impl<T> core::ops::Div<Area<T>> for &MomentOfInertia<T> where T: NumLike {
20047 type Output = Mass<T>;
20048 fn div(self, rhs: Area<T>) -> Self::Output {
20049 Mass{kg: self.kgm2.clone() / rhs.m2}
20050 }
20051}
20052impl<T> core::ops::Div<&Area<T>> for MomentOfInertia<T> where T: NumLike {
20054 type Output = Mass<T>;
20055 fn div(self, rhs: &Area<T>) -> Self::Output {
20056 Mass{kg: self.kgm2 / rhs.m2.clone()}
20057 }
20058}
20059impl<T> core::ops::Div<&Area<T>> for &MomentOfInertia<T> where T: NumLike {
20061 type Output = Mass<T>;
20062 fn div(self, rhs: &Area<T>) -> Self::Output {
20063 Mass{kg: self.kgm2.clone() / rhs.m2.clone()}
20064 }
20065}
20066
20067impl<T> core::ops::Mul<InverseArea<T>> for MomentOfInertia<T> where T: NumLike {
20070 type Output = Mass<T>;
20071 fn mul(self, rhs: InverseArea<T>) -> Self::Output {
20072 Mass{kg: self.kgm2 * rhs.per_m2}
20073 }
20074}
20075impl<T> core::ops::Mul<InverseArea<T>> for &MomentOfInertia<T> where T: NumLike {
20077 type Output = Mass<T>;
20078 fn mul(self, rhs: InverseArea<T>) -> Self::Output {
20079 Mass{kg: self.kgm2.clone() * rhs.per_m2}
20080 }
20081}
20082impl<T> core::ops::Mul<&InverseArea<T>> for MomentOfInertia<T> where T: NumLike {
20084 type Output = Mass<T>;
20085 fn mul(self, rhs: &InverseArea<T>) -> Self::Output {
20086 Mass{kg: self.kgm2 * rhs.per_m2.clone()}
20087 }
20088}
20089impl<T> core::ops::Mul<&InverseArea<T>> for &MomentOfInertia<T> where T: NumLike {
20091 type Output = Mass<T>;
20092 fn mul(self, rhs: &InverseArea<T>) -> Self::Output {
20093 Mass{kg: self.kgm2.clone() * rhs.per_m2.clone()}
20094 }
20095}
20096
20097impl<T> core::ops::Div<AngularMomentum<T>> for MomentOfInertia<T> where T: NumLike {
20100 type Output = InverseAngularVelocity<T>;
20101 fn div(self, rhs: AngularMomentum<T>) -> Self::Output {
20102 InverseAngularVelocity{s_per_rad: self.kgm2 / rhs.kgm2radps}
20103 }
20104}
20105impl<T> core::ops::Div<AngularMomentum<T>> for &MomentOfInertia<T> where T: NumLike {
20107 type Output = InverseAngularVelocity<T>;
20108 fn div(self, rhs: AngularMomentum<T>) -> Self::Output {
20109 InverseAngularVelocity{s_per_rad: self.kgm2.clone() / rhs.kgm2radps}
20110 }
20111}
20112impl<T> core::ops::Div<&AngularMomentum<T>> for MomentOfInertia<T> where T: NumLike {
20114 type Output = InverseAngularVelocity<T>;
20115 fn div(self, rhs: &AngularMomentum<T>) -> Self::Output {
20116 InverseAngularVelocity{s_per_rad: self.kgm2 / rhs.kgm2radps.clone()}
20117 }
20118}
20119impl<T> core::ops::Div<&AngularMomentum<T>> for &MomentOfInertia<T> where T: NumLike {
20121 type Output = InverseAngularVelocity<T>;
20122 fn div(self, rhs: &AngularMomentum<T>) -> Self::Output {
20123 InverseAngularVelocity{s_per_rad: self.kgm2.clone() / rhs.kgm2radps.clone()}
20124 }
20125}
20126
20127impl<T> core::ops::Mul<AngularVelocity<T>> for MomentOfInertia<T> where T: NumLike {
20130 type Output = AngularMomentum<T>;
20131 fn mul(self, rhs: AngularVelocity<T>) -> Self::Output {
20132 AngularMomentum{kgm2radps: self.kgm2 * rhs.radps}
20133 }
20134}
20135impl<T> core::ops::Mul<AngularVelocity<T>> for &MomentOfInertia<T> where T: NumLike {
20137 type Output = AngularMomentum<T>;
20138 fn mul(self, rhs: AngularVelocity<T>) -> Self::Output {
20139 AngularMomentum{kgm2radps: self.kgm2.clone() * rhs.radps}
20140 }
20141}
20142impl<T> core::ops::Mul<&AngularVelocity<T>> for MomentOfInertia<T> where T: NumLike {
20144 type Output = AngularMomentum<T>;
20145 fn mul(self, rhs: &AngularVelocity<T>) -> Self::Output {
20146 AngularMomentum{kgm2radps: self.kgm2 * rhs.radps.clone()}
20147 }
20148}
20149impl<T> core::ops::Mul<&AngularVelocity<T>> for &MomentOfInertia<T> where T: NumLike {
20151 type Output = AngularMomentum<T>;
20152 fn mul(self, rhs: &AngularVelocity<T>) -> Self::Output {
20153 AngularMomentum{kgm2radps: self.kgm2.clone() * rhs.radps.clone()}
20154 }
20155}
20156
20157impl<T> core::ops::Mul<InverseAngularMomentum<T>> for MomentOfInertia<T> where T: NumLike {
20160 type Output = InverseAngularVelocity<T>;
20161 fn mul(self, rhs: InverseAngularMomentum<T>) -> Self::Output {
20162 InverseAngularVelocity{s_per_rad: self.kgm2 * rhs.s_per_kgm2rad}
20163 }
20164}
20165impl<T> core::ops::Mul<InverseAngularMomentum<T>> for &MomentOfInertia<T> where T: NumLike {
20167 type Output = InverseAngularVelocity<T>;
20168 fn mul(self, rhs: InverseAngularMomentum<T>) -> Self::Output {
20169 InverseAngularVelocity{s_per_rad: self.kgm2.clone() * rhs.s_per_kgm2rad}
20170 }
20171}
20172impl<T> core::ops::Mul<&InverseAngularMomentum<T>> for MomentOfInertia<T> where T: NumLike {
20174 type Output = InverseAngularVelocity<T>;
20175 fn mul(self, rhs: &InverseAngularMomentum<T>) -> Self::Output {
20176 InverseAngularVelocity{s_per_rad: self.kgm2 * rhs.s_per_kgm2rad.clone()}
20177 }
20178}
20179impl<T> core::ops::Mul<&InverseAngularMomentum<T>> for &MomentOfInertia<T> where T: NumLike {
20181 type Output = InverseAngularVelocity<T>;
20182 fn mul(self, rhs: &InverseAngularMomentum<T>) -> Self::Output {
20183 InverseAngularVelocity{s_per_rad: self.kgm2.clone() * rhs.s_per_kgm2rad.clone()}
20184 }
20185}
20186
20187impl<T> core::ops::Div<InverseAngularVelocity<T>> for MomentOfInertia<T> where T: NumLike {
20190 type Output = AngularMomentum<T>;
20191 fn div(self, rhs: InverseAngularVelocity<T>) -> Self::Output {
20192 AngularMomentum{kgm2radps: self.kgm2 / rhs.s_per_rad}
20193 }
20194}
20195impl<T> core::ops::Div<InverseAngularVelocity<T>> for &MomentOfInertia<T> where T: NumLike {
20197 type Output = AngularMomentum<T>;
20198 fn div(self, rhs: InverseAngularVelocity<T>) -> Self::Output {
20199 AngularMomentum{kgm2radps: self.kgm2.clone() / rhs.s_per_rad}
20200 }
20201}
20202impl<T> core::ops::Div<&InverseAngularVelocity<T>> for MomentOfInertia<T> where T: NumLike {
20204 type Output = AngularMomentum<T>;
20205 fn div(self, rhs: &InverseAngularVelocity<T>) -> Self::Output {
20206 AngularMomentum{kgm2radps: self.kgm2 / rhs.s_per_rad.clone()}
20207 }
20208}
20209impl<T> core::ops::Div<&InverseAngularVelocity<T>> for &MomentOfInertia<T> where T: NumLike {
20211 type Output = AngularMomentum<T>;
20212 fn div(self, rhs: &InverseAngularVelocity<T>) -> Self::Output {
20213 AngularMomentum{kgm2radps: self.kgm2.clone() / rhs.s_per_rad.clone()}
20214 }
20215}
20216
20217#[derive(UnitStruct, Debug, Clone)]
20219#[cfg_attr(feature="serde", derive(Serialize, Deserialize))]
20220pub struct Momentum<T: NumLike>{
20221 pub kgmps: T
20223}
20224
20225impl<T> Momentum<T> where T: NumLike {
20226
20227 pub fn unit_name() -> &'static str { "kilogram meters per second" }
20229
20230 pub fn unit_symbol() -> &'static str { "kg·m/s" }
20232
20233 pub fn from_kgmps(kgmps: T) -> Self { Momentum{kgmps: kgmps} }
20238
20239 pub fn to_kgmps(&self) -> T { self.kgmps.clone() }
20241
20242 pub fn from_kilogram_meters_per_second(kilogram_meters_per_second: T) -> Self { Momentum{kgmps: kilogram_meters_per_second} }
20247
20248 pub fn to_kilogram_meters_per_second(&self) -> T { self.kgmps.clone() }
20250
20251}
20252
20253impl<T> fmt::Display for Momentum<T> where T: NumLike {
20254 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
20255 write!(f, "{} {}", &self.kgmps, Self::unit_symbol())
20256 }
20257}
20258
20259impl<T> Momentum<T> where T: NumLike+From<f64> {
20260
20261 pub fn to_gram_centimeters_per_second(&self) -> T {
20265 return self.kgmps.clone() * T::from(100000.0_f64);
20266 }
20267
20268 pub fn from_gram_centimeters_per_second(gram_centimeters_per_second: T) -> Self {
20275 Momentum{kgmps: gram_centimeters_per_second * T::from(1e-05_f64)}
20276 }
20277
20278 pub fn to_gcmps(&self) -> T {
20282 return self.kgmps.clone() * T::from(100000.0_f64);
20283 }
20284
20285 pub fn from_gcmps(gcmps: T) -> Self {
20292 Momentum{kgmps: gcmps * T::from(1e-05_f64)}
20293 }
20294
20295}
20296
20297
20298#[cfg(feature="num-bigfloat")]
20300impl core::ops::Mul<Momentum<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
20301 type Output = Momentum<num_bigfloat::BigFloat>;
20302 fn mul(self, rhs: Momentum<num_bigfloat::BigFloat>) -> Self::Output {
20303 Momentum{kgmps: self * rhs.kgmps}
20304 }
20305}
20306#[cfg(feature="num-bigfloat")]
20308impl core::ops::Mul<Momentum<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
20309 type Output = Momentum<num_bigfloat::BigFloat>;
20310 fn mul(self, rhs: Momentum<num_bigfloat::BigFloat>) -> Self::Output {
20311 Momentum{kgmps: self.clone() * rhs.kgmps}
20312 }
20313}
20314#[cfg(feature="num-bigfloat")]
20316impl core::ops::Mul<&Momentum<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
20317 type Output = Momentum<num_bigfloat::BigFloat>;
20318 fn mul(self, rhs: &Momentum<num_bigfloat::BigFloat>) -> Self::Output {
20319 Momentum{kgmps: self * rhs.kgmps.clone()}
20320 }
20321}
20322#[cfg(feature="num-bigfloat")]
20324impl core::ops::Mul<&Momentum<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
20325 type Output = Momentum<num_bigfloat::BigFloat>;
20326 fn mul(self, rhs: &Momentum<num_bigfloat::BigFloat>) -> Self::Output {
20327 Momentum{kgmps: self.clone() * rhs.kgmps.clone()}
20328 }
20329}
20330
20331#[cfg(feature="num-complex")]
20333impl core::ops::Mul<Momentum<num_complex::Complex32>> for num_complex::Complex32 {
20334 type Output = Momentum<num_complex::Complex32>;
20335 fn mul(self, rhs: Momentum<num_complex::Complex32>) -> Self::Output {
20336 Momentum{kgmps: self * rhs.kgmps}
20337 }
20338}
20339#[cfg(feature="num-complex")]
20341impl core::ops::Mul<Momentum<num_complex::Complex32>> for &num_complex::Complex32 {
20342 type Output = Momentum<num_complex::Complex32>;
20343 fn mul(self, rhs: Momentum<num_complex::Complex32>) -> Self::Output {
20344 Momentum{kgmps: self.clone() * rhs.kgmps}
20345 }
20346}
20347#[cfg(feature="num-complex")]
20349impl core::ops::Mul<&Momentum<num_complex::Complex32>> for num_complex::Complex32 {
20350 type Output = Momentum<num_complex::Complex32>;
20351 fn mul(self, rhs: &Momentum<num_complex::Complex32>) -> Self::Output {
20352 Momentum{kgmps: self * rhs.kgmps.clone()}
20353 }
20354}
20355#[cfg(feature="num-complex")]
20357impl core::ops::Mul<&Momentum<num_complex::Complex32>> for &num_complex::Complex32 {
20358 type Output = Momentum<num_complex::Complex32>;
20359 fn mul(self, rhs: &Momentum<num_complex::Complex32>) -> Self::Output {
20360 Momentum{kgmps: self.clone() * rhs.kgmps.clone()}
20361 }
20362}
20363
20364#[cfg(feature="num-complex")]
20366impl core::ops::Mul<Momentum<num_complex::Complex64>> for num_complex::Complex64 {
20367 type Output = Momentum<num_complex::Complex64>;
20368 fn mul(self, rhs: Momentum<num_complex::Complex64>) -> Self::Output {
20369 Momentum{kgmps: self * rhs.kgmps}
20370 }
20371}
20372#[cfg(feature="num-complex")]
20374impl core::ops::Mul<Momentum<num_complex::Complex64>> for &num_complex::Complex64 {
20375 type Output = Momentum<num_complex::Complex64>;
20376 fn mul(self, rhs: Momentum<num_complex::Complex64>) -> Self::Output {
20377 Momentum{kgmps: self.clone() * rhs.kgmps}
20378 }
20379}
20380#[cfg(feature="num-complex")]
20382impl core::ops::Mul<&Momentum<num_complex::Complex64>> for num_complex::Complex64 {
20383 type Output = Momentum<num_complex::Complex64>;
20384 fn mul(self, rhs: &Momentum<num_complex::Complex64>) -> Self::Output {
20385 Momentum{kgmps: self * rhs.kgmps.clone()}
20386 }
20387}
20388#[cfg(feature="num-complex")]
20390impl core::ops::Mul<&Momentum<num_complex::Complex64>> for &num_complex::Complex64 {
20391 type Output = Momentum<num_complex::Complex64>;
20392 fn mul(self, rhs: &Momentum<num_complex::Complex64>) -> Self::Output {
20393 Momentum{kgmps: self.clone() * rhs.kgmps.clone()}
20394 }
20395}
20396
20397
20398
20399#[cfg(feature = "uom")]
20401impl<T> Into<uom::si::f32::Momentum> for Momentum<T> where T: NumLike+Into<f32> {
20402 fn into(self) -> uom::si::f32::Momentum {
20403 uom::si::f32::Momentum::new::<uom::si::momentum::kilogram_meter_per_second>(self.kgmps.into())
20404 }
20405}
20406
20407#[cfg(feature = "uom")]
20409impl<T> From<uom::si::f32::Momentum> for Momentum<T> where T: NumLike+From<f32> {
20410 fn from(src: uom::si::f32::Momentum) -> Self {
20411 Momentum{kgmps: T::from(src.value)}
20412 }
20413}
20414
20415#[cfg(feature = "uom")]
20417impl<T> Into<uom::si::f64::Momentum> for Momentum<T> where T: NumLike+Into<f64> {
20418 fn into(self) -> uom::si::f64::Momentum {
20419 uom::si::f64::Momentum::new::<uom::si::momentum::kilogram_meter_per_second>(self.kgmps.into())
20420 }
20421}
20422
20423#[cfg(feature = "uom")]
20425impl<T> From<uom::si::f64::Momentum> for Momentum<T> where T: NumLike+From<f64> {
20426 fn from(src: uom::si::f64::Momentum) -> Self {
20427 Momentum{kgmps: T::from(src.value)}
20428 }
20429}
20430
20431
20432impl<T> core::ops::Mul<InverseMass<T>> for Momentum<T> where T: NumLike {
20435 type Output = Velocity<T>;
20436 fn mul(self, rhs: InverseMass<T>) -> Self::Output {
20437 Velocity{mps: self.kgmps * rhs.per_kg}
20438 }
20439}
20440impl<T> core::ops::Mul<InverseMass<T>> for &Momentum<T> where T: NumLike {
20442 type Output = Velocity<T>;
20443 fn mul(self, rhs: InverseMass<T>) -> Self::Output {
20444 Velocity{mps: self.kgmps.clone() * rhs.per_kg}
20445 }
20446}
20447impl<T> core::ops::Mul<&InverseMass<T>> for Momentum<T> where T: NumLike {
20449 type Output = Velocity<T>;
20450 fn mul(self, rhs: &InverseMass<T>) -> Self::Output {
20451 Velocity{mps: self.kgmps * rhs.per_kg.clone()}
20452 }
20453}
20454impl<T> core::ops::Mul<&InverseMass<T>> for &Momentum<T> where T: NumLike {
20456 type Output = Velocity<T>;
20457 fn mul(self, rhs: &InverseMass<T>) -> Self::Output {
20458 Velocity{mps: self.kgmps.clone() * rhs.per_kg.clone()}
20459 }
20460}
20461
20462impl<T> core::ops::Div<Mass<T>> for Momentum<T> where T: NumLike {
20465 type Output = Velocity<T>;
20466 fn div(self, rhs: Mass<T>) -> Self::Output {
20467 Velocity{mps: self.kgmps / rhs.kg}
20468 }
20469}
20470impl<T> core::ops::Div<Mass<T>> for &Momentum<T> where T: NumLike {
20472 type Output = Velocity<T>;
20473 fn div(self, rhs: Mass<T>) -> Self::Output {
20474 Velocity{mps: self.kgmps.clone() / rhs.kg}
20475 }
20476}
20477impl<T> core::ops::Div<&Mass<T>> for Momentum<T> where T: NumLike {
20479 type Output = Velocity<T>;
20480 fn div(self, rhs: &Mass<T>) -> Self::Output {
20481 Velocity{mps: self.kgmps / rhs.kg.clone()}
20482 }
20483}
20484impl<T> core::ops::Div<&Mass<T>> for &Momentum<T> where T: NumLike {
20486 type Output = Velocity<T>;
20487 fn div(self, rhs: &Mass<T>) -> Self::Output {
20488 Velocity{mps: self.kgmps.clone() / rhs.kg.clone()}
20489 }
20490}
20491
20492impl<T> core::ops::Div<Time<T>> for Momentum<T> where T: NumLike {
20495 type Output = Force<T>;
20496 fn div(self, rhs: Time<T>) -> Self::Output {
20497 Force{N: self.kgmps / rhs.s}
20498 }
20499}
20500impl<T> core::ops::Div<Time<T>> for &Momentum<T> where T: NumLike {
20502 type Output = Force<T>;
20503 fn div(self, rhs: Time<T>) -> Self::Output {
20504 Force{N: self.kgmps.clone() / rhs.s}
20505 }
20506}
20507impl<T> core::ops::Div<&Time<T>> for Momentum<T> where T: NumLike {
20509 type Output = Force<T>;
20510 fn div(self, rhs: &Time<T>) -> Self::Output {
20511 Force{N: self.kgmps / rhs.s.clone()}
20512 }
20513}
20514impl<T> core::ops::Div<&Time<T>> for &Momentum<T> where T: NumLike {
20516 type Output = Force<T>;
20517 fn div(self, rhs: &Time<T>) -> Self::Output {
20518 Force{N: self.kgmps.clone() / rhs.s.clone()}
20519 }
20520}
20521
20522impl<T> core::ops::Mul<Acceleration<T>> for Momentum<T> where T: NumLike {
20525 type Output = Power<T>;
20526 fn mul(self, rhs: Acceleration<T>) -> Self::Output {
20527 Power{W: self.kgmps * rhs.mps2}
20528 }
20529}
20530impl<T> core::ops::Mul<Acceleration<T>> for &Momentum<T> where T: NumLike {
20532 type Output = Power<T>;
20533 fn mul(self, rhs: Acceleration<T>) -> Self::Output {
20534 Power{W: self.kgmps.clone() * rhs.mps2}
20535 }
20536}
20537impl<T> core::ops::Mul<&Acceleration<T>> for Momentum<T> where T: NumLike {
20539 type Output = Power<T>;
20540 fn mul(self, rhs: &Acceleration<T>) -> Self::Output {
20541 Power{W: self.kgmps * rhs.mps2.clone()}
20542 }
20543}
20544impl<T> core::ops::Mul<&Acceleration<T>> for &Momentum<T> where T: NumLike {
20546 type Output = Power<T>;
20547 fn mul(self, rhs: &Acceleration<T>) -> Self::Output {
20548 Power{W: self.kgmps.clone() * rhs.mps2.clone()}
20549 }
20550}
20551
20552impl<T> core::ops::Div<Energy<T>> for Momentum<T> where T: NumLike {
20555 type Output = TimePerDistance<T>;
20556 fn div(self, rhs: Energy<T>) -> Self::Output {
20557 TimePerDistance{spm: self.kgmps / rhs.J}
20558 }
20559}
20560impl<T> core::ops::Div<Energy<T>> for &Momentum<T> where T: NumLike {
20562 type Output = TimePerDistance<T>;
20563 fn div(self, rhs: Energy<T>) -> Self::Output {
20564 TimePerDistance{spm: self.kgmps.clone() / rhs.J}
20565 }
20566}
20567impl<T> core::ops::Div<&Energy<T>> for Momentum<T> where T: NumLike {
20569 type Output = TimePerDistance<T>;
20570 fn div(self, rhs: &Energy<T>) -> Self::Output {
20571 TimePerDistance{spm: self.kgmps / rhs.J.clone()}
20572 }
20573}
20574impl<T> core::ops::Div<&Energy<T>> for &Momentum<T> where T: NumLike {
20576 type Output = TimePerDistance<T>;
20577 fn div(self, rhs: &Energy<T>) -> Self::Output {
20578 TimePerDistance{spm: self.kgmps.clone() / rhs.J.clone()}
20579 }
20580}
20581
20582impl<T> core::ops::Div<Torque<T>> for Momentum<T> where T: NumLike {
20585 type Output = TimePerDistance<T>;
20586 fn div(self, rhs: Torque<T>) -> Self::Output {
20587 TimePerDistance{spm: self.kgmps / rhs.Nm}
20588 }
20589}
20590impl<T> core::ops::Div<Torque<T>> for &Momentum<T> where T: NumLike {
20592 type Output = TimePerDistance<T>;
20593 fn div(self, rhs: Torque<T>) -> Self::Output {
20594 TimePerDistance{spm: self.kgmps.clone() / rhs.Nm}
20595 }
20596}
20597impl<T> core::ops::Div<&Torque<T>> for Momentum<T> where T: NumLike {
20599 type Output = TimePerDistance<T>;
20600 fn div(self, rhs: &Torque<T>) -> Self::Output {
20601 TimePerDistance{spm: self.kgmps / rhs.Nm.clone()}
20602 }
20603}
20604impl<T> core::ops::Div<&Torque<T>> for &Momentum<T> where T: NumLike {
20606 type Output = TimePerDistance<T>;
20607 fn div(self, rhs: &Torque<T>) -> Self::Output {
20608 TimePerDistance{spm: self.kgmps.clone() / rhs.Nm.clone()}
20609 }
20610}
20611
20612impl<T> core::ops::Div<Force<T>> for Momentum<T> where T: NumLike {
20615 type Output = Time<T>;
20616 fn div(self, rhs: Force<T>) -> Self::Output {
20617 Time{s: self.kgmps / rhs.N}
20618 }
20619}
20620impl<T> core::ops::Div<Force<T>> for &Momentum<T> where T: NumLike {
20622 type Output = Time<T>;
20623 fn div(self, rhs: Force<T>) -> Self::Output {
20624 Time{s: self.kgmps.clone() / rhs.N}
20625 }
20626}
20627impl<T> core::ops::Div<&Force<T>> for Momentum<T> where T: NumLike {
20629 type Output = Time<T>;
20630 fn div(self, rhs: &Force<T>) -> Self::Output {
20631 Time{s: self.kgmps / rhs.N.clone()}
20632 }
20633}
20634impl<T> core::ops::Div<&Force<T>> for &Momentum<T> where T: NumLike {
20636 type Output = Time<T>;
20637 fn div(self, rhs: &Force<T>) -> Self::Output {
20638 Time{s: self.kgmps.clone() / rhs.N.clone()}
20639 }
20640}
20641
20642impl<T> core::ops::Mul<Frequency<T>> for Momentum<T> where T: NumLike {
20645 type Output = Force<T>;
20646 fn mul(self, rhs: Frequency<T>) -> Self::Output {
20647 Force{N: self.kgmps * rhs.Hz}
20648 }
20649}
20650impl<T> core::ops::Mul<Frequency<T>> for &Momentum<T> where T: NumLike {
20652 type Output = Force<T>;
20653 fn mul(self, rhs: Frequency<T>) -> Self::Output {
20654 Force{N: self.kgmps.clone() * rhs.Hz}
20655 }
20656}
20657impl<T> core::ops::Mul<&Frequency<T>> for Momentum<T> where T: NumLike {
20659 type Output = Force<T>;
20660 fn mul(self, rhs: &Frequency<T>) -> Self::Output {
20661 Force{N: self.kgmps * rhs.Hz.clone()}
20662 }
20663}
20664impl<T> core::ops::Mul<&Frequency<T>> for &Momentum<T> where T: NumLike {
20666 type Output = Force<T>;
20667 fn mul(self, rhs: &Frequency<T>) -> Self::Output {
20668 Force{N: self.kgmps.clone() * rhs.Hz.clone()}
20669 }
20670}
20671
20672impl<T> core::ops::Div<InverseAcceleration<T>> for Momentum<T> where T: NumLike {
20675 type Output = Power<T>;
20676 fn div(self, rhs: InverseAcceleration<T>) -> Self::Output {
20677 Power{W: self.kgmps / rhs.s2pm}
20678 }
20679}
20680impl<T> core::ops::Div<InverseAcceleration<T>> for &Momentum<T> where T: NumLike {
20682 type Output = Power<T>;
20683 fn div(self, rhs: InverseAcceleration<T>) -> Self::Output {
20684 Power{W: self.kgmps.clone() / rhs.s2pm}
20685 }
20686}
20687impl<T> core::ops::Div<&InverseAcceleration<T>> for Momentum<T> where T: NumLike {
20689 type Output = Power<T>;
20690 fn div(self, rhs: &InverseAcceleration<T>) -> Self::Output {
20691 Power{W: self.kgmps / rhs.s2pm.clone()}
20692 }
20693}
20694impl<T> core::ops::Div<&InverseAcceleration<T>> for &Momentum<T> where T: NumLike {
20696 type Output = Power<T>;
20697 fn div(self, rhs: &InverseAcceleration<T>) -> Self::Output {
20698 Power{W: self.kgmps.clone() / rhs.s2pm.clone()}
20699 }
20700}
20701
20702impl<T> core::ops::Mul<InverseEnergy<T>> for Momentum<T> where T: NumLike {
20705 type Output = TimePerDistance<T>;
20706 fn mul(self, rhs: InverseEnergy<T>) -> Self::Output {
20707 TimePerDistance{spm: self.kgmps * rhs.per_J}
20708 }
20709}
20710impl<T> core::ops::Mul<InverseEnergy<T>> for &Momentum<T> where T: NumLike {
20712 type Output = TimePerDistance<T>;
20713 fn mul(self, rhs: InverseEnergy<T>) -> Self::Output {
20714 TimePerDistance{spm: self.kgmps.clone() * rhs.per_J}
20715 }
20716}
20717impl<T> core::ops::Mul<&InverseEnergy<T>> for Momentum<T> where T: NumLike {
20719 type Output = TimePerDistance<T>;
20720 fn mul(self, rhs: &InverseEnergy<T>) -> Self::Output {
20721 TimePerDistance{spm: self.kgmps * rhs.per_J.clone()}
20722 }
20723}
20724impl<T> core::ops::Mul<&InverseEnergy<T>> for &Momentum<T> where T: NumLike {
20726 type Output = TimePerDistance<T>;
20727 fn mul(self, rhs: &InverseEnergy<T>) -> Self::Output {
20728 TimePerDistance{spm: self.kgmps.clone() * rhs.per_J.clone()}
20729 }
20730}
20731
20732impl<T> core::ops::Mul<InverseTorque<T>> for Momentum<T> where T: NumLike {
20735 type Output = TimePerDistance<T>;
20736 fn mul(self, rhs: InverseTorque<T>) -> Self::Output {
20737 TimePerDistance{spm: self.kgmps * rhs.per_Nm}
20738 }
20739}
20740impl<T> core::ops::Mul<InverseTorque<T>> for &Momentum<T> where T: NumLike {
20742 type Output = TimePerDistance<T>;
20743 fn mul(self, rhs: InverseTorque<T>) -> Self::Output {
20744 TimePerDistance{spm: self.kgmps.clone() * rhs.per_Nm}
20745 }
20746}
20747impl<T> core::ops::Mul<&InverseTorque<T>> for Momentum<T> where T: NumLike {
20749 type Output = TimePerDistance<T>;
20750 fn mul(self, rhs: &InverseTorque<T>) -> Self::Output {
20751 TimePerDistance{spm: self.kgmps * rhs.per_Nm.clone()}
20752 }
20753}
20754impl<T> core::ops::Mul<&InverseTorque<T>> for &Momentum<T> where T: NumLike {
20756 type Output = TimePerDistance<T>;
20757 fn mul(self, rhs: &InverseTorque<T>) -> Self::Output {
20758 TimePerDistance{spm: self.kgmps.clone() * rhs.per_Nm.clone()}
20759 }
20760}
20761
20762impl<T> core::ops::Mul<InverseForce<T>> for Momentum<T> where T: NumLike {
20765 type Output = Time<T>;
20766 fn mul(self, rhs: InverseForce<T>) -> Self::Output {
20767 Time{s: self.kgmps * rhs.per_N}
20768 }
20769}
20770impl<T> core::ops::Mul<InverseForce<T>> for &Momentum<T> where T: NumLike {
20772 type Output = Time<T>;
20773 fn mul(self, rhs: InverseForce<T>) -> Self::Output {
20774 Time{s: self.kgmps.clone() * rhs.per_N}
20775 }
20776}
20777impl<T> core::ops::Mul<&InverseForce<T>> for Momentum<T> where T: NumLike {
20779 type Output = Time<T>;
20780 fn mul(self, rhs: &InverseForce<T>) -> Self::Output {
20781 Time{s: self.kgmps * rhs.per_N.clone()}
20782 }
20783}
20784impl<T> core::ops::Mul<&InverseForce<T>> for &Momentum<T> where T: NumLike {
20786 type Output = Time<T>;
20787 fn mul(self, rhs: &InverseForce<T>) -> Self::Output {
20788 Time{s: self.kgmps.clone() * rhs.per_N.clone()}
20789 }
20790}
20791
20792impl<T> core::ops::Mul<InversePower<T>> for Momentum<T> where T: NumLike {
20795 type Output = InverseAcceleration<T>;
20796 fn mul(self, rhs: InversePower<T>) -> Self::Output {
20797 InverseAcceleration{s2pm: self.kgmps * rhs.per_W}
20798 }
20799}
20800impl<T> core::ops::Mul<InversePower<T>> for &Momentum<T> where T: NumLike {
20802 type Output = InverseAcceleration<T>;
20803 fn mul(self, rhs: InversePower<T>) -> Self::Output {
20804 InverseAcceleration{s2pm: self.kgmps.clone() * rhs.per_W}
20805 }
20806}
20807impl<T> core::ops::Mul<&InversePower<T>> for Momentum<T> where T: NumLike {
20809 type Output = InverseAcceleration<T>;
20810 fn mul(self, rhs: &InversePower<T>) -> Self::Output {
20811 InverseAcceleration{s2pm: self.kgmps * rhs.per_W.clone()}
20812 }
20813}
20814impl<T> core::ops::Mul<&InversePower<T>> for &Momentum<T> where T: NumLike {
20816 type Output = InverseAcceleration<T>;
20817 fn mul(self, rhs: &InversePower<T>) -> Self::Output {
20818 InverseAcceleration{s2pm: self.kgmps.clone() * rhs.per_W.clone()}
20819 }
20820}
20821
20822impl<T> core::ops::Div<Power<T>> for Momentum<T> where T: NumLike {
20825 type Output = InverseAcceleration<T>;
20826 fn div(self, rhs: Power<T>) -> Self::Output {
20827 InverseAcceleration{s2pm: self.kgmps / rhs.W}
20828 }
20829}
20830impl<T> core::ops::Div<Power<T>> for &Momentum<T> where T: NumLike {
20832 type Output = InverseAcceleration<T>;
20833 fn div(self, rhs: Power<T>) -> Self::Output {
20834 InverseAcceleration{s2pm: self.kgmps.clone() / rhs.W}
20835 }
20836}
20837impl<T> core::ops::Div<&Power<T>> for Momentum<T> where T: NumLike {
20839 type Output = InverseAcceleration<T>;
20840 fn div(self, rhs: &Power<T>) -> Self::Output {
20841 InverseAcceleration{s2pm: self.kgmps / rhs.W.clone()}
20842 }
20843}
20844impl<T> core::ops::Div<&Power<T>> for &Momentum<T> where T: NumLike {
20846 type Output = InverseAcceleration<T>;
20847 fn div(self, rhs: &Power<T>) -> Self::Output {
20848 InverseAcceleration{s2pm: self.kgmps.clone() / rhs.W.clone()}
20849 }
20850}
20851
20852impl<T> core::ops::Mul<TimePerDistance<T>> for Momentum<T> where T: NumLike {
20855 type Output = Mass<T>;
20856 fn mul(self, rhs: TimePerDistance<T>) -> Self::Output {
20857 Mass{kg: self.kgmps * rhs.spm}
20858 }
20859}
20860impl<T> core::ops::Mul<TimePerDistance<T>> for &Momentum<T> where T: NumLike {
20862 type Output = Mass<T>;
20863 fn mul(self, rhs: TimePerDistance<T>) -> Self::Output {
20864 Mass{kg: self.kgmps.clone() * rhs.spm}
20865 }
20866}
20867impl<T> core::ops::Mul<&TimePerDistance<T>> for Momentum<T> where T: NumLike {
20869 type Output = Mass<T>;
20870 fn mul(self, rhs: &TimePerDistance<T>) -> Self::Output {
20871 Mass{kg: self.kgmps * rhs.spm.clone()}
20872 }
20873}
20874impl<T> core::ops::Mul<&TimePerDistance<T>> for &Momentum<T> where T: NumLike {
20876 type Output = Mass<T>;
20877 fn mul(self, rhs: &TimePerDistance<T>) -> Self::Output {
20878 Mass{kg: self.kgmps.clone() * rhs.spm.clone()}
20879 }
20880}
20881
20882impl<T> core::ops::Div<TimePerDistance<T>> for Momentum<T> where T: NumLike {
20885 type Output = Energy<T>;
20886 fn div(self, rhs: TimePerDistance<T>) -> Self::Output {
20887 Energy{J: self.kgmps / rhs.spm}
20888 }
20889}
20890impl<T> core::ops::Div<TimePerDistance<T>> for &Momentum<T> where T: NumLike {
20892 type Output = Energy<T>;
20893 fn div(self, rhs: TimePerDistance<T>) -> Self::Output {
20894 Energy{J: self.kgmps.clone() / rhs.spm}
20895 }
20896}
20897impl<T> core::ops::Div<&TimePerDistance<T>> for Momentum<T> where T: NumLike {
20899 type Output = Energy<T>;
20900 fn div(self, rhs: &TimePerDistance<T>) -> Self::Output {
20901 Energy{J: self.kgmps / rhs.spm.clone()}
20902 }
20903}
20904impl<T> core::ops::Div<&TimePerDistance<T>> for &Momentum<T> where T: NumLike {
20906 type Output = Energy<T>;
20907 fn div(self, rhs: &TimePerDistance<T>) -> Self::Output {
20908 Energy{J: self.kgmps.clone() / rhs.spm.clone()}
20909 }
20910}
20911
20912impl<T> core::ops::Mul<Velocity<T>> for Momentum<T> where T: NumLike {
20915 type Output = Energy<T>;
20916 fn mul(self, rhs: Velocity<T>) -> Self::Output {
20917 Energy{J: self.kgmps * rhs.mps}
20918 }
20919}
20920impl<T> core::ops::Mul<Velocity<T>> for &Momentum<T> where T: NumLike {
20922 type Output = Energy<T>;
20923 fn mul(self, rhs: Velocity<T>) -> Self::Output {
20924 Energy{J: self.kgmps.clone() * rhs.mps}
20925 }
20926}
20927impl<T> core::ops::Mul<&Velocity<T>> for Momentum<T> where T: NumLike {
20929 type Output = Energy<T>;
20930 fn mul(self, rhs: &Velocity<T>) -> Self::Output {
20931 Energy{J: self.kgmps * rhs.mps.clone()}
20932 }
20933}
20934impl<T> core::ops::Mul<&Velocity<T>> for &Momentum<T> where T: NumLike {
20936 type Output = Energy<T>;
20937 fn mul(self, rhs: &Velocity<T>) -> Self::Output {
20938 Energy{J: self.kgmps.clone() * rhs.mps.clone()}
20939 }
20940}
20941
20942impl<T> core::ops::Div<Velocity<T>> for Momentum<T> where T: NumLike {
20945 type Output = Mass<T>;
20946 fn div(self, rhs: Velocity<T>) -> Self::Output {
20947 Mass{kg: self.kgmps / rhs.mps}
20948 }
20949}
20950impl<T> core::ops::Div<Velocity<T>> for &Momentum<T> where T: NumLike {
20952 type Output = Mass<T>;
20953 fn div(self, rhs: Velocity<T>) -> Self::Output {
20954 Mass{kg: self.kgmps.clone() / rhs.mps}
20955 }
20956}
20957impl<T> core::ops::Div<&Velocity<T>> for Momentum<T> where T: NumLike {
20959 type Output = Mass<T>;
20960 fn div(self, rhs: &Velocity<T>) -> Self::Output {
20961 Mass{kg: self.kgmps / rhs.mps.clone()}
20962 }
20963}
20964impl<T> core::ops::Div<&Velocity<T>> for &Momentum<T> where T: NumLike {
20966 type Output = Mass<T>;
20967 fn div(self, rhs: &Velocity<T>) -> Self::Output {
20968 Mass{kg: self.kgmps.clone() / rhs.mps.clone()}
20969 }
20970}
20971
20972impl<T> core::ops::Div<Momentum<T>> for f64 where T: NumLike+From<f64> {
20975 type Output = InverseMomentum<T>;
20976 fn div(self, rhs: Momentum<T>) -> Self::Output {
20977 InverseMomentum{s_per_kgm: T::from(self) / rhs.kgmps}
20978 }
20979}
20980impl<T> core::ops::Div<Momentum<T>> for &f64 where T: NumLike+From<f64> {
20982 type Output = InverseMomentum<T>;
20983 fn div(self, rhs: Momentum<T>) -> Self::Output {
20984 InverseMomentum{s_per_kgm: T::from(self.clone()) / rhs.kgmps}
20985 }
20986}
20987impl<T> core::ops::Div<&Momentum<T>> for f64 where T: NumLike+From<f64> {
20989 type Output = InverseMomentum<T>;
20990 fn div(self, rhs: &Momentum<T>) -> Self::Output {
20991 InverseMomentum{s_per_kgm: T::from(self) / rhs.kgmps.clone()}
20992 }
20993}
20994impl<T> core::ops::Div<&Momentum<T>> for &f64 where T: NumLike+From<f64> {
20996 type Output = InverseMomentum<T>;
20997 fn div(self, rhs: &Momentum<T>) -> Self::Output {
20998 InverseMomentum{s_per_kgm: T::from(self.clone()) / rhs.kgmps.clone()}
20999 }
21000}
21001
21002impl<T> core::ops::Div<Momentum<T>> for f32 where T: NumLike+From<f32> {
21005 type Output = InverseMomentum<T>;
21006 fn div(self, rhs: Momentum<T>) -> Self::Output {
21007 InverseMomentum{s_per_kgm: T::from(self) / rhs.kgmps}
21008 }
21009}
21010impl<T> core::ops::Div<Momentum<T>> for &f32 where T: NumLike+From<f32> {
21012 type Output = InverseMomentum<T>;
21013 fn div(self, rhs: Momentum<T>) -> Self::Output {
21014 InverseMomentum{s_per_kgm: T::from(self.clone()) / rhs.kgmps}
21015 }
21016}
21017impl<T> core::ops::Div<&Momentum<T>> for f32 where T: NumLike+From<f32> {
21019 type Output = InverseMomentum<T>;
21020 fn div(self, rhs: &Momentum<T>) -> Self::Output {
21021 InverseMomentum{s_per_kgm: T::from(self) / rhs.kgmps.clone()}
21022 }
21023}
21024impl<T> core::ops::Div<&Momentum<T>> for &f32 where T: NumLike+From<f32> {
21026 type Output = InverseMomentum<T>;
21027 fn div(self, rhs: &Momentum<T>) -> Self::Output {
21028 InverseMomentum{s_per_kgm: T::from(self.clone()) / rhs.kgmps.clone()}
21029 }
21030}
21031
21032impl<T> core::ops::Div<Momentum<T>> for i64 where T: NumLike+From<i64> {
21035 type Output = InverseMomentum<T>;
21036 fn div(self, rhs: Momentum<T>) -> Self::Output {
21037 InverseMomentum{s_per_kgm: T::from(self) / rhs.kgmps}
21038 }
21039}
21040impl<T> core::ops::Div<Momentum<T>> for &i64 where T: NumLike+From<i64> {
21042 type Output = InverseMomentum<T>;
21043 fn div(self, rhs: Momentum<T>) -> Self::Output {
21044 InverseMomentum{s_per_kgm: T::from(self.clone()) / rhs.kgmps}
21045 }
21046}
21047impl<T> core::ops::Div<&Momentum<T>> for i64 where T: NumLike+From<i64> {
21049 type Output = InverseMomentum<T>;
21050 fn div(self, rhs: &Momentum<T>) -> Self::Output {
21051 InverseMomentum{s_per_kgm: T::from(self) / rhs.kgmps.clone()}
21052 }
21053}
21054impl<T> core::ops::Div<&Momentum<T>> for &i64 where T: NumLike+From<i64> {
21056 type Output = InverseMomentum<T>;
21057 fn div(self, rhs: &Momentum<T>) -> Self::Output {
21058 InverseMomentum{s_per_kgm: T::from(self.clone()) / rhs.kgmps.clone()}
21059 }
21060}
21061
21062impl<T> core::ops::Div<Momentum<T>> for i32 where T: NumLike+From<i32> {
21065 type Output = InverseMomentum<T>;
21066 fn div(self, rhs: Momentum<T>) -> Self::Output {
21067 InverseMomentum{s_per_kgm: T::from(self) / rhs.kgmps}
21068 }
21069}
21070impl<T> core::ops::Div<Momentum<T>> for &i32 where T: NumLike+From<i32> {
21072 type Output = InverseMomentum<T>;
21073 fn div(self, rhs: Momentum<T>) -> Self::Output {
21074 InverseMomentum{s_per_kgm: T::from(self.clone()) / rhs.kgmps}
21075 }
21076}
21077impl<T> core::ops::Div<&Momentum<T>> for i32 where T: NumLike+From<i32> {
21079 type Output = InverseMomentum<T>;
21080 fn div(self, rhs: &Momentum<T>) -> Self::Output {
21081 InverseMomentum{s_per_kgm: T::from(self) / rhs.kgmps.clone()}
21082 }
21083}
21084impl<T> core::ops::Div<&Momentum<T>> for &i32 where T: NumLike+From<i32> {
21086 type Output = InverseMomentum<T>;
21087 fn div(self, rhs: &Momentum<T>) -> Self::Output {
21088 InverseMomentum{s_per_kgm: T::from(self.clone()) / rhs.kgmps.clone()}
21089 }
21090}
21091
21092#[cfg(feature="num-bigfloat")]
21095impl<T> core::ops::Div<Momentum<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
21096 type Output = InverseMomentum<T>;
21097 fn div(self, rhs: Momentum<T>) -> Self::Output {
21098 InverseMomentum{s_per_kgm: T::from(self) / rhs.kgmps}
21099 }
21100}
21101#[cfg(feature="num-bigfloat")]
21103impl<T> core::ops::Div<Momentum<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
21104 type Output = InverseMomentum<T>;
21105 fn div(self, rhs: Momentum<T>) -> Self::Output {
21106 InverseMomentum{s_per_kgm: T::from(self.clone()) / rhs.kgmps}
21107 }
21108}
21109#[cfg(feature="num-bigfloat")]
21111impl<T> core::ops::Div<&Momentum<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
21112 type Output = InverseMomentum<T>;
21113 fn div(self, rhs: &Momentum<T>) -> Self::Output {
21114 InverseMomentum{s_per_kgm: T::from(self) / rhs.kgmps.clone()}
21115 }
21116}
21117#[cfg(feature="num-bigfloat")]
21119impl<T> core::ops::Div<&Momentum<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
21120 type Output = InverseMomentum<T>;
21121 fn div(self, rhs: &Momentum<T>) -> Self::Output {
21122 InverseMomentum{s_per_kgm: T::from(self.clone()) / rhs.kgmps.clone()}
21123 }
21124}
21125
21126#[cfg(feature="num-complex")]
21129impl<T> core::ops::Div<Momentum<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
21130 type Output = InverseMomentum<T>;
21131 fn div(self, rhs: Momentum<T>) -> Self::Output {
21132 InverseMomentum{s_per_kgm: T::from(self) / rhs.kgmps}
21133 }
21134}
21135#[cfg(feature="num-complex")]
21137impl<T> core::ops::Div<Momentum<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
21138 type Output = InverseMomentum<T>;
21139 fn div(self, rhs: Momentum<T>) -> Self::Output {
21140 InverseMomentum{s_per_kgm: T::from(self.clone()) / rhs.kgmps}
21141 }
21142}
21143#[cfg(feature="num-complex")]
21145impl<T> core::ops::Div<&Momentum<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
21146 type Output = InverseMomentum<T>;
21147 fn div(self, rhs: &Momentum<T>) -> Self::Output {
21148 InverseMomentum{s_per_kgm: T::from(self) / rhs.kgmps.clone()}
21149 }
21150}
21151#[cfg(feature="num-complex")]
21153impl<T> core::ops::Div<&Momentum<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
21154 type Output = InverseMomentum<T>;
21155 fn div(self, rhs: &Momentum<T>) -> Self::Output {
21156 InverseMomentum{s_per_kgm: T::from(self.clone()) / rhs.kgmps.clone()}
21157 }
21158}
21159
21160#[cfg(feature="num-complex")]
21163impl<T> core::ops::Div<Momentum<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
21164 type Output = InverseMomentum<T>;
21165 fn div(self, rhs: Momentum<T>) -> Self::Output {
21166 InverseMomentum{s_per_kgm: T::from(self) / rhs.kgmps}
21167 }
21168}
21169#[cfg(feature="num-complex")]
21171impl<T> core::ops::Div<Momentum<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
21172 type Output = InverseMomentum<T>;
21173 fn div(self, rhs: Momentum<T>) -> Self::Output {
21174 InverseMomentum{s_per_kgm: T::from(self.clone()) / rhs.kgmps}
21175 }
21176}
21177#[cfg(feature="num-complex")]
21179impl<T> core::ops::Div<&Momentum<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
21180 type Output = InverseMomentum<T>;
21181 fn div(self, rhs: &Momentum<T>) -> Self::Output {
21182 InverseMomentum{s_per_kgm: T::from(self) / rhs.kgmps.clone()}
21183 }
21184}
21185#[cfg(feature="num-complex")]
21187impl<T> core::ops::Div<&Momentum<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
21188 type Output = InverseMomentum<T>;
21189 fn div(self, rhs: &Momentum<T>) -> Self::Output {
21190 InverseMomentum{s_per_kgm: T::from(self.clone()) / rhs.kgmps.clone()}
21191 }
21192}
21193
21194#[derive(UnitStruct, Debug, Clone)]
21196#[cfg_attr(feature="serde", derive(Serialize, Deserialize))]
21197pub struct Power<T: NumLike>{
21198 pub W: T
21200}
21201
21202impl<T> Power<T> where T: NumLike {
21203
21204 pub fn unit_name() -> &'static str { "watts" }
21206
21207 pub fn unit_symbol() -> &'static str { "W" }
21209
21210 pub fn from_W(W: T) -> Self { Power{W: W} }
21215
21216 pub fn to_W(&self) -> T { self.W.clone() }
21218
21219 pub fn from_watts(watts: T) -> Self { Power{W: watts} }
21224
21225 pub fn to_watts(&self) -> T { self.W.clone() }
21227
21228}
21229
21230impl<T> fmt::Display for Power<T> where T: NumLike {
21231 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
21232 write!(f, "{} {}", &self.W, Self::unit_symbol())
21233 }
21234}
21235
21236impl<T> Power<T> where T: NumLike+From<f64> {
21237
21238 pub fn to_mW(&self) -> T {
21242 return self.W.clone() * T::from(1000.0_f64);
21243 }
21244
21245 pub fn from_mW(mW: T) -> Self {
21252 Power{W: mW * T::from(0.001_f64)}
21253 }
21254
21255 pub fn to_uW(&self) -> T {
21259 return self.W.clone() * T::from(1000000.0_f64);
21260 }
21261
21262 pub fn from_uW(uW: T) -> Self {
21269 Power{W: uW * T::from(1e-06_f64)}
21270 }
21271
21272 pub fn to_nW(&self) -> T {
21276 return self.W.clone() * T::from(1000000000.0_f64);
21277 }
21278
21279 pub fn from_nW(nW: T) -> Self {
21286 Power{W: nW * T::from(1e-09_f64)}
21287 }
21288
21289 pub fn to_kW(&self) -> T {
21293 return self.W.clone() * T::from(0.001_f64);
21294 }
21295
21296 pub fn from_kW(kW: T) -> Self {
21303 Power{W: kW * T::from(1000.0_f64)}
21304 }
21305
21306 pub fn to_MW(&self) -> T {
21310 return self.W.clone() * T::from(1e-06_f64);
21311 }
21312
21313 pub fn from_MW(MW: T) -> Self {
21320 Power{W: MW * T::from(1000000.0_f64)}
21321 }
21322
21323 pub fn to_GW(&self) -> T {
21327 return self.W.clone() * T::from(1e-09_f64);
21328 }
21329
21330 pub fn from_GW(GW: T) -> Self {
21337 Power{W: GW * T::from(1000000000.0_f64)}
21338 }
21339
21340 pub fn to_horsepower(&self) -> T {
21344 return self.W.clone() * T::from(0.0013410218586563_f64);
21345 }
21346
21347 pub fn from_horsepower(horsepower: T) -> Self {
21354 Power{W: horsepower * T::from(745.7_f64)}
21355 }
21356
21357}
21358
21359
21360#[cfg(feature="num-bigfloat")]
21362impl core::ops::Mul<Power<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
21363 type Output = Power<num_bigfloat::BigFloat>;
21364 fn mul(self, rhs: Power<num_bigfloat::BigFloat>) -> Self::Output {
21365 Power{W: self * rhs.W}
21366 }
21367}
21368#[cfg(feature="num-bigfloat")]
21370impl core::ops::Mul<Power<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
21371 type Output = Power<num_bigfloat::BigFloat>;
21372 fn mul(self, rhs: Power<num_bigfloat::BigFloat>) -> Self::Output {
21373 Power{W: self.clone() * rhs.W}
21374 }
21375}
21376#[cfg(feature="num-bigfloat")]
21378impl core::ops::Mul<&Power<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
21379 type Output = Power<num_bigfloat::BigFloat>;
21380 fn mul(self, rhs: &Power<num_bigfloat::BigFloat>) -> Self::Output {
21381 Power{W: self * rhs.W.clone()}
21382 }
21383}
21384#[cfg(feature="num-bigfloat")]
21386impl core::ops::Mul<&Power<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
21387 type Output = Power<num_bigfloat::BigFloat>;
21388 fn mul(self, rhs: &Power<num_bigfloat::BigFloat>) -> Self::Output {
21389 Power{W: self.clone() * rhs.W.clone()}
21390 }
21391}
21392
21393#[cfg(feature="num-complex")]
21395impl core::ops::Mul<Power<num_complex::Complex32>> for num_complex::Complex32 {
21396 type Output = Power<num_complex::Complex32>;
21397 fn mul(self, rhs: Power<num_complex::Complex32>) -> Self::Output {
21398 Power{W: self * rhs.W}
21399 }
21400}
21401#[cfg(feature="num-complex")]
21403impl core::ops::Mul<Power<num_complex::Complex32>> for &num_complex::Complex32 {
21404 type Output = Power<num_complex::Complex32>;
21405 fn mul(self, rhs: Power<num_complex::Complex32>) -> Self::Output {
21406 Power{W: self.clone() * rhs.W}
21407 }
21408}
21409#[cfg(feature="num-complex")]
21411impl core::ops::Mul<&Power<num_complex::Complex32>> for num_complex::Complex32 {
21412 type Output = Power<num_complex::Complex32>;
21413 fn mul(self, rhs: &Power<num_complex::Complex32>) -> Self::Output {
21414 Power{W: self * rhs.W.clone()}
21415 }
21416}
21417#[cfg(feature="num-complex")]
21419impl core::ops::Mul<&Power<num_complex::Complex32>> for &num_complex::Complex32 {
21420 type Output = Power<num_complex::Complex32>;
21421 fn mul(self, rhs: &Power<num_complex::Complex32>) -> Self::Output {
21422 Power{W: self.clone() * rhs.W.clone()}
21423 }
21424}
21425
21426#[cfg(feature="num-complex")]
21428impl core::ops::Mul<Power<num_complex::Complex64>> for num_complex::Complex64 {
21429 type Output = Power<num_complex::Complex64>;
21430 fn mul(self, rhs: Power<num_complex::Complex64>) -> Self::Output {
21431 Power{W: self * rhs.W}
21432 }
21433}
21434#[cfg(feature="num-complex")]
21436impl core::ops::Mul<Power<num_complex::Complex64>> for &num_complex::Complex64 {
21437 type Output = Power<num_complex::Complex64>;
21438 fn mul(self, rhs: Power<num_complex::Complex64>) -> Self::Output {
21439 Power{W: self.clone() * rhs.W}
21440 }
21441}
21442#[cfg(feature="num-complex")]
21444impl core::ops::Mul<&Power<num_complex::Complex64>> for num_complex::Complex64 {
21445 type Output = Power<num_complex::Complex64>;
21446 fn mul(self, rhs: &Power<num_complex::Complex64>) -> Self::Output {
21447 Power{W: self * rhs.W.clone()}
21448 }
21449}
21450#[cfg(feature="num-complex")]
21452impl core::ops::Mul<&Power<num_complex::Complex64>> for &num_complex::Complex64 {
21453 type Output = Power<num_complex::Complex64>;
21454 fn mul(self, rhs: &Power<num_complex::Complex64>) -> Self::Output {
21455 Power{W: self.clone() * rhs.W.clone()}
21456 }
21457}
21458
21459
21460
21461#[cfg(feature = "uom")]
21463impl<T> Into<uom::si::f32::Power> for Power<T> where T: NumLike+Into<f32> {
21464 fn into(self) -> uom::si::f32::Power {
21465 uom::si::f32::Power::new::<uom::si::power::watt>(self.W.into())
21466 }
21467}
21468
21469#[cfg(feature = "uom")]
21471impl<T> From<uom::si::f32::Power> for Power<T> where T: NumLike+From<f32> {
21472 fn from(src: uom::si::f32::Power) -> Self {
21473 Power{W: T::from(src.value)}
21474 }
21475}
21476
21477#[cfg(feature = "uom")]
21479impl<T> Into<uom::si::f64::Power> for Power<T> where T: NumLike+Into<f64> {
21480 fn into(self) -> uom::si::f64::Power {
21481 uom::si::f64::Power::new::<uom::si::power::watt>(self.W.into())
21482 }
21483}
21484
21485#[cfg(feature = "uom")]
21487impl<T> From<uom::si::f64::Power> for Power<T> where T: NumLike+From<f64> {
21488 fn from(src: uom::si::f64::Power) -> Self {
21489 Power{W: T::from(src.value)}
21490 }
21491}
21492
21493
21494impl<T> core::ops::Div<Current<T>> for Power<T> where T: NumLike {
21497 type Output = Voltage<T>;
21498 fn div(self, rhs: Current<T>) -> Self::Output {
21499 Voltage{V: self.W / rhs.A}
21500 }
21501}
21502impl<T> core::ops::Div<Current<T>> for &Power<T> where T: NumLike {
21504 type Output = Voltage<T>;
21505 fn div(self, rhs: Current<T>) -> Self::Output {
21506 Voltage{V: self.W.clone() / rhs.A}
21507 }
21508}
21509impl<T> core::ops::Div<&Current<T>> for Power<T> where T: NumLike {
21511 type Output = Voltage<T>;
21512 fn div(self, rhs: &Current<T>) -> Self::Output {
21513 Voltage{V: self.W / rhs.A.clone()}
21514 }
21515}
21516impl<T> core::ops::Div<&Current<T>> for &Power<T> where T: NumLike {
21518 type Output = Voltage<T>;
21519 fn div(self, rhs: &Current<T>) -> Self::Output {
21520 Voltage{V: self.W.clone() / rhs.A.clone()}
21521 }
21522}
21523
21524impl<T> core::ops::Mul<InverseCurrent<T>> for Power<T> where T: NumLike {
21527 type Output = Voltage<T>;
21528 fn mul(self, rhs: InverseCurrent<T>) -> Self::Output {
21529 Voltage{V: self.W * rhs.per_A}
21530 }
21531}
21532impl<T> core::ops::Mul<InverseCurrent<T>> for &Power<T> where T: NumLike {
21534 type Output = Voltage<T>;
21535 fn mul(self, rhs: InverseCurrent<T>) -> Self::Output {
21536 Voltage{V: self.W.clone() * rhs.per_A}
21537 }
21538}
21539impl<T> core::ops::Mul<&InverseCurrent<T>> for Power<T> where T: NumLike {
21541 type Output = Voltage<T>;
21542 fn mul(self, rhs: &InverseCurrent<T>) -> Self::Output {
21543 Voltage{V: self.W * rhs.per_A.clone()}
21544 }
21545}
21546impl<T> core::ops::Mul<&InverseCurrent<T>> for &Power<T> where T: NumLike {
21548 type Output = Voltage<T>;
21549 fn mul(self, rhs: &InverseCurrent<T>) -> Self::Output {
21550 Voltage{V: self.W.clone() * rhs.per_A.clone()}
21551 }
21552}
21553
21554impl<T> core::ops::Mul<Time<T>> for Power<T> where T: NumLike {
21557 type Output = Energy<T>;
21558 fn mul(self, rhs: Time<T>) -> Self::Output {
21559 Energy{J: self.W * rhs.s}
21560 }
21561}
21562impl<T> core::ops::Mul<Time<T>> for &Power<T> where T: NumLike {
21564 type Output = Energy<T>;
21565 fn mul(self, rhs: Time<T>) -> Self::Output {
21566 Energy{J: self.W.clone() * rhs.s}
21567 }
21568}
21569impl<T> core::ops::Mul<&Time<T>> for Power<T> where T: NumLike {
21571 type Output = Energy<T>;
21572 fn mul(self, rhs: &Time<T>) -> Self::Output {
21573 Energy{J: self.W * rhs.s.clone()}
21574 }
21575}
21576impl<T> core::ops::Mul<&Time<T>> for &Power<T> where T: NumLike {
21578 type Output = Energy<T>;
21579 fn mul(self, rhs: &Time<T>) -> Self::Output {
21580 Energy{J: self.W.clone() * rhs.s.clone()}
21581 }
21582}
21583
21584impl<T> core::ops::Mul<InverseVoltage<T>> for Power<T> where T: NumLike {
21587 type Output = Current<T>;
21588 fn mul(self, rhs: InverseVoltage<T>) -> Self::Output {
21589 Current{A: self.W * rhs.per_V}
21590 }
21591}
21592impl<T> core::ops::Mul<InverseVoltage<T>> for &Power<T> where T: NumLike {
21594 type Output = Current<T>;
21595 fn mul(self, rhs: InverseVoltage<T>) -> Self::Output {
21596 Current{A: self.W.clone() * rhs.per_V}
21597 }
21598}
21599impl<T> core::ops::Mul<&InverseVoltage<T>> for Power<T> where T: NumLike {
21601 type Output = Current<T>;
21602 fn mul(self, rhs: &InverseVoltage<T>) -> Self::Output {
21603 Current{A: self.W * rhs.per_V.clone()}
21604 }
21605}
21606impl<T> core::ops::Mul<&InverseVoltage<T>> for &Power<T> where T: NumLike {
21608 type Output = Current<T>;
21609 fn mul(self, rhs: &InverseVoltage<T>) -> Self::Output {
21610 Current{A: self.W.clone() * rhs.per_V.clone()}
21611 }
21612}
21613
21614impl<T> core::ops::Div<Voltage<T>> for Power<T> where T: NumLike {
21617 type Output = Current<T>;
21618 fn div(self, rhs: Voltage<T>) -> Self::Output {
21619 Current{A: self.W / rhs.V}
21620 }
21621}
21622impl<T> core::ops::Div<Voltage<T>> for &Power<T> where T: NumLike {
21624 type Output = Current<T>;
21625 fn div(self, rhs: Voltage<T>) -> Self::Output {
21626 Current{A: self.W.clone() / rhs.V}
21627 }
21628}
21629impl<T> core::ops::Div<&Voltage<T>> for Power<T> where T: NumLike {
21631 type Output = Current<T>;
21632 fn div(self, rhs: &Voltage<T>) -> Self::Output {
21633 Current{A: self.W / rhs.V.clone()}
21634 }
21635}
21636impl<T> core::ops::Div<&Voltage<T>> for &Power<T> where T: NumLike {
21638 type Output = Current<T>;
21639 fn div(self, rhs: &Voltage<T>) -> Self::Output {
21640 Current{A: self.W.clone() / rhs.V.clone()}
21641 }
21642}
21643
21644impl<T> core::ops::Div<Acceleration<T>> for Power<T> where T: NumLike {
21647 type Output = Momentum<T>;
21648 fn div(self, rhs: Acceleration<T>) -> Self::Output {
21649 Momentum{kgmps: self.W / rhs.mps2}
21650 }
21651}
21652impl<T> core::ops::Div<Acceleration<T>> for &Power<T> where T: NumLike {
21654 type Output = Momentum<T>;
21655 fn div(self, rhs: Acceleration<T>) -> Self::Output {
21656 Momentum{kgmps: self.W.clone() / rhs.mps2}
21657 }
21658}
21659impl<T> core::ops::Div<&Acceleration<T>> for Power<T> where T: NumLike {
21661 type Output = Momentum<T>;
21662 fn div(self, rhs: &Acceleration<T>) -> Self::Output {
21663 Momentum{kgmps: self.W / rhs.mps2.clone()}
21664 }
21665}
21666impl<T> core::ops::Div<&Acceleration<T>> for &Power<T> where T: NumLike {
21668 type Output = Momentum<T>;
21669 fn div(self, rhs: &Acceleration<T>) -> Self::Output {
21670 Momentum{kgmps: self.W.clone() / rhs.mps2.clone()}
21671 }
21672}
21673
21674impl<T> core::ops::Div<Energy<T>> for Power<T> where T: NumLike {
21677 type Output = Frequency<T>;
21678 fn div(self, rhs: Energy<T>) -> Self::Output {
21679 Frequency{Hz: self.W / rhs.J}
21680 }
21681}
21682impl<T> core::ops::Div<Energy<T>> for &Power<T> where T: NumLike {
21684 type Output = Frequency<T>;
21685 fn div(self, rhs: Energy<T>) -> Self::Output {
21686 Frequency{Hz: self.W.clone() / rhs.J}
21687 }
21688}
21689impl<T> core::ops::Div<&Energy<T>> for Power<T> where T: NumLike {
21691 type Output = Frequency<T>;
21692 fn div(self, rhs: &Energy<T>) -> Self::Output {
21693 Frequency{Hz: self.W / rhs.J.clone()}
21694 }
21695}
21696impl<T> core::ops::Div<&Energy<T>> for &Power<T> where T: NumLike {
21698 type Output = Frequency<T>;
21699 fn div(self, rhs: &Energy<T>) -> Self::Output {
21700 Frequency{Hz: self.W.clone() / rhs.J.clone()}
21701 }
21702}
21703
21704impl<T> core::ops::Div<Torque<T>> for Power<T> where T: NumLike {
21707 type Output = Frequency<T>;
21708 fn div(self, rhs: Torque<T>) -> Self::Output {
21709 Frequency{Hz: self.W / rhs.Nm}
21710 }
21711}
21712impl<T> core::ops::Div<Torque<T>> for &Power<T> where T: NumLike {
21714 type Output = Frequency<T>;
21715 fn div(self, rhs: Torque<T>) -> Self::Output {
21716 Frequency{Hz: self.W.clone() / rhs.Nm}
21717 }
21718}
21719impl<T> core::ops::Div<&Torque<T>> for Power<T> where T: NumLike {
21721 type Output = Frequency<T>;
21722 fn div(self, rhs: &Torque<T>) -> Self::Output {
21723 Frequency{Hz: self.W / rhs.Nm.clone()}
21724 }
21725}
21726impl<T> core::ops::Div<&Torque<T>> for &Power<T> where T: NumLike {
21728 type Output = Frequency<T>;
21729 fn div(self, rhs: &Torque<T>) -> Self::Output {
21730 Frequency{Hz: self.W.clone() / rhs.Nm.clone()}
21731 }
21732}
21733
21734impl<T> core::ops::Div<Force<T>> for Power<T> where T: NumLike {
21737 type Output = Velocity<T>;
21738 fn div(self, rhs: Force<T>) -> Self::Output {
21739 Velocity{mps: self.W / rhs.N}
21740 }
21741}
21742impl<T> core::ops::Div<Force<T>> for &Power<T> where T: NumLike {
21744 type Output = Velocity<T>;
21745 fn div(self, rhs: Force<T>) -> Self::Output {
21746 Velocity{mps: self.W.clone() / rhs.N}
21747 }
21748}
21749impl<T> core::ops::Div<&Force<T>> for Power<T> where T: NumLike {
21751 type Output = Velocity<T>;
21752 fn div(self, rhs: &Force<T>) -> Self::Output {
21753 Velocity{mps: self.W / rhs.N.clone()}
21754 }
21755}
21756impl<T> core::ops::Div<&Force<T>> for &Power<T> where T: NumLike {
21758 type Output = Velocity<T>;
21759 fn div(self, rhs: &Force<T>) -> Self::Output {
21760 Velocity{mps: self.W.clone() / rhs.N.clone()}
21761 }
21762}
21763
21764impl<T> core::ops::Div<Frequency<T>> for Power<T> where T: NumLike {
21767 type Output = Energy<T>;
21768 fn div(self, rhs: Frequency<T>) -> Self::Output {
21769 Energy{J: self.W / rhs.Hz}
21770 }
21771}
21772impl<T> core::ops::Div<Frequency<T>> for &Power<T> where T: NumLike {
21774 type Output = Energy<T>;
21775 fn div(self, rhs: Frequency<T>) -> Self::Output {
21776 Energy{J: self.W.clone() / rhs.Hz}
21777 }
21778}
21779impl<T> core::ops::Div<&Frequency<T>> for Power<T> where T: NumLike {
21781 type Output = Energy<T>;
21782 fn div(self, rhs: &Frequency<T>) -> Self::Output {
21783 Energy{J: self.W / rhs.Hz.clone()}
21784 }
21785}
21786impl<T> core::ops::Div<&Frequency<T>> for &Power<T> where T: NumLike {
21788 type Output = Energy<T>;
21789 fn div(self, rhs: &Frequency<T>) -> Self::Output {
21790 Energy{J: self.W.clone() / rhs.Hz.clone()}
21791 }
21792}
21793
21794impl<T> core::ops::Mul<InverseAcceleration<T>> for Power<T> where T: NumLike {
21797 type Output = Momentum<T>;
21798 fn mul(self, rhs: InverseAcceleration<T>) -> Self::Output {
21799 Momentum{kgmps: self.W * rhs.s2pm}
21800 }
21801}
21802impl<T> core::ops::Mul<InverseAcceleration<T>> for &Power<T> where T: NumLike {
21804 type Output = Momentum<T>;
21805 fn mul(self, rhs: InverseAcceleration<T>) -> Self::Output {
21806 Momentum{kgmps: self.W.clone() * rhs.s2pm}
21807 }
21808}
21809impl<T> core::ops::Mul<&InverseAcceleration<T>> for Power<T> where T: NumLike {
21811 type Output = Momentum<T>;
21812 fn mul(self, rhs: &InverseAcceleration<T>) -> Self::Output {
21813 Momentum{kgmps: self.W * rhs.s2pm.clone()}
21814 }
21815}
21816impl<T> core::ops::Mul<&InverseAcceleration<T>> for &Power<T> where T: NumLike {
21818 type Output = Momentum<T>;
21819 fn mul(self, rhs: &InverseAcceleration<T>) -> Self::Output {
21820 Momentum{kgmps: self.W.clone() * rhs.s2pm.clone()}
21821 }
21822}
21823
21824impl<T> core::ops::Mul<InverseEnergy<T>> for Power<T> where T: NumLike {
21827 type Output = Frequency<T>;
21828 fn mul(self, rhs: InverseEnergy<T>) -> Self::Output {
21829 Frequency{Hz: self.W * rhs.per_J}
21830 }
21831}
21832impl<T> core::ops::Mul<InverseEnergy<T>> for &Power<T> where T: NumLike {
21834 type Output = Frequency<T>;
21835 fn mul(self, rhs: InverseEnergy<T>) -> Self::Output {
21836 Frequency{Hz: self.W.clone() * rhs.per_J}
21837 }
21838}
21839impl<T> core::ops::Mul<&InverseEnergy<T>> for Power<T> where T: NumLike {
21841 type Output = Frequency<T>;
21842 fn mul(self, rhs: &InverseEnergy<T>) -> Self::Output {
21843 Frequency{Hz: self.W * rhs.per_J.clone()}
21844 }
21845}
21846impl<T> core::ops::Mul<&InverseEnergy<T>> for &Power<T> where T: NumLike {
21848 type Output = Frequency<T>;
21849 fn mul(self, rhs: &InverseEnergy<T>) -> Self::Output {
21850 Frequency{Hz: self.W.clone() * rhs.per_J.clone()}
21851 }
21852}
21853
21854impl<T> core::ops::Mul<InverseTorque<T>> for Power<T> where T: NumLike {
21857 type Output = Frequency<T>;
21858 fn mul(self, rhs: InverseTorque<T>) -> Self::Output {
21859 Frequency{Hz: self.W * rhs.per_Nm}
21860 }
21861}
21862impl<T> core::ops::Mul<InverseTorque<T>> for &Power<T> where T: NumLike {
21864 type Output = Frequency<T>;
21865 fn mul(self, rhs: InverseTorque<T>) -> Self::Output {
21866 Frequency{Hz: self.W.clone() * rhs.per_Nm}
21867 }
21868}
21869impl<T> core::ops::Mul<&InverseTorque<T>> for Power<T> where T: NumLike {
21871 type Output = Frequency<T>;
21872 fn mul(self, rhs: &InverseTorque<T>) -> Self::Output {
21873 Frequency{Hz: self.W * rhs.per_Nm.clone()}
21874 }
21875}
21876impl<T> core::ops::Mul<&InverseTorque<T>> for &Power<T> where T: NumLike {
21878 type Output = Frequency<T>;
21879 fn mul(self, rhs: &InverseTorque<T>) -> Self::Output {
21880 Frequency{Hz: self.W.clone() * rhs.per_Nm.clone()}
21881 }
21882}
21883
21884impl<T> core::ops::Mul<InverseForce<T>> for Power<T> where T: NumLike {
21887 type Output = Velocity<T>;
21888 fn mul(self, rhs: InverseForce<T>) -> Self::Output {
21889 Velocity{mps: self.W * rhs.per_N}
21890 }
21891}
21892impl<T> core::ops::Mul<InverseForce<T>> for &Power<T> where T: NumLike {
21894 type Output = Velocity<T>;
21895 fn mul(self, rhs: InverseForce<T>) -> Self::Output {
21896 Velocity{mps: self.W.clone() * rhs.per_N}
21897 }
21898}
21899impl<T> core::ops::Mul<&InverseForce<T>> for Power<T> where T: NumLike {
21901 type Output = Velocity<T>;
21902 fn mul(self, rhs: &InverseForce<T>) -> Self::Output {
21903 Velocity{mps: self.W * rhs.per_N.clone()}
21904 }
21905}
21906impl<T> core::ops::Mul<&InverseForce<T>> for &Power<T> where T: NumLike {
21908 type Output = Velocity<T>;
21909 fn mul(self, rhs: &InverseForce<T>) -> Self::Output {
21910 Velocity{mps: self.W.clone() * rhs.per_N.clone()}
21911 }
21912}
21913
21914impl<T> core::ops::Mul<InverseMomentum<T>> for Power<T> where T: NumLike {
21917 type Output = Acceleration<T>;
21918 fn mul(self, rhs: InverseMomentum<T>) -> Self::Output {
21919 Acceleration{mps2: self.W * rhs.s_per_kgm}
21920 }
21921}
21922impl<T> core::ops::Mul<InverseMomentum<T>> for &Power<T> where T: NumLike {
21924 type Output = Acceleration<T>;
21925 fn mul(self, rhs: InverseMomentum<T>) -> Self::Output {
21926 Acceleration{mps2: self.W.clone() * rhs.s_per_kgm}
21927 }
21928}
21929impl<T> core::ops::Mul<&InverseMomentum<T>> for Power<T> where T: NumLike {
21931 type Output = Acceleration<T>;
21932 fn mul(self, rhs: &InverseMomentum<T>) -> Self::Output {
21933 Acceleration{mps2: self.W * rhs.s_per_kgm.clone()}
21934 }
21935}
21936impl<T> core::ops::Mul<&InverseMomentum<T>> for &Power<T> where T: NumLike {
21938 type Output = Acceleration<T>;
21939 fn mul(self, rhs: &InverseMomentum<T>) -> Self::Output {
21940 Acceleration{mps2: self.W.clone() * rhs.s_per_kgm.clone()}
21941 }
21942}
21943
21944impl<T> core::ops::Div<Momentum<T>> for Power<T> where T: NumLike {
21947 type Output = Acceleration<T>;
21948 fn div(self, rhs: Momentum<T>) -> Self::Output {
21949 Acceleration{mps2: self.W / rhs.kgmps}
21950 }
21951}
21952impl<T> core::ops::Div<Momentum<T>> for &Power<T> where T: NumLike {
21954 type Output = Acceleration<T>;
21955 fn div(self, rhs: Momentum<T>) -> Self::Output {
21956 Acceleration{mps2: self.W.clone() / rhs.kgmps}
21957 }
21958}
21959impl<T> core::ops::Div<&Momentum<T>> for Power<T> where T: NumLike {
21961 type Output = Acceleration<T>;
21962 fn div(self, rhs: &Momentum<T>) -> Self::Output {
21963 Acceleration{mps2: self.W / rhs.kgmps.clone()}
21964 }
21965}
21966impl<T> core::ops::Div<&Momentum<T>> for &Power<T> where T: NumLike {
21968 type Output = Acceleration<T>;
21969 fn div(self, rhs: &Momentum<T>) -> Self::Output {
21970 Acceleration{mps2: self.W.clone() / rhs.kgmps.clone()}
21971 }
21972}
21973
21974impl<T> core::ops::Mul<TimePerDistance<T>> for Power<T> where T: NumLike {
21977 type Output = Force<T>;
21978 fn mul(self, rhs: TimePerDistance<T>) -> Self::Output {
21979 Force{N: self.W * rhs.spm}
21980 }
21981}
21982impl<T> core::ops::Mul<TimePerDistance<T>> for &Power<T> where T: NumLike {
21984 type Output = Force<T>;
21985 fn mul(self, rhs: TimePerDistance<T>) -> Self::Output {
21986 Force{N: self.W.clone() * rhs.spm}
21987 }
21988}
21989impl<T> core::ops::Mul<&TimePerDistance<T>> for Power<T> where T: NumLike {
21991 type Output = Force<T>;
21992 fn mul(self, rhs: &TimePerDistance<T>) -> Self::Output {
21993 Force{N: self.W * rhs.spm.clone()}
21994 }
21995}
21996impl<T> core::ops::Mul<&TimePerDistance<T>> for &Power<T> where T: NumLike {
21998 type Output = Force<T>;
21999 fn mul(self, rhs: &TimePerDistance<T>) -> Self::Output {
22000 Force{N: self.W.clone() * rhs.spm.clone()}
22001 }
22002}
22003
22004impl<T> core::ops::Div<Velocity<T>> for Power<T> where T: NumLike {
22007 type Output = Force<T>;
22008 fn div(self, rhs: Velocity<T>) -> Self::Output {
22009 Force{N: self.W / rhs.mps}
22010 }
22011}
22012impl<T> core::ops::Div<Velocity<T>> for &Power<T> where T: NumLike {
22014 type Output = Force<T>;
22015 fn div(self, rhs: Velocity<T>) -> Self::Output {
22016 Force{N: self.W.clone() / rhs.mps}
22017 }
22018}
22019impl<T> core::ops::Div<&Velocity<T>> for Power<T> where T: NumLike {
22021 type Output = Force<T>;
22022 fn div(self, rhs: &Velocity<T>) -> Self::Output {
22023 Force{N: self.W / rhs.mps.clone()}
22024 }
22025}
22026impl<T> core::ops::Div<&Velocity<T>> for &Power<T> where T: NumLike {
22028 type Output = Force<T>;
22029 fn div(self, rhs: &Velocity<T>) -> Self::Output {
22030 Force{N: self.W.clone() / rhs.mps.clone()}
22031 }
22032}
22033
22034impl<T> core::ops::Div<Power<T>> for f64 where T: NumLike+From<f64> {
22037 type Output = InversePower<T>;
22038 fn div(self, rhs: Power<T>) -> Self::Output {
22039 InversePower{per_W: T::from(self) / rhs.W}
22040 }
22041}
22042impl<T> core::ops::Div<Power<T>> for &f64 where T: NumLike+From<f64> {
22044 type Output = InversePower<T>;
22045 fn div(self, rhs: Power<T>) -> Self::Output {
22046 InversePower{per_W: T::from(self.clone()) / rhs.W}
22047 }
22048}
22049impl<T> core::ops::Div<&Power<T>> for f64 where T: NumLike+From<f64> {
22051 type Output = InversePower<T>;
22052 fn div(self, rhs: &Power<T>) -> Self::Output {
22053 InversePower{per_W: T::from(self) / rhs.W.clone()}
22054 }
22055}
22056impl<T> core::ops::Div<&Power<T>> for &f64 where T: NumLike+From<f64> {
22058 type Output = InversePower<T>;
22059 fn div(self, rhs: &Power<T>) -> Self::Output {
22060 InversePower{per_W: T::from(self.clone()) / rhs.W.clone()}
22061 }
22062}
22063
22064impl<T> core::ops::Div<Power<T>> for f32 where T: NumLike+From<f32> {
22067 type Output = InversePower<T>;
22068 fn div(self, rhs: Power<T>) -> Self::Output {
22069 InversePower{per_W: T::from(self) / rhs.W}
22070 }
22071}
22072impl<T> core::ops::Div<Power<T>> for &f32 where T: NumLike+From<f32> {
22074 type Output = InversePower<T>;
22075 fn div(self, rhs: Power<T>) -> Self::Output {
22076 InversePower{per_W: T::from(self.clone()) / rhs.W}
22077 }
22078}
22079impl<T> core::ops::Div<&Power<T>> for f32 where T: NumLike+From<f32> {
22081 type Output = InversePower<T>;
22082 fn div(self, rhs: &Power<T>) -> Self::Output {
22083 InversePower{per_W: T::from(self) / rhs.W.clone()}
22084 }
22085}
22086impl<T> core::ops::Div<&Power<T>> for &f32 where T: NumLike+From<f32> {
22088 type Output = InversePower<T>;
22089 fn div(self, rhs: &Power<T>) -> Self::Output {
22090 InversePower{per_W: T::from(self.clone()) / rhs.W.clone()}
22091 }
22092}
22093
22094impl<T> core::ops::Div<Power<T>> for i64 where T: NumLike+From<i64> {
22097 type Output = InversePower<T>;
22098 fn div(self, rhs: Power<T>) -> Self::Output {
22099 InversePower{per_W: T::from(self) / rhs.W}
22100 }
22101}
22102impl<T> core::ops::Div<Power<T>> for &i64 where T: NumLike+From<i64> {
22104 type Output = InversePower<T>;
22105 fn div(self, rhs: Power<T>) -> Self::Output {
22106 InversePower{per_W: T::from(self.clone()) / rhs.W}
22107 }
22108}
22109impl<T> core::ops::Div<&Power<T>> for i64 where T: NumLike+From<i64> {
22111 type Output = InversePower<T>;
22112 fn div(self, rhs: &Power<T>) -> Self::Output {
22113 InversePower{per_W: T::from(self) / rhs.W.clone()}
22114 }
22115}
22116impl<T> core::ops::Div<&Power<T>> for &i64 where T: NumLike+From<i64> {
22118 type Output = InversePower<T>;
22119 fn div(self, rhs: &Power<T>) -> Self::Output {
22120 InversePower{per_W: T::from(self.clone()) / rhs.W.clone()}
22121 }
22122}
22123
22124impl<T> core::ops::Div<Power<T>> for i32 where T: NumLike+From<i32> {
22127 type Output = InversePower<T>;
22128 fn div(self, rhs: Power<T>) -> Self::Output {
22129 InversePower{per_W: T::from(self) / rhs.W}
22130 }
22131}
22132impl<T> core::ops::Div<Power<T>> for &i32 where T: NumLike+From<i32> {
22134 type Output = InversePower<T>;
22135 fn div(self, rhs: Power<T>) -> Self::Output {
22136 InversePower{per_W: T::from(self.clone()) / rhs.W}
22137 }
22138}
22139impl<T> core::ops::Div<&Power<T>> for i32 where T: NumLike+From<i32> {
22141 type Output = InversePower<T>;
22142 fn div(self, rhs: &Power<T>) -> Self::Output {
22143 InversePower{per_W: T::from(self) / rhs.W.clone()}
22144 }
22145}
22146impl<T> core::ops::Div<&Power<T>> for &i32 where T: NumLike+From<i32> {
22148 type Output = InversePower<T>;
22149 fn div(self, rhs: &Power<T>) -> Self::Output {
22150 InversePower{per_W: T::from(self.clone()) / rhs.W.clone()}
22151 }
22152}
22153
22154#[cfg(feature="num-bigfloat")]
22157impl<T> core::ops::Div<Power<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
22158 type Output = InversePower<T>;
22159 fn div(self, rhs: Power<T>) -> Self::Output {
22160 InversePower{per_W: T::from(self) / rhs.W}
22161 }
22162}
22163#[cfg(feature="num-bigfloat")]
22165impl<T> core::ops::Div<Power<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
22166 type Output = InversePower<T>;
22167 fn div(self, rhs: Power<T>) -> Self::Output {
22168 InversePower{per_W: T::from(self.clone()) / rhs.W}
22169 }
22170}
22171#[cfg(feature="num-bigfloat")]
22173impl<T> core::ops::Div<&Power<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
22174 type Output = InversePower<T>;
22175 fn div(self, rhs: &Power<T>) -> Self::Output {
22176 InversePower{per_W: T::from(self) / rhs.W.clone()}
22177 }
22178}
22179#[cfg(feature="num-bigfloat")]
22181impl<T> core::ops::Div<&Power<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
22182 type Output = InversePower<T>;
22183 fn div(self, rhs: &Power<T>) -> Self::Output {
22184 InversePower{per_W: T::from(self.clone()) / rhs.W.clone()}
22185 }
22186}
22187
22188#[cfg(feature="num-complex")]
22191impl<T> core::ops::Div<Power<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
22192 type Output = InversePower<T>;
22193 fn div(self, rhs: Power<T>) -> Self::Output {
22194 InversePower{per_W: T::from(self) / rhs.W}
22195 }
22196}
22197#[cfg(feature="num-complex")]
22199impl<T> core::ops::Div<Power<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
22200 type Output = InversePower<T>;
22201 fn div(self, rhs: Power<T>) -> Self::Output {
22202 InversePower{per_W: T::from(self.clone()) / rhs.W}
22203 }
22204}
22205#[cfg(feature="num-complex")]
22207impl<T> core::ops::Div<&Power<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
22208 type Output = InversePower<T>;
22209 fn div(self, rhs: &Power<T>) -> Self::Output {
22210 InversePower{per_W: T::from(self) / rhs.W.clone()}
22211 }
22212}
22213#[cfg(feature="num-complex")]
22215impl<T> core::ops::Div<&Power<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
22216 type Output = InversePower<T>;
22217 fn div(self, rhs: &Power<T>) -> Self::Output {
22218 InversePower{per_W: T::from(self.clone()) / rhs.W.clone()}
22219 }
22220}
22221
22222#[cfg(feature="num-complex")]
22225impl<T> core::ops::Div<Power<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
22226 type Output = InversePower<T>;
22227 fn div(self, rhs: Power<T>) -> Self::Output {
22228 InversePower{per_W: T::from(self) / rhs.W}
22229 }
22230}
22231#[cfg(feature="num-complex")]
22233impl<T> core::ops::Div<Power<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
22234 type Output = InversePower<T>;
22235 fn div(self, rhs: Power<T>) -> Self::Output {
22236 InversePower{per_W: T::from(self.clone()) / rhs.W}
22237 }
22238}
22239#[cfg(feature="num-complex")]
22241impl<T> core::ops::Div<&Power<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
22242 type Output = InversePower<T>;
22243 fn div(self, rhs: &Power<T>) -> Self::Output {
22244 InversePower{per_W: T::from(self) / rhs.W.clone()}
22245 }
22246}
22247#[cfg(feature="num-complex")]
22249impl<T> core::ops::Div<&Power<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
22250 type Output = InversePower<T>;
22251 fn div(self, rhs: &Power<T>) -> Self::Output {
22252 InversePower{per_W: T::from(self.clone()) / rhs.W.clone()}
22253 }
22254}
22255
22256#[derive(UnitStruct, Debug, Clone)]
22258#[cfg_attr(feature="serde", derive(Serialize, Deserialize))]
22259pub struct Pressure<T: NumLike>{
22260 pub Pa: T
22262}
22263
22264impl<T> Pressure<T> where T: NumLike {
22265
22266 pub fn unit_name() -> &'static str { "pascals" }
22268
22269 pub fn unit_symbol() -> &'static str { "Pa" }
22271
22272 pub fn from_Pa(Pa: T) -> Self { Pressure{Pa: Pa} }
22277
22278 pub fn to_Pa(&self) -> T { self.Pa.clone() }
22280
22281 pub fn from_pascals(pascals: T) -> Self { Pressure{Pa: pascals} }
22286
22287 pub fn to_pascals(&self) -> T { self.Pa.clone() }
22289
22290}
22291
22292impl<T> fmt::Display for Pressure<T> where T: NumLike {
22293 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
22294 write!(f, "{} {}", &self.Pa, Self::unit_symbol())
22295 }
22296}
22297
22298impl<T> Pressure<T> where T: NumLike+From<f64> {
22299
22300 pub fn to_psi(&self) -> T {
22304 return self.Pa.clone() * T::from(0.00014503773773_f64);
22305 }
22306
22307 pub fn from_psi(psi: T) -> Self {
22314 Pressure{Pa: psi * T::from(6894.7572931783_f64)}
22315 }
22316
22317 pub fn to_mPa(&self) -> T {
22321 return self.Pa.clone() * T::from(1000.0_f64);
22322 }
22323
22324 pub fn from_mPa(mPa: T) -> Self {
22331 Pressure{Pa: mPa * T::from(0.001_f64)}
22332 }
22333
22334 pub fn to_uPa(&self) -> T {
22338 return self.Pa.clone() * T::from(1000000.0_f64);
22339 }
22340
22341 pub fn from_uPa(uPa: T) -> Self {
22348 Pressure{Pa: uPa * T::from(1e-06_f64)}
22349 }
22350
22351 pub fn to_nPa(&self) -> T {
22355 return self.Pa.clone() * T::from(1000000000.0_f64);
22356 }
22357
22358 pub fn from_nPa(nPa: T) -> Self {
22365 Pressure{Pa: nPa * T::from(1e-09_f64)}
22366 }
22367
22368 pub fn to_kPa(&self) -> T {
22372 return self.Pa.clone() * T::from(0.001_f64);
22373 }
22374
22375 pub fn from_kPa(kPa: T) -> Self {
22382 Pressure{Pa: kPa * T::from(1000.0_f64)}
22383 }
22384
22385 pub fn to_MPa(&self) -> T {
22389 return self.Pa.clone() * T::from(1e-06_f64);
22390 }
22391
22392 pub fn from_MPa(MPa: T) -> Self {
22399 Pressure{Pa: MPa * T::from(1000000.0_f64)}
22400 }
22401
22402 pub fn to_GPa(&self) -> T {
22406 return self.Pa.clone() * T::from(1e-09_f64);
22407 }
22408
22409 pub fn from_GPa(GPa: T) -> Self {
22416 Pressure{Pa: GPa * T::from(1000000000.0_f64)}
22417 }
22418
22419 pub fn to_hPa(&self) -> T {
22423 return self.Pa.clone() * T::from(0.01_f64);
22424 }
22425
22426 pub fn from_hPa(hPa: T) -> Self {
22433 Pressure{Pa: hPa * T::from(100.0_f64)}
22434 }
22435
22436 pub fn to_bar(&self) -> T {
22440 return self.Pa.clone() * T::from(1e-05_f64);
22441 }
22442
22443 pub fn from_bar(bar: T) -> Self {
22450 Pressure{Pa: bar * T::from(100000.0_f64)}
22451 }
22452
22453 pub fn to_mbar(&self) -> T {
22457 return self.Pa.clone() * T::from(0.01_f64);
22458 }
22459
22460 pub fn from_mbar(mbar: T) -> Self {
22467 Pressure{Pa: mbar * T::from(100.0_f64)}
22468 }
22469
22470 pub fn to_atm(&self) -> T {
22474 return self.Pa.clone() * T::from(9.86923266716013e-06_f64);
22475 }
22476
22477 pub fn from_atm(atm: T) -> Self {
22484 Pressure{Pa: atm * T::from(101325.0_f64)}
22485 }
22486
22487 pub fn to_torr(&self) -> T {
22491 return self.Pa.clone() * T::from(0.007500616827039_f64);
22492 }
22493
22494 pub fn from_torr(torr: T) -> Self {
22501 Pressure{Pa: torr * T::from(133.3223684211_f64)}
22502 }
22503
22504 pub fn to_mmHg(&self) -> T {
22508 return self.Pa.clone() * T::from(0.007500616827039_f64);
22509 }
22510
22511 pub fn from_mmHg(mmHg: T) -> Self {
22518 Pressure{Pa: mmHg * T::from(133.3223684211_f64)}
22519 }
22520
22521}
22522
22523
22524#[cfg(feature="num-bigfloat")]
22526impl core::ops::Mul<Pressure<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
22527 type Output = Pressure<num_bigfloat::BigFloat>;
22528 fn mul(self, rhs: Pressure<num_bigfloat::BigFloat>) -> Self::Output {
22529 Pressure{Pa: self * rhs.Pa}
22530 }
22531}
22532#[cfg(feature="num-bigfloat")]
22534impl core::ops::Mul<Pressure<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
22535 type Output = Pressure<num_bigfloat::BigFloat>;
22536 fn mul(self, rhs: Pressure<num_bigfloat::BigFloat>) -> Self::Output {
22537 Pressure{Pa: self.clone() * rhs.Pa}
22538 }
22539}
22540#[cfg(feature="num-bigfloat")]
22542impl core::ops::Mul<&Pressure<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
22543 type Output = Pressure<num_bigfloat::BigFloat>;
22544 fn mul(self, rhs: &Pressure<num_bigfloat::BigFloat>) -> Self::Output {
22545 Pressure{Pa: self * rhs.Pa.clone()}
22546 }
22547}
22548#[cfg(feature="num-bigfloat")]
22550impl core::ops::Mul<&Pressure<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
22551 type Output = Pressure<num_bigfloat::BigFloat>;
22552 fn mul(self, rhs: &Pressure<num_bigfloat::BigFloat>) -> Self::Output {
22553 Pressure{Pa: self.clone() * rhs.Pa.clone()}
22554 }
22555}
22556
22557#[cfg(feature="num-complex")]
22559impl core::ops::Mul<Pressure<num_complex::Complex32>> for num_complex::Complex32 {
22560 type Output = Pressure<num_complex::Complex32>;
22561 fn mul(self, rhs: Pressure<num_complex::Complex32>) -> Self::Output {
22562 Pressure{Pa: self * rhs.Pa}
22563 }
22564}
22565#[cfg(feature="num-complex")]
22567impl core::ops::Mul<Pressure<num_complex::Complex32>> for &num_complex::Complex32 {
22568 type Output = Pressure<num_complex::Complex32>;
22569 fn mul(self, rhs: Pressure<num_complex::Complex32>) -> Self::Output {
22570 Pressure{Pa: self.clone() * rhs.Pa}
22571 }
22572}
22573#[cfg(feature="num-complex")]
22575impl core::ops::Mul<&Pressure<num_complex::Complex32>> for num_complex::Complex32 {
22576 type Output = Pressure<num_complex::Complex32>;
22577 fn mul(self, rhs: &Pressure<num_complex::Complex32>) -> Self::Output {
22578 Pressure{Pa: self * rhs.Pa.clone()}
22579 }
22580}
22581#[cfg(feature="num-complex")]
22583impl core::ops::Mul<&Pressure<num_complex::Complex32>> for &num_complex::Complex32 {
22584 type Output = Pressure<num_complex::Complex32>;
22585 fn mul(self, rhs: &Pressure<num_complex::Complex32>) -> Self::Output {
22586 Pressure{Pa: self.clone() * rhs.Pa.clone()}
22587 }
22588}
22589
22590#[cfg(feature="num-complex")]
22592impl core::ops::Mul<Pressure<num_complex::Complex64>> for num_complex::Complex64 {
22593 type Output = Pressure<num_complex::Complex64>;
22594 fn mul(self, rhs: Pressure<num_complex::Complex64>) -> Self::Output {
22595 Pressure{Pa: self * rhs.Pa}
22596 }
22597}
22598#[cfg(feature="num-complex")]
22600impl core::ops::Mul<Pressure<num_complex::Complex64>> for &num_complex::Complex64 {
22601 type Output = Pressure<num_complex::Complex64>;
22602 fn mul(self, rhs: Pressure<num_complex::Complex64>) -> Self::Output {
22603 Pressure{Pa: self.clone() * rhs.Pa}
22604 }
22605}
22606#[cfg(feature="num-complex")]
22608impl core::ops::Mul<&Pressure<num_complex::Complex64>> for num_complex::Complex64 {
22609 type Output = Pressure<num_complex::Complex64>;
22610 fn mul(self, rhs: &Pressure<num_complex::Complex64>) -> Self::Output {
22611 Pressure{Pa: self * rhs.Pa.clone()}
22612 }
22613}
22614#[cfg(feature="num-complex")]
22616impl core::ops::Mul<&Pressure<num_complex::Complex64>> for &num_complex::Complex64 {
22617 type Output = Pressure<num_complex::Complex64>;
22618 fn mul(self, rhs: &Pressure<num_complex::Complex64>) -> Self::Output {
22619 Pressure{Pa: self.clone() * rhs.Pa.clone()}
22620 }
22621}
22622
22623
22624
22625#[cfg(feature = "uom")]
22627impl<T> Into<uom::si::f32::Pressure> for Pressure<T> where T: NumLike+Into<f32> {
22628 fn into(self) -> uom::si::f32::Pressure {
22629 uom::si::f32::Pressure::new::<uom::si::pressure::pascal>(self.Pa.into())
22630 }
22631}
22632
22633#[cfg(feature = "uom")]
22635impl<T> From<uom::si::f32::Pressure> for Pressure<T> where T: NumLike+From<f32> {
22636 fn from(src: uom::si::f32::Pressure) -> Self {
22637 Pressure{Pa: T::from(src.value)}
22638 }
22639}
22640
22641#[cfg(feature = "uom")]
22643impl<T> Into<uom::si::f64::Pressure> for Pressure<T> where T: NumLike+Into<f64> {
22644 fn into(self) -> uom::si::f64::Pressure {
22645 uom::si::f64::Pressure::new::<uom::si::pressure::pascal>(self.Pa.into())
22646 }
22647}
22648
22649#[cfg(feature = "uom")]
22651impl<T> From<uom::si::f64::Pressure> for Pressure<T> where T: NumLike+From<f64> {
22652 fn from(src: uom::si::f64::Pressure) -> Self {
22653 Pressure{Pa: T::from(src.value)}
22654 }
22655}
22656
22657
22658impl<T> core::ops::Mul<Area<T>> for Pressure<T> where T: NumLike {
22661 type Output = Force<T>;
22662 fn mul(self, rhs: Area<T>) -> Self::Output {
22663 Force{N: self.Pa * rhs.m2}
22664 }
22665}
22666impl<T> core::ops::Mul<Area<T>> for &Pressure<T> where T: NumLike {
22668 type Output = Force<T>;
22669 fn mul(self, rhs: Area<T>) -> Self::Output {
22670 Force{N: self.Pa.clone() * rhs.m2}
22671 }
22672}
22673impl<T> core::ops::Mul<&Area<T>> for Pressure<T> where T: NumLike {
22675 type Output = Force<T>;
22676 fn mul(self, rhs: &Area<T>) -> Self::Output {
22677 Force{N: self.Pa * rhs.m2.clone()}
22678 }
22679}
22680impl<T> core::ops::Mul<&Area<T>> for &Pressure<T> where T: NumLike {
22682 type Output = Force<T>;
22683 fn mul(self, rhs: &Area<T>) -> Self::Output {
22684 Force{N: self.Pa.clone() * rhs.m2.clone()}
22685 }
22686}
22687
22688impl<T> core::ops::Div<InverseArea<T>> for Pressure<T> where T: NumLike {
22691 type Output = Force<T>;
22692 fn div(self, rhs: InverseArea<T>) -> Self::Output {
22693 Force{N: self.Pa / rhs.per_m2}
22694 }
22695}
22696impl<T> core::ops::Div<InverseArea<T>> for &Pressure<T> where T: NumLike {
22698 type Output = Force<T>;
22699 fn div(self, rhs: InverseArea<T>) -> Self::Output {
22700 Force{N: self.Pa.clone() / rhs.per_m2}
22701 }
22702}
22703impl<T> core::ops::Div<&InverseArea<T>> for Pressure<T> where T: NumLike {
22705 type Output = Force<T>;
22706 fn div(self, rhs: &InverseArea<T>) -> Self::Output {
22707 Force{N: self.Pa / rhs.per_m2.clone()}
22708 }
22709}
22710impl<T> core::ops::Div<&InverseArea<T>> for &Pressure<T> where T: NumLike {
22712 type Output = Force<T>;
22713 fn div(self, rhs: &InverseArea<T>) -> Self::Output {
22714 Force{N: self.Pa.clone() / rhs.per_m2.clone()}
22715 }
22716}
22717
22718impl<T> core::ops::Div<InverseVolume<T>> for Pressure<T> where T: NumLike {
22721 type Output = Energy<T>;
22722 fn div(self, rhs: InverseVolume<T>) -> Self::Output {
22723 Energy{J: self.Pa / rhs.per_m3}
22724 }
22725}
22726impl<T> core::ops::Div<InverseVolume<T>> for &Pressure<T> where T: NumLike {
22728 type Output = Energy<T>;
22729 fn div(self, rhs: InverseVolume<T>) -> Self::Output {
22730 Energy{J: self.Pa.clone() / rhs.per_m3}
22731 }
22732}
22733impl<T> core::ops::Div<&InverseVolume<T>> for Pressure<T> where T: NumLike {
22735 type Output = Energy<T>;
22736 fn div(self, rhs: &InverseVolume<T>) -> Self::Output {
22737 Energy{J: self.Pa / rhs.per_m3.clone()}
22738 }
22739}
22740impl<T> core::ops::Div<&InverseVolume<T>> for &Pressure<T> where T: NumLike {
22742 type Output = Energy<T>;
22743 fn div(self, rhs: &InverseVolume<T>) -> Self::Output {
22744 Energy{J: self.Pa.clone() / rhs.per_m3.clone()}
22745 }
22746}
22747
22748impl<T> core::ops::Mul<Volume<T>> for Pressure<T> where T: NumLike {
22751 type Output = Energy<T>;
22752 fn mul(self, rhs: Volume<T>) -> Self::Output {
22753 Energy{J: self.Pa * rhs.m3}
22754 }
22755}
22756impl<T> core::ops::Mul<Volume<T>> for &Pressure<T> where T: NumLike {
22758 type Output = Energy<T>;
22759 fn mul(self, rhs: Volume<T>) -> Self::Output {
22760 Energy{J: self.Pa.clone() * rhs.m3}
22761 }
22762}
22763impl<T> core::ops::Mul<&Volume<T>> for Pressure<T> where T: NumLike {
22765 type Output = Energy<T>;
22766 fn mul(self, rhs: &Volume<T>) -> Self::Output {
22767 Energy{J: self.Pa * rhs.m3.clone()}
22768 }
22769}
22770impl<T> core::ops::Mul<&Volume<T>> for &Pressure<T> where T: NumLike {
22772 type Output = Energy<T>;
22773 fn mul(self, rhs: &Volume<T>) -> Self::Output {
22774 Energy{J: self.Pa.clone() * rhs.m3.clone()}
22775 }
22776}
22777
22778impl<T> core::ops::Div<Acceleration<T>> for Pressure<T> where T: NumLike {
22781 type Output = AreaDensity<T>;
22782 fn div(self, rhs: Acceleration<T>) -> Self::Output {
22783 AreaDensity{kgpm2: self.Pa / rhs.mps2}
22784 }
22785}
22786impl<T> core::ops::Div<Acceleration<T>> for &Pressure<T> where T: NumLike {
22788 type Output = AreaDensity<T>;
22789 fn div(self, rhs: Acceleration<T>) -> Self::Output {
22790 AreaDensity{kgpm2: self.Pa.clone() / rhs.mps2}
22791 }
22792}
22793impl<T> core::ops::Div<&Acceleration<T>> for Pressure<T> where T: NumLike {
22795 type Output = AreaDensity<T>;
22796 fn div(self, rhs: &Acceleration<T>) -> Self::Output {
22797 AreaDensity{kgpm2: self.Pa / rhs.mps2.clone()}
22798 }
22799}
22800impl<T> core::ops::Div<&Acceleration<T>> for &Pressure<T> where T: NumLike {
22802 type Output = AreaDensity<T>;
22803 fn div(self, rhs: &Acceleration<T>) -> Self::Output {
22804 AreaDensity{kgpm2: self.Pa.clone() / rhs.mps2.clone()}
22805 }
22806}
22807
22808impl<T> core::ops::Div<AreaDensity<T>> for Pressure<T> where T: NumLike {
22811 type Output = Acceleration<T>;
22812 fn div(self, rhs: AreaDensity<T>) -> Self::Output {
22813 Acceleration{mps2: self.Pa / rhs.kgpm2}
22814 }
22815}
22816impl<T> core::ops::Div<AreaDensity<T>> for &Pressure<T> where T: NumLike {
22818 type Output = Acceleration<T>;
22819 fn div(self, rhs: AreaDensity<T>) -> Self::Output {
22820 Acceleration{mps2: self.Pa.clone() / rhs.kgpm2}
22821 }
22822}
22823impl<T> core::ops::Div<&AreaDensity<T>> for Pressure<T> where T: NumLike {
22825 type Output = Acceleration<T>;
22826 fn div(self, rhs: &AreaDensity<T>) -> Self::Output {
22827 Acceleration{mps2: self.Pa / rhs.kgpm2.clone()}
22828 }
22829}
22830impl<T> core::ops::Div<&AreaDensity<T>> for &Pressure<T> where T: NumLike {
22832 type Output = Acceleration<T>;
22833 fn div(self, rhs: &AreaDensity<T>) -> Self::Output {
22834 Acceleration{mps2: self.Pa.clone() / rhs.kgpm2.clone()}
22835 }
22836}
22837
22838impl<T> core::ops::Mul<AreaPerMass<T>> for Pressure<T> where T: NumLike {
22841 type Output = Acceleration<T>;
22842 fn mul(self, rhs: AreaPerMass<T>) -> Self::Output {
22843 Acceleration{mps2: self.Pa * rhs.m2_per_kg}
22844 }
22845}
22846impl<T> core::ops::Mul<AreaPerMass<T>> for &Pressure<T> where T: NumLike {
22848 type Output = Acceleration<T>;
22849 fn mul(self, rhs: AreaPerMass<T>) -> Self::Output {
22850 Acceleration{mps2: self.Pa.clone() * rhs.m2_per_kg}
22851 }
22852}
22853impl<T> core::ops::Mul<&AreaPerMass<T>> for Pressure<T> where T: NumLike {
22855 type Output = Acceleration<T>;
22856 fn mul(self, rhs: &AreaPerMass<T>) -> Self::Output {
22857 Acceleration{mps2: self.Pa * rhs.m2_per_kg.clone()}
22858 }
22859}
22860impl<T> core::ops::Mul<&AreaPerMass<T>> for &Pressure<T> where T: NumLike {
22862 type Output = Acceleration<T>;
22863 fn mul(self, rhs: &AreaPerMass<T>) -> Self::Output {
22864 Acceleration{mps2: self.Pa.clone() * rhs.m2_per_kg.clone()}
22865 }
22866}
22867
22868impl<T> core::ops::Div<Energy<T>> for Pressure<T> where T: NumLike {
22871 type Output = InverseVolume<T>;
22872 fn div(self, rhs: Energy<T>) -> Self::Output {
22873 InverseVolume{per_m3: self.Pa / rhs.J}
22874 }
22875}
22876impl<T> core::ops::Div<Energy<T>> for &Pressure<T> where T: NumLike {
22878 type Output = InverseVolume<T>;
22879 fn div(self, rhs: Energy<T>) -> Self::Output {
22880 InverseVolume{per_m3: self.Pa.clone() / rhs.J}
22881 }
22882}
22883impl<T> core::ops::Div<&Energy<T>> for Pressure<T> where T: NumLike {
22885 type Output = InverseVolume<T>;
22886 fn div(self, rhs: &Energy<T>) -> Self::Output {
22887 InverseVolume{per_m3: self.Pa / rhs.J.clone()}
22888 }
22889}
22890impl<T> core::ops::Div<&Energy<T>> for &Pressure<T> where T: NumLike {
22892 type Output = InverseVolume<T>;
22893 fn div(self, rhs: &Energy<T>) -> Self::Output {
22894 InverseVolume{per_m3: self.Pa.clone() / rhs.J.clone()}
22895 }
22896}
22897
22898impl<T> core::ops::Div<Torque<T>> for Pressure<T> where T: NumLike {
22901 type Output = InverseVolume<T>;
22902 fn div(self, rhs: Torque<T>) -> Self::Output {
22903 InverseVolume{per_m3: self.Pa / rhs.Nm}
22904 }
22905}
22906impl<T> core::ops::Div<Torque<T>> for &Pressure<T> where T: NumLike {
22908 type Output = InverseVolume<T>;
22909 fn div(self, rhs: Torque<T>) -> Self::Output {
22910 InverseVolume{per_m3: self.Pa.clone() / rhs.Nm}
22911 }
22912}
22913impl<T> core::ops::Div<&Torque<T>> for Pressure<T> where T: NumLike {
22915 type Output = InverseVolume<T>;
22916 fn div(self, rhs: &Torque<T>) -> Self::Output {
22917 InverseVolume{per_m3: self.Pa / rhs.Nm.clone()}
22918 }
22919}
22920impl<T> core::ops::Div<&Torque<T>> for &Pressure<T> where T: NumLike {
22922 type Output = InverseVolume<T>;
22923 fn div(self, rhs: &Torque<T>) -> Self::Output {
22924 InverseVolume{per_m3: self.Pa.clone() / rhs.Nm.clone()}
22925 }
22926}
22927
22928impl<T> core::ops::Div<Force<T>> for Pressure<T> where T: NumLike {
22931 type Output = InverseArea<T>;
22932 fn div(self, rhs: Force<T>) -> Self::Output {
22933 InverseArea{per_m2: self.Pa / rhs.N}
22934 }
22935}
22936impl<T> core::ops::Div<Force<T>> for &Pressure<T> where T: NumLike {
22938 type Output = InverseArea<T>;
22939 fn div(self, rhs: Force<T>) -> Self::Output {
22940 InverseArea{per_m2: self.Pa.clone() / rhs.N}
22941 }
22942}
22943impl<T> core::ops::Div<&Force<T>> for Pressure<T> where T: NumLike {
22945 type Output = InverseArea<T>;
22946 fn div(self, rhs: &Force<T>) -> Self::Output {
22947 InverseArea{per_m2: self.Pa / rhs.N.clone()}
22948 }
22949}
22950impl<T> core::ops::Div<&Force<T>> for &Pressure<T> where T: NumLike {
22952 type Output = InverseArea<T>;
22953 fn div(self, rhs: &Force<T>) -> Self::Output {
22954 InverseArea{per_m2: self.Pa.clone() / rhs.N.clone()}
22955 }
22956}
22957
22958impl<T> core::ops::Mul<InverseAcceleration<T>> for Pressure<T> where T: NumLike {
22961 type Output = AreaDensity<T>;
22962 fn mul(self, rhs: InverseAcceleration<T>) -> Self::Output {
22963 AreaDensity{kgpm2: self.Pa * rhs.s2pm}
22964 }
22965}
22966impl<T> core::ops::Mul<InverseAcceleration<T>> for &Pressure<T> where T: NumLike {
22968 type Output = AreaDensity<T>;
22969 fn mul(self, rhs: InverseAcceleration<T>) -> Self::Output {
22970 AreaDensity{kgpm2: self.Pa.clone() * rhs.s2pm}
22971 }
22972}
22973impl<T> core::ops::Mul<&InverseAcceleration<T>> for Pressure<T> where T: NumLike {
22975 type Output = AreaDensity<T>;
22976 fn mul(self, rhs: &InverseAcceleration<T>) -> Self::Output {
22977 AreaDensity{kgpm2: self.Pa * rhs.s2pm.clone()}
22978 }
22979}
22980impl<T> core::ops::Mul<&InverseAcceleration<T>> for &Pressure<T> where T: NumLike {
22982 type Output = AreaDensity<T>;
22983 fn mul(self, rhs: &InverseAcceleration<T>) -> Self::Output {
22984 AreaDensity{kgpm2: self.Pa.clone() * rhs.s2pm.clone()}
22985 }
22986}
22987
22988impl<T> core::ops::Mul<InverseEnergy<T>> for Pressure<T> where T: NumLike {
22991 type Output = InverseVolume<T>;
22992 fn mul(self, rhs: InverseEnergy<T>) -> Self::Output {
22993 InverseVolume{per_m3: self.Pa * rhs.per_J}
22994 }
22995}
22996impl<T> core::ops::Mul<InverseEnergy<T>> for &Pressure<T> where T: NumLike {
22998 type Output = InverseVolume<T>;
22999 fn mul(self, rhs: InverseEnergy<T>) -> Self::Output {
23000 InverseVolume{per_m3: self.Pa.clone() * rhs.per_J}
23001 }
23002}
23003impl<T> core::ops::Mul<&InverseEnergy<T>> for Pressure<T> where T: NumLike {
23005 type Output = InverseVolume<T>;
23006 fn mul(self, rhs: &InverseEnergy<T>) -> Self::Output {
23007 InverseVolume{per_m3: self.Pa * rhs.per_J.clone()}
23008 }
23009}
23010impl<T> core::ops::Mul<&InverseEnergy<T>> for &Pressure<T> where T: NumLike {
23012 type Output = InverseVolume<T>;
23013 fn mul(self, rhs: &InverseEnergy<T>) -> Self::Output {
23014 InverseVolume{per_m3: self.Pa.clone() * rhs.per_J.clone()}
23015 }
23016}
23017
23018impl<T> core::ops::Mul<InverseTorque<T>> for Pressure<T> where T: NumLike {
23021 type Output = InverseVolume<T>;
23022 fn mul(self, rhs: InverseTorque<T>) -> Self::Output {
23023 InverseVolume{per_m3: self.Pa * rhs.per_Nm}
23024 }
23025}
23026impl<T> core::ops::Mul<InverseTorque<T>> for &Pressure<T> where T: NumLike {
23028 type Output = InverseVolume<T>;
23029 fn mul(self, rhs: InverseTorque<T>) -> Self::Output {
23030 InverseVolume{per_m3: self.Pa.clone() * rhs.per_Nm}
23031 }
23032}
23033impl<T> core::ops::Mul<&InverseTorque<T>> for Pressure<T> where T: NumLike {
23035 type Output = InverseVolume<T>;
23036 fn mul(self, rhs: &InverseTorque<T>) -> Self::Output {
23037 InverseVolume{per_m3: self.Pa * rhs.per_Nm.clone()}
23038 }
23039}
23040impl<T> core::ops::Mul<&InverseTorque<T>> for &Pressure<T> where T: NumLike {
23042 type Output = InverseVolume<T>;
23043 fn mul(self, rhs: &InverseTorque<T>) -> Self::Output {
23044 InverseVolume{per_m3: self.Pa.clone() * rhs.per_Nm.clone()}
23045 }
23046}
23047
23048impl<T> core::ops::Mul<InverseForce<T>> for Pressure<T> where T: NumLike {
23051 type Output = InverseArea<T>;
23052 fn mul(self, rhs: InverseForce<T>) -> Self::Output {
23053 InverseArea{per_m2: self.Pa * rhs.per_N}
23054 }
23055}
23056impl<T> core::ops::Mul<InverseForce<T>> for &Pressure<T> where T: NumLike {
23058 type Output = InverseArea<T>;
23059 fn mul(self, rhs: InverseForce<T>) -> Self::Output {
23060 InverseArea{per_m2: self.Pa.clone() * rhs.per_N}
23061 }
23062}
23063impl<T> core::ops::Mul<&InverseForce<T>> for Pressure<T> where T: NumLike {
23065 type Output = InverseArea<T>;
23066 fn mul(self, rhs: &InverseForce<T>) -> Self::Output {
23067 InverseArea{per_m2: self.Pa * rhs.per_N.clone()}
23068 }
23069}
23070impl<T> core::ops::Mul<&InverseForce<T>> for &Pressure<T> where T: NumLike {
23072 type Output = InverseArea<T>;
23073 fn mul(self, rhs: &InverseForce<T>) -> Self::Output {
23074 InverseArea{per_m2: self.Pa.clone() * rhs.per_N.clone()}
23075 }
23076}
23077
23078impl<T> core::ops::Mul<InverseAbsorbedDose<T>> for Pressure<T> where T: NumLike {
23081 type Output = Density<T>;
23082 fn mul(self, rhs: InverseAbsorbedDose<T>) -> Self::Output {
23083 Density{kgpm3: self.Pa * rhs.per_Gy}
23084 }
23085}
23086impl<T> core::ops::Mul<InverseAbsorbedDose<T>> for &Pressure<T> where T: NumLike {
23088 type Output = Density<T>;
23089 fn mul(self, rhs: InverseAbsorbedDose<T>) -> Self::Output {
23090 Density{kgpm3: self.Pa.clone() * rhs.per_Gy}
23091 }
23092}
23093impl<T> core::ops::Mul<&InverseAbsorbedDose<T>> for Pressure<T> where T: NumLike {
23095 type Output = Density<T>;
23096 fn mul(self, rhs: &InverseAbsorbedDose<T>) -> Self::Output {
23097 Density{kgpm3: self.Pa * rhs.per_Gy.clone()}
23098 }
23099}
23100impl<T> core::ops::Mul<&InverseAbsorbedDose<T>> for &Pressure<T> where T: NumLike {
23102 type Output = Density<T>;
23103 fn mul(self, rhs: &InverseAbsorbedDose<T>) -> Self::Output {
23104 Density{kgpm3: self.Pa.clone() * rhs.per_Gy.clone()}
23105 }
23106}
23107
23108impl<T> core::ops::Mul<InverseDoseEquivalent<T>> for Pressure<T> where T: NumLike {
23111 type Output = Density<T>;
23112 fn mul(self, rhs: InverseDoseEquivalent<T>) -> Self::Output {
23113 Density{kgpm3: self.Pa * rhs.per_Sv}
23114 }
23115}
23116impl<T> core::ops::Mul<InverseDoseEquivalent<T>> for &Pressure<T> where T: NumLike {
23118 type Output = Density<T>;
23119 fn mul(self, rhs: InverseDoseEquivalent<T>) -> Self::Output {
23120 Density{kgpm3: self.Pa.clone() * rhs.per_Sv}
23121 }
23122}
23123impl<T> core::ops::Mul<&InverseDoseEquivalent<T>> for Pressure<T> where T: NumLike {
23125 type Output = Density<T>;
23126 fn mul(self, rhs: &InverseDoseEquivalent<T>) -> Self::Output {
23127 Density{kgpm3: self.Pa * rhs.per_Sv.clone()}
23128 }
23129}
23130impl<T> core::ops::Mul<&InverseDoseEquivalent<T>> for &Pressure<T> where T: NumLike {
23132 type Output = Density<T>;
23133 fn mul(self, rhs: &InverseDoseEquivalent<T>) -> Self::Output {
23134 Density{kgpm3: self.Pa.clone() * rhs.per_Sv.clone()}
23135 }
23136}
23137
23138impl<T> core::ops::Div<Pressure<T>> for f64 where T: NumLike+From<f64> {
23141 type Output = InversePressure<T>;
23142 fn div(self, rhs: Pressure<T>) -> Self::Output {
23143 InversePressure{per_Pa: T::from(self) / rhs.Pa}
23144 }
23145}
23146impl<T> core::ops::Div<Pressure<T>> for &f64 where T: NumLike+From<f64> {
23148 type Output = InversePressure<T>;
23149 fn div(self, rhs: Pressure<T>) -> Self::Output {
23150 InversePressure{per_Pa: T::from(self.clone()) / rhs.Pa}
23151 }
23152}
23153impl<T> core::ops::Div<&Pressure<T>> for f64 where T: NumLike+From<f64> {
23155 type Output = InversePressure<T>;
23156 fn div(self, rhs: &Pressure<T>) -> Self::Output {
23157 InversePressure{per_Pa: T::from(self) / rhs.Pa.clone()}
23158 }
23159}
23160impl<T> core::ops::Div<&Pressure<T>> for &f64 where T: NumLike+From<f64> {
23162 type Output = InversePressure<T>;
23163 fn div(self, rhs: &Pressure<T>) -> Self::Output {
23164 InversePressure{per_Pa: T::from(self.clone()) / rhs.Pa.clone()}
23165 }
23166}
23167
23168impl<T> core::ops::Div<Pressure<T>> for f32 where T: NumLike+From<f32> {
23171 type Output = InversePressure<T>;
23172 fn div(self, rhs: Pressure<T>) -> Self::Output {
23173 InversePressure{per_Pa: T::from(self) / rhs.Pa}
23174 }
23175}
23176impl<T> core::ops::Div<Pressure<T>> for &f32 where T: NumLike+From<f32> {
23178 type Output = InversePressure<T>;
23179 fn div(self, rhs: Pressure<T>) -> Self::Output {
23180 InversePressure{per_Pa: T::from(self.clone()) / rhs.Pa}
23181 }
23182}
23183impl<T> core::ops::Div<&Pressure<T>> for f32 where T: NumLike+From<f32> {
23185 type Output = InversePressure<T>;
23186 fn div(self, rhs: &Pressure<T>) -> Self::Output {
23187 InversePressure{per_Pa: T::from(self) / rhs.Pa.clone()}
23188 }
23189}
23190impl<T> core::ops::Div<&Pressure<T>> for &f32 where T: NumLike+From<f32> {
23192 type Output = InversePressure<T>;
23193 fn div(self, rhs: &Pressure<T>) -> Self::Output {
23194 InversePressure{per_Pa: T::from(self.clone()) / rhs.Pa.clone()}
23195 }
23196}
23197
23198impl<T> core::ops::Div<Pressure<T>> for i64 where T: NumLike+From<i64> {
23201 type Output = InversePressure<T>;
23202 fn div(self, rhs: Pressure<T>) -> Self::Output {
23203 InversePressure{per_Pa: T::from(self) / rhs.Pa}
23204 }
23205}
23206impl<T> core::ops::Div<Pressure<T>> for &i64 where T: NumLike+From<i64> {
23208 type Output = InversePressure<T>;
23209 fn div(self, rhs: Pressure<T>) -> Self::Output {
23210 InversePressure{per_Pa: T::from(self.clone()) / rhs.Pa}
23211 }
23212}
23213impl<T> core::ops::Div<&Pressure<T>> for i64 where T: NumLike+From<i64> {
23215 type Output = InversePressure<T>;
23216 fn div(self, rhs: &Pressure<T>) -> Self::Output {
23217 InversePressure{per_Pa: T::from(self) / rhs.Pa.clone()}
23218 }
23219}
23220impl<T> core::ops::Div<&Pressure<T>> for &i64 where T: NumLike+From<i64> {
23222 type Output = InversePressure<T>;
23223 fn div(self, rhs: &Pressure<T>) -> Self::Output {
23224 InversePressure{per_Pa: T::from(self.clone()) / rhs.Pa.clone()}
23225 }
23226}
23227
23228impl<T> core::ops::Div<Pressure<T>> for i32 where T: NumLike+From<i32> {
23231 type Output = InversePressure<T>;
23232 fn div(self, rhs: Pressure<T>) -> Self::Output {
23233 InversePressure{per_Pa: T::from(self) / rhs.Pa}
23234 }
23235}
23236impl<T> core::ops::Div<Pressure<T>> for &i32 where T: NumLike+From<i32> {
23238 type Output = InversePressure<T>;
23239 fn div(self, rhs: Pressure<T>) -> Self::Output {
23240 InversePressure{per_Pa: T::from(self.clone()) / rhs.Pa}
23241 }
23242}
23243impl<T> core::ops::Div<&Pressure<T>> for i32 where T: NumLike+From<i32> {
23245 type Output = InversePressure<T>;
23246 fn div(self, rhs: &Pressure<T>) -> Self::Output {
23247 InversePressure{per_Pa: T::from(self) / rhs.Pa.clone()}
23248 }
23249}
23250impl<T> core::ops::Div<&Pressure<T>> for &i32 where T: NumLike+From<i32> {
23252 type Output = InversePressure<T>;
23253 fn div(self, rhs: &Pressure<T>) -> Self::Output {
23254 InversePressure{per_Pa: T::from(self.clone()) / rhs.Pa.clone()}
23255 }
23256}
23257
23258#[cfg(feature="num-bigfloat")]
23261impl<T> core::ops::Div<Pressure<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
23262 type Output = InversePressure<T>;
23263 fn div(self, rhs: Pressure<T>) -> Self::Output {
23264 InversePressure{per_Pa: T::from(self) / rhs.Pa}
23265 }
23266}
23267#[cfg(feature="num-bigfloat")]
23269impl<T> core::ops::Div<Pressure<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
23270 type Output = InversePressure<T>;
23271 fn div(self, rhs: Pressure<T>) -> Self::Output {
23272 InversePressure{per_Pa: T::from(self.clone()) / rhs.Pa}
23273 }
23274}
23275#[cfg(feature="num-bigfloat")]
23277impl<T> core::ops::Div<&Pressure<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
23278 type Output = InversePressure<T>;
23279 fn div(self, rhs: &Pressure<T>) -> Self::Output {
23280 InversePressure{per_Pa: T::from(self) / rhs.Pa.clone()}
23281 }
23282}
23283#[cfg(feature="num-bigfloat")]
23285impl<T> core::ops::Div<&Pressure<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
23286 type Output = InversePressure<T>;
23287 fn div(self, rhs: &Pressure<T>) -> Self::Output {
23288 InversePressure{per_Pa: T::from(self.clone()) / rhs.Pa.clone()}
23289 }
23290}
23291
23292#[cfg(feature="num-complex")]
23295impl<T> core::ops::Div<Pressure<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
23296 type Output = InversePressure<T>;
23297 fn div(self, rhs: Pressure<T>) -> Self::Output {
23298 InversePressure{per_Pa: T::from(self) / rhs.Pa}
23299 }
23300}
23301#[cfg(feature="num-complex")]
23303impl<T> core::ops::Div<Pressure<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
23304 type Output = InversePressure<T>;
23305 fn div(self, rhs: Pressure<T>) -> Self::Output {
23306 InversePressure{per_Pa: T::from(self.clone()) / rhs.Pa}
23307 }
23308}
23309#[cfg(feature="num-complex")]
23311impl<T> core::ops::Div<&Pressure<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
23312 type Output = InversePressure<T>;
23313 fn div(self, rhs: &Pressure<T>) -> Self::Output {
23314 InversePressure{per_Pa: T::from(self) / rhs.Pa.clone()}
23315 }
23316}
23317#[cfg(feature="num-complex")]
23319impl<T> core::ops::Div<&Pressure<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
23320 type Output = InversePressure<T>;
23321 fn div(self, rhs: &Pressure<T>) -> Self::Output {
23322 InversePressure{per_Pa: T::from(self.clone()) / rhs.Pa.clone()}
23323 }
23324}
23325
23326#[cfg(feature="num-complex")]
23329impl<T> core::ops::Div<Pressure<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
23330 type Output = InversePressure<T>;
23331 fn div(self, rhs: Pressure<T>) -> Self::Output {
23332 InversePressure{per_Pa: T::from(self) / rhs.Pa}
23333 }
23334}
23335#[cfg(feature="num-complex")]
23337impl<T> core::ops::Div<Pressure<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
23338 type Output = InversePressure<T>;
23339 fn div(self, rhs: Pressure<T>) -> Self::Output {
23340 InversePressure{per_Pa: T::from(self.clone()) / rhs.Pa}
23341 }
23342}
23343#[cfg(feature="num-complex")]
23345impl<T> core::ops::Div<&Pressure<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
23346 type Output = InversePressure<T>;
23347 fn div(self, rhs: &Pressure<T>) -> Self::Output {
23348 InversePressure{per_Pa: T::from(self) / rhs.Pa.clone()}
23349 }
23350}
23351#[cfg(feature="num-complex")]
23353impl<T> core::ops::Div<&Pressure<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
23354 type Output = InversePressure<T>;
23355 fn div(self, rhs: &Pressure<T>) -> Self::Output {
23356 InversePressure{per_Pa: T::from(self.clone()) / rhs.Pa.clone()}
23357 }
23358}
23359
23360#[derive(UnitStruct, Debug, Clone)]
23362#[cfg_attr(feature="serde", derive(Serialize, Deserialize))]
23363pub struct TimePerDistance<T: NumLike>{
23364 pub spm: T
23366}
23367
23368impl<T> TimePerDistance<T> where T: NumLike {
23369
23370 pub fn unit_name() -> &'static str { "seconds per meter" }
23372
23373 pub fn unit_symbol() -> &'static str { "s/m" }
23375
23376 pub fn from_spm(spm: T) -> Self { TimePerDistance{spm: spm} }
23381
23382 pub fn to_spm(&self) -> T { self.spm.clone() }
23384
23385 pub fn from_seconds_per_meter(seconds_per_meter: T) -> Self { TimePerDistance{spm: seconds_per_meter} }
23390
23391 pub fn to_seconds_per_meter(&self) -> T { self.spm.clone() }
23393
23394}
23395
23396impl<T> fmt::Display for TimePerDistance<T> where T: NumLike {
23397 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
23398 write!(f, "{} {}", &self.spm, Self::unit_symbol())
23399 }
23400}
23401
23402impl<T> TimePerDistance<T> where T: NumLike+From<f64> {
23403
23404 pub fn to_s_per_cm(&self) -> T {
23408 return self.spm.clone() * T::from(0.01_f64);
23409 }
23410
23411 pub fn from_s_per_cm(s_per_cm: T) -> Self {
23418 TimePerDistance{spm: s_per_cm * T::from(100.0_f64)}
23419 }
23420
23421 pub fn to_s_per_mm(&self) -> T {
23425 return self.spm.clone() * T::from(0.001_f64);
23426 }
23427
23428 pub fn from_s_per_mm(s_per_mm: T) -> Self {
23435 TimePerDistance{spm: s_per_mm * T::from(1000.0_f64)}
23436 }
23437
23438 pub fn to_hr_per_km(&self) -> T {
23442 return self.spm.clone() * T::from(0.277777777777778_f64);
23443 }
23444
23445 pub fn from_hr_per_km(hr_per_km: T) -> Self {
23452 TimePerDistance{spm: hr_per_km * T::from(3.6_f64)}
23453 }
23454
23455 pub fn to_hr_per_mi(&self) -> T {
23459 return self.spm.clone() * T::from(0.44704_f64);
23460 }
23461
23462 pub fn from_hr_per_mi(hr_per_mi: T) -> Self {
23469 TimePerDistance{spm: hr_per_mi * T::from(2.2369362920544_f64)}
23470 }
23471
23472}
23473
23474
23475#[cfg(feature="num-bigfloat")]
23477impl core::ops::Mul<TimePerDistance<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
23478 type Output = TimePerDistance<num_bigfloat::BigFloat>;
23479 fn mul(self, rhs: TimePerDistance<num_bigfloat::BigFloat>) -> Self::Output {
23480 TimePerDistance{spm: self * rhs.spm}
23481 }
23482}
23483#[cfg(feature="num-bigfloat")]
23485impl core::ops::Mul<TimePerDistance<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
23486 type Output = TimePerDistance<num_bigfloat::BigFloat>;
23487 fn mul(self, rhs: TimePerDistance<num_bigfloat::BigFloat>) -> Self::Output {
23488 TimePerDistance{spm: self.clone() * rhs.spm}
23489 }
23490}
23491#[cfg(feature="num-bigfloat")]
23493impl core::ops::Mul<&TimePerDistance<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
23494 type Output = TimePerDistance<num_bigfloat::BigFloat>;
23495 fn mul(self, rhs: &TimePerDistance<num_bigfloat::BigFloat>) -> Self::Output {
23496 TimePerDistance{spm: self * rhs.spm.clone()}
23497 }
23498}
23499#[cfg(feature="num-bigfloat")]
23501impl core::ops::Mul<&TimePerDistance<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
23502 type Output = TimePerDistance<num_bigfloat::BigFloat>;
23503 fn mul(self, rhs: &TimePerDistance<num_bigfloat::BigFloat>) -> Self::Output {
23504 TimePerDistance{spm: self.clone() * rhs.spm.clone()}
23505 }
23506}
23507
23508#[cfg(feature="num-complex")]
23510impl core::ops::Mul<TimePerDistance<num_complex::Complex32>> for num_complex::Complex32 {
23511 type Output = TimePerDistance<num_complex::Complex32>;
23512 fn mul(self, rhs: TimePerDistance<num_complex::Complex32>) -> Self::Output {
23513 TimePerDistance{spm: self * rhs.spm}
23514 }
23515}
23516#[cfg(feature="num-complex")]
23518impl core::ops::Mul<TimePerDistance<num_complex::Complex32>> for &num_complex::Complex32 {
23519 type Output = TimePerDistance<num_complex::Complex32>;
23520 fn mul(self, rhs: TimePerDistance<num_complex::Complex32>) -> Self::Output {
23521 TimePerDistance{spm: self.clone() * rhs.spm}
23522 }
23523}
23524#[cfg(feature="num-complex")]
23526impl core::ops::Mul<&TimePerDistance<num_complex::Complex32>> for num_complex::Complex32 {
23527 type Output = TimePerDistance<num_complex::Complex32>;
23528 fn mul(self, rhs: &TimePerDistance<num_complex::Complex32>) -> Self::Output {
23529 TimePerDistance{spm: self * rhs.spm.clone()}
23530 }
23531}
23532#[cfg(feature="num-complex")]
23534impl core::ops::Mul<&TimePerDistance<num_complex::Complex32>> for &num_complex::Complex32 {
23535 type Output = TimePerDistance<num_complex::Complex32>;
23536 fn mul(self, rhs: &TimePerDistance<num_complex::Complex32>) -> Self::Output {
23537 TimePerDistance{spm: self.clone() * rhs.spm.clone()}
23538 }
23539}
23540
23541#[cfg(feature="num-complex")]
23543impl core::ops::Mul<TimePerDistance<num_complex::Complex64>> for num_complex::Complex64 {
23544 type Output = TimePerDistance<num_complex::Complex64>;
23545 fn mul(self, rhs: TimePerDistance<num_complex::Complex64>) -> Self::Output {
23546 TimePerDistance{spm: self * rhs.spm}
23547 }
23548}
23549#[cfg(feature="num-complex")]
23551impl core::ops::Mul<TimePerDistance<num_complex::Complex64>> for &num_complex::Complex64 {
23552 type Output = TimePerDistance<num_complex::Complex64>;
23553 fn mul(self, rhs: TimePerDistance<num_complex::Complex64>) -> Self::Output {
23554 TimePerDistance{spm: self.clone() * rhs.spm}
23555 }
23556}
23557#[cfg(feature="num-complex")]
23559impl core::ops::Mul<&TimePerDistance<num_complex::Complex64>> for num_complex::Complex64 {
23560 type Output = TimePerDistance<num_complex::Complex64>;
23561 fn mul(self, rhs: &TimePerDistance<num_complex::Complex64>) -> Self::Output {
23562 TimePerDistance{spm: self * rhs.spm.clone()}
23563 }
23564}
23565#[cfg(feature="num-complex")]
23567impl core::ops::Mul<&TimePerDistance<num_complex::Complex64>> for &num_complex::Complex64 {
23568 type Output = TimePerDistance<num_complex::Complex64>;
23569 fn mul(self, rhs: &TimePerDistance<num_complex::Complex64>) -> Self::Output {
23570 TimePerDistance{spm: self.clone() * rhs.spm.clone()}
23571 }
23572}
23573
23574
23575
23576
23577impl<T> core::ops::Mul<Distance<T>> for TimePerDistance<T> where T: NumLike {
23580 type Output = Time<T>;
23581 fn mul(self, rhs: Distance<T>) -> Self::Output {
23582 Time{s: self.spm * rhs.m}
23583 }
23584}
23585impl<T> core::ops::Mul<Distance<T>> for &TimePerDistance<T> where T: NumLike {
23587 type Output = Time<T>;
23588 fn mul(self, rhs: Distance<T>) -> Self::Output {
23589 Time{s: self.spm.clone() * rhs.m}
23590 }
23591}
23592impl<T> core::ops::Mul<&Distance<T>> for TimePerDistance<T> where T: NumLike {
23594 type Output = Time<T>;
23595 fn mul(self, rhs: &Distance<T>) -> Self::Output {
23596 Time{s: self.spm * rhs.m.clone()}
23597 }
23598}
23599impl<T> core::ops::Mul<&Distance<T>> for &TimePerDistance<T> where T: NumLike {
23601 type Output = Time<T>;
23602 fn mul(self, rhs: &Distance<T>) -> Self::Output {
23603 Time{s: self.spm.clone() * rhs.m.clone()}
23604 }
23605}
23606
23607impl<T> core::ops::Div<InverseDistance<T>> for TimePerDistance<T> where T: NumLike {
23610 type Output = Time<T>;
23611 fn div(self, rhs: InverseDistance<T>) -> Self::Output {
23612 Time{s: self.spm / rhs.per_m}
23613 }
23614}
23615impl<T> core::ops::Div<InverseDistance<T>> for &TimePerDistance<T> where T: NumLike {
23617 type Output = Time<T>;
23618 fn div(self, rhs: InverseDistance<T>) -> Self::Output {
23619 Time{s: self.spm.clone() / rhs.per_m}
23620 }
23621}
23622impl<T> core::ops::Div<&InverseDistance<T>> for TimePerDistance<T> where T: NumLike {
23624 type Output = Time<T>;
23625 fn div(self, rhs: &InverseDistance<T>) -> Self::Output {
23626 Time{s: self.spm / rhs.per_m.clone()}
23627 }
23628}
23629impl<T> core::ops::Div<&InverseDistance<T>> for &TimePerDistance<T> where T: NumLike {
23631 type Output = Time<T>;
23632 fn div(self, rhs: &InverseDistance<T>) -> Self::Output {
23633 Time{s: self.spm.clone() / rhs.per_m.clone()}
23634 }
23635}
23636
23637impl<T> core::ops::Mul<InverseMass<T>> for TimePerDistance<T> where T: NumLike {
23640 type Output = InverseMomentum<T>;
23641 fn mul(self, rhs: InverseMass<T>) -> Self::Output {
23642 InverseMomentum{s_per_kgm: self.spm * rhs.per_kg}
23643 }
23644}
23645impl<T> core::ops::Mul<InverseMass<T>> for &TimePerDistance<T> where T: NumLike {
23647 type Output = InverseMomentum<T>;
23648 fn mul(self, rhs: InverseMass<T>) -> Self::Output {
23649 InverseMomentum{s_per_kgm: self.spm.clone() * rhs.per_kg}
23650 }
23651}
23652impl<T> core::ops::Mul<&InverseMass<T>> for TimePerDistance<T> where T: NumLike {
23654 type Output = InverseMomentum<T>;
23655 fn mul(self, rhs: &InverseMass<T>) -> Self::Output {
23656 InverseMomentum{s_per_kgm: self.spm * rhs.per_kg.clone()}
23657 }
23658}
23659impl<T> core::ops::Mul<&InverseMass<T>> for &TimePerDistance<T> where T: NumLike {
23661 type Output = InverseMomentum<T>;
23662 fn mul(self, rhs: &InverseMass<T>) -> Self::Output {
23663 InverseMomentum{s_per_kgm: self.spm.clone() * rhs.per_kg.clone()}
23664 }
23665}
23666
23667impl<T> core::ops::Div<Mass<T>> for TimePerDistance<T> where T: NumLike {
23670 type Output = InverseMomentum<T>;
23671 fn div(self, rhs: Mass<T>) -> Self::Output {
23672 InverseMomentum{s_per_kgm: self.spm / rhs.kg}
23673 }
23674}
23675impl<T> core::ops::Div<Mass<T>> for &TimePerDistance<T> where T: NumLike {
23677 type Output = InverseMomentum<T>;
23678 fn div(self, rhs: Mass<T>) -> Self::Output {
23679 InverseMomentum{s_per_kgm: self.spm.clone() / rhs.kg}
23680 }
23681}
23682impl<T> core::ops::Div<&Mass<T>> for TimePerDistance<T> where T: NumLike {
23684 type Output = InverseMomentum<T>;
23685 fn div(self, rhs: &Mass<T>) -> Self::Output {
23686 InverseMomentum{s_per_kgm: self.spm / rhs.kg.clone()}
23687 }
23688}
23689impl<T> core::ops::Div<&Mass<T>> for &TimePerDistance<T> where T: NumLike {
23691 type Output = InverseMomentum<T>;
23692 fn div(self, rhs: &Mass<T>) -> Self::Output {
23693 InverseMomentum{s_per_kgm: self.spm.clone() / rhs.kg.clone()}
23694 }
23695}
23696
23697impl<T> core::ops::Mul<Time<T>> for TimePerDistance<T> where T: NumLike {
23700 type Output = InverseAcceleration<T>;
23701 fn mul(self, rhs: Time<T>) -> Self::Output {
23702 InverseAcceleration{s2pm: self.spm * rhs.s}
23703 }
23704}
23705impl<T> core::ops::Mul<Time<T>> for &TimePerDistance<T> where T: NumLike {
23707 type Output = InverseAcceleration<T>;
23708 fn mul(self, rhs: Time<T>) -> Self::Output {
23709 InverseAcceleration{s2pm: self.spm.clone() * rhs.s}
23710 }
23711}
23712impl<T> core::ops::Mul<&Time<T>> for TimePerDistance<T> where T: NumLike {
23714 type Output = InverseAcceleration<T>;
23715 fn mul(self, rhs: &Time<T>) -> Self::Output {
23716 InverseAcceleration{s2pm: self.spm * rhs.s.clone()}
23717 }
23718}
23719impl<T> core::ops::Mul<&Time<T>> for &TimePerDistance<T> where T: NumLike {
23721 type Output = InverseAcceleration<T>;
23722 fn mul(self, rhs: &Time<T>) -> Self::Output {
23723 InverseAcceleration{s2pm: self.spm.clone() * rhs.s.clone()}
23724 }
23725}
23726
23727impl<T> core::ops::Div<Time<T>> for TimePerDistance<T> where T: NumLike {
23730 type Output = InverseDistance<T>;
23731 fn div(self, rhs: Time<T>) -> Self::Output {
23732 InverseDistance{per_m: self.spm / rhs.s}
23733 }
23734}
23735impl<T> core::ops::Div<Time<T>> for &TimePerDistance<T> where T: NumLike {
23737 type Output = InverseDistance<T>;
23738 fn div(self, rhs: Time<T>) -> Self::Output {
23739 InverseDistance{per_m: self.spm.clone() / rhs.s}
23740 }
23741}
23742impl<T> core::ops::Div<&Time<T>> for TimePerDistance<T> where T: NumLike {
23744 type Output = InverseDistance<T>;
23745 fn div(self, rhs: &Time<T>) -> Self::Output {
23746 InverseDistance{per_m: self.spm / rhs.s.clone()}
23747 }
23748}
23749impl<T> core::ops::Div<&Time<T>> for &TimePerDistance<T> where T: NumLike {
23751 type Output = InverseDistance<T>;
23752 fn div(self, rhs: &Time<T>) -> Self::Output {
23753 InverseDistance{per_m: self.spm.clone() / rhs.s.clone()}
23754 }
23755}
23756
23757impl<T> core::ops::Mul<Acceleration<T>> for TimePerDistance<T> where T: NumLike {
23760 type Output = Frequency<T>;
23761 fn mul(self, rhs: Acceleration<T>) -> Self::Output {
23762 Frequency{Hz: self.spm * rhs.mps2}
23763 }
23764}
23765impl<T> core::ops::Mul<Acceleration<T>> for &TimePerDistance<T> where T: NumLike {
23767 type Output = Frequency<T>;
23768 fn mul(self, rhs: Acceleration<T>) -> Self::Output {
23769 Frequency{Hz: self.spm.clone() * rhs.mps2}
23770 }
23771}
23772impl<T> core::ops::Mul<&Acceleration<T>> for TimePerDistance<T> where T: NumLike {
23774 type Output = Frequency<T>;
23775 fn mul(self, rhs: &Acceleration<T>) -> Self::Output {
23776 Frequency{Hz: self.spm * rhs.mps2.clone()}
23777 }
23778}
23779impl<T> core::ops::Mul<&Acceleration<T>> for &TimePerDistance<T> where T: NumLike {
23781 type Output = Frequency<T>;
23782 fn mul(self, rhs: &Acceleration<T>) -> Self::Output {
23783 Frequency{Hz: self.spm.clone() * rhs.mps2.clone()}
23784 }
23785}
23786
23787impl<T> core::ops::Mul<Energy<T>> for TimePerDistance<T> where T: NumLike {
23790 type Output = Momentum<T>;
23791 fn mul(self, rhs: Energy<T>) -> Self::Output {
23792 Momentum{kgmps: self.spm * rhs.J}
23793 }
23794}
23795impl<T> core::ops::Mul<Energy<T>> for &TimePerDistance<T> where T: NumLike {
23797 type Output = Momentum<T>;
23798 fn mul(self, rhs: Energy<T>) -> Self::Output {
23799 Momentum{kgmps: self.spm.clone() * rhs.J}
23800 }
23801}
23802impl<T> core::ops::Mul<&Energy<T>> for TimePerDistance<T> where T: NumLike {
23804 type Output = Momentum<T>;
23805 fn mul(self, rhs: &Energy<T>) -> Self::Output {
23806 Momentum{kgmps: self.spm * rhs.J.clone()}
23807 }
23808}
23809impl<T> core::ops::Mul<&Energy<T>> for &TimePerDistance<T> where T: NumLike {
23811 type Output = Momentum<T>;
23812 fn mul(self, rhs: &Energy<T>) -> Self::Output {
23813 Momentum{kgmps: self.spm.clone() * rhs.J.clone()}
23814 }
23815}
23816
23817impl<T> core::ops::Mul<Torque<T>> for TimePerDistance<T> where T: NumLike {
23820 type Output = Momentum<T>;
23821 fn mul(self, rhs: Torque<T>) -> Self::Output {
23822 Momentum{kgmps: self.spm * rhs.Nm}
23823 }
23824}
23825impl<T> core::ops::Mul<Torque<T>> for &TimePerDistance<T> where T: NumLike {
23827 type Output = Momentum<T>;
23828 fn mul(self, rhs: Torque<T>) -> Self::Output {
23829 Momentum{kgmps: self.spm.clone() * rhs.Nm}
23830 }
23831}
23832impl<T> core::ops::Mul<&Torque<T>> for TimePerDistance<T> where T: NumLike {
23834 type Output = Momentum<T>;
23835 fn mul(self, rhs: &Torque<T>) -> Self::Output {
23836 Momentum{kgmps: self.spm * rhs.Nm.clone()}
23837 }
23838}
23839impl<T> core::ops::Mul<&Torque<T>> for &TimePerDistance<T> where T: NumLike {
23841 type Output = Momentum<T>;
23842 fn mul(self, rhs: &Torque<T>) -> Self::Output {
23843 Momentum{kgmps: self.spm.clone() * rhs.Nm.clone()}
23844 }
23845}
23846
23847impl<T> core::ops::Div<Force<T>> for TimePerDistance<T> where T: NumLike {
23850 type Output = InversePower<T>;
23851 fn div(self, rhs: Force<T>) -> Self::Output {
23852 InversePower{per_W: self.spm / rhs.N}
23853 }
23854}
23855impl<T> core::ops::Div<Force<T>> for &TimePerDistance<T> where T: NumLike {
23857 type Output = InversePower<T>;
23858 fn div(self, rhs: Force<T>) -> Self::Output {
23859 InversePower{per_W: self.spm.clone() / rhs.N}
23860 }
23861}
23862impl<T> core::ops::Div<&Force<T>> for TimePerDistance<T> where T: NumLike {
23864 type Output = InversePower<T>;
23865 fn div(self, rhs: &Force<T>) -> Self::Output {
23866 InversePower{per_W: self.spm / rhs.N.clone()}
23867 }
23868}
23869impl<T> core::ops::Div<&Force<T>> for &TimePerDistance<T> where T: NumLike {
23871 type Output = InversePower<T>;
23872 fn div(self, rhs: &Force<T>) -> Self::Output {
23873 InversePower{per_W: self.spm.clone() / rhs.N.clone()}
23874 }
23875}
23876
23877impl<T> core::ops::Mul<Frequency<T>> for TimePerDistance<T> where T: NumLike {
23880 type Output = InverseDistance<T>;
23881 fn mul(self, rhs: Frequency<T>) -> Self::Output {
23882 InverseDistance{per_m: self.spm * rhs.Hz}
23883 }
23884}
23885impl<T> core::ops::Mul<Frequency<T>> for &TimePerDistance<T> where T: NumLike {
23887 type Output = InverseDistance<T>;
23888 fn mul(self, rhs: Frequency<T>) -> Self::Output {
23889 InverseDistance{per_m: self.spm.clone() * rhs.Hz}
23890 }
23891}
23892impl<T> core::ops::Mul<&Frequency<T>> for TimePerDistance<T> where T: NumLike {
23894 type Output = InverseDistance<T>;
23895 fn mul(self, rhs: &Frequency<T>) -> Self::Output {
23896 InverseDistance{per_m: self.spm * rhs.Hz.clone()}
23897 }
23898}
23899impl<T> core::ops::Mul<&Frequency<T>> for &TimePerDistance<T> where T: NumLike {
23901 type Output = InverseDistance<T>;
23902 fn mul(self, rhs: &Frequency<T>) -> Self::Output {
23903 InverseDistance{per_m: self.spm.clone() * rhs.Hz.clone()}
23904 }
23905}
23906
23907impl<T> core::ops::Div<Frequency<T>> for TimePerDistance<T> where T: NumLike {
23910 type Output = InverseAcceleration<T>;
23911 fn div(self, rhs: Frequency<T>) -> Self::Output {
23912 InverseAcceleration{s2pm: self.spm / rhs.Hz}
23913 }
23914}
23915impl<T> core::ops::Div<Frequency<T>> for &TimePerDistance<T> where T: NumLike {
23917 type Output = InverseAcceleration<T>;
23918 fn div(self, rhs: Frequency<T>) -> Self::Output {
23919 InverseAcceleration{s2pm: self.spm.clone() / rhs.Hz}
23920 }
23921}
23922impl<T> core::ops::Div<&Frequency<T>> for TimePerDistance<T> where T: NumLike {
23924 type Output = InverseAcceleration<T>;
23925 fn div(self, rhs: &Frequency<T>) -> Self::Output {
23926 InverseAcceleration{s2pm: self.spm / rhs.Hz.clone()}
23927 }
23928}
23929impl<T> core::ops::Div<&Frequency<T>> for &TimePerDistance<T> where T: NumLike {
23931 type Output = InverseAcceleration<T>;
23932 fn div(self, rhs: &Frequency<T>) -> Self::Output {
23933 InverseAcceleration{s2pm: self.spm.clone() / rhs.Hz.clone()}
23934 }
23935}
23936
23937impl<T> core::ops::Div<InverseAcceleration<T>> for TimePerDistance<T> where T: NumLike {
23940 type Output = Frequency<T>;
23941 fn div(self, rhs: InverseAcceleration<T>) -> Self::Output {
23942 Frequency{Hz: self.spm / rhs.s2pm}
23943 }
23944}
23945impl<T> core::ops::Div<InverseAcceleration<T>> for &TimePerDistance<T> where T: NumLike {
23947 type Output = Frequency<T>;
23948 fn div(self, rhs: InverseAcceleration<T>) -> Self::Output {
23949 Frequency{Hz: self.spm.clone() / rhs.s2pm}
23950 }
23951}
23952impl<T> core::ops::Div<&InverseAcceleration<T>> for TimePerDistance<T> where T: NumLike {
23954 type Output = Frequency<T>;
23955 fn div(self, rhs: &InverseAcceleration<T>) -> Self::Output {
23956 Frequency{Hz: self.spm / rhs.s2pm.clone()}
23957 }
23958}
23959impl<T> core::ops::Div<&InverseAcceleration<T>> for &TimePerDistance<T> where T: NumLike {
23961 type Output = Frequency<T>;
23962 fn div(self, rhs: &InverseAcceleration<T>) -> Self::Output {
23963 Frequency{Hz: self.spm.clone() / rhs.s2pm.clone()}
23964 }
23965}
23966
23967impl<T> core::ops::Div<InverseEnergy<T>> for TimePerDistance<T> where T: NumLike {
23970 type Output = Momentum<T>;
23971 fn div(self, rhs: InverseEnergy<T>) -> Self::Output {
23972 Momentum{kgmps: self.spm / rhs.per_J}
23973 }
23974}
23975impl<T> core::ops::Div<InverseEnergy<T>> for &TimePerDistance<T> where T: NumLike {
23977 type Output = Momentum<T>;
23978 fn div(self, rhs: InverseEnergy<T>) -> Self::Output {
23979 Momentum{kgmps: self.spm.clone() / rhs.per_J}
23980 }
23981}
23982impl<T> core::ops::Div<&InverseEnergy<T>> for TimePerDistance<T> where T: NumLike {
23984 type Output = Momentum<T>;
23985 fn div(self, rhs: &InverseEnergy<T>) -> Self::Output {
23986 Momentum{kgmps: self.spm / rhs.per_J.clone()}
23987 }
23988}
23989impl<T> core::ops::Div<&InverseEnergy<T>> for &TimePerDistance<T> where T: NumLike {
23991 type Output = Momentum<T>;
23992 fn div(self, rhs: &InverseEnergy<T>) -> Self::Output {
23993 Momentum{kgmps: self.spm.clone() / rhs.per_J.clone()}
23994 }
23995}
23996
23997impl<T> core::ops::Div<InverseTorque<T>> for TimePerDistance<T> where T: NumLike {
24000 type Output = Momentum<T>;
24001 fn div(self, rhs: InverseTorque<T>) -> Self::Output {
24002 Momentum{kgmps: self.spm / rhs.per_Nm}
24003 }
24004}
24005impl<T> core::ops::Div<InverseTorque<T>> for &TimePerDistance<T> where T: NumLike {
24007 type Output = Momentum<T>;
24008 fn div(self, rhs: InverseTorque<T>) -> Self::Output {
24009 Momentum{kgmps: self.spm.clone() / rhs.per_Nm}
24010 }
24011}
24012impl<T> core::ops::Div<&InverseTorque<T>> for TimePerDistance<T> where T: NumLike {
24014 type Output = Momentum<T>;
24015 fn div(self, rhs: &InverseTorque<T>) -> Self::Output {
24016 Momentum{kgmps: self.spm / rhs.per_Nm.clone()}
24017 }
24018}
24019impl<T> core::ops::Div<&InverseTorque<T>> for &TimePerDistance<T> where T: NumLike {
24021 type Output = Momentum<T>;
24022 fn div(self, rhs: &InverseTorque<T>) -> Self::Output {
24023 Momentum{kgmps: self.spm.clone() / rhs.per_Nm.clone()}
24024 }
24025}
24026
24027impl<T> core::ops::Mul<InverseForce<T>> for TimePerDistance<T> where T: NumLike {
24030 type Output = InversePower<T>;
24031 fn mul(self, rhs: InverseForce<T>) -> Self::Output {
24032 InversePower{per_W: self.spm * rhs.per_N}
24033 }
24034}
24035impl<T> core::ops::Mul<InverseForce<T>> for &TimePerDistance<T> where T: NumLike {
24037 type Output = InversePower<T>;
24038 fn mul(self, rhs: InverseForce<T>) -> Self::Output {
24039 InversePower{per_W: self.spm.clone() * rhs.per_N}
24040 }
24041}
24042impl<T> core::ops::Mul<&InverseForce<T>> for TimePerDistance<T> where T: NumLike {
24044 type Output = InversePower<T>;
24045 fn mul(self, rhs: &InverseForce<T>) -> Self::Output {
24046 InversePower{per_W: self.spm * rhs.per_N.clone()}
24047 }
24048}
24049impl<T> core::ops::Mul<&InverseForce<T>> for &TimePerDistance<T> where T: NumLike {
24051 type Output = InversePower<T>;
24052 fn mul(self, rhs: &InverseForce<T>) -> Self::Output {
24053 InversePower{per_W: self.spm.clone() * rhs.per_N.clone()}
24054 }
24055}
24056
24057impl<T> core::ops::Mul<InverseMomentum<T>> for TimePerDistance<T> where T: NumLike {
24060 type Output = InverseEnergy<T>;
24061 fn mul(self, rhs: InverseMomentum<T>) -> Self::Output {
24062 InverseEnergy{per_J: self.spm * rhs.s_per_kgm}
24063 }
24064}
24065impl<T> core::ops::Mul<InverseMomentum<T>> for &TimePerDistance<T> where T: NumLike {
24067 type Output = InverseEnergy<T>;
24068 fn mul(self, rhs: InverseMomentum<T>) -> Self::Output {
24069 InverseEnergy{per_J: self.spm.clone() * rhs.s_per_kgm}
24070 }
24071}
24072impl<T> core::ops::Mul<&InverseMomentum<T>> for TimePerDistance<T> where T: NumLike {
24074 type Output = InverseEnergy<T>;
24075 fn mul(self, rhs: &InverseMomentum<T>) -> Self::Output {
24076 InverseEnergy{per_J: self.spm * rhs.s_per_kgm.clone()}
24077 }
24078}
24079impl<T> core::ops::Mul<&InverseMomentum<T>> for &TimePerDistance<T> where T: NumLike {
24081 type Output = InverseEnergy<T>;
24082 fn mul(self, rhs: &InverseMomentum<T>) -> Self::Output {
24083 InverseEnergy{per_J: self.spm.clone() * rhs.s_per_kgm.clone()}
24084 }
24085}
24086
24087impl<T> core::ops::Div<InverseMomentum<T>> for TimePerDistance<T> where T: NumLike {
24090 type Output = Mass<T>;
24091 fn div(self, rhs: InverseMomentum<T>) -> Self::Output {
24092 Mass{kg: self.spm / rhs.s_per_kgm}
24093 }
24094}
24095impl<T> core::ops::Div<InverseMomentum<T>> for &TimePerDistance<T> where T: NumLike {
24097 type Output = Mass<T>;
24098 fn div(self, rhs: InverseMomentum<T>) -> Self::Output {
24099 Mass{kg: self.spm.clone() / rhs.s_per_kgm}
24100 }
24101}
24102impl<T> core::ops::Div<&InverseMomentum<T>> for TimePerDistance<T> where T: NumLike {
24104 type Output = Mass<T>;
24105 fn div(self, rhs: &InverseMomentum<T>) -> Self::Output {
24106 Mass{kg: self.spm / rhs.s_per_kgm.clone()}
24107 }
24108}
24109impl<T> core::ops::Div<&InverseMomentum<T>> for &TimePerDistance<T> where T: NumLike {
24111 type Output = Mass<T>;
24112 fn div(self, rhs: &InverseMomentum<T>) -> Self::Output {
24113 Mass{kg: self.spm.clone() / rhs.s_per_kgm.clone()}
24114 }
24115}
24116
24117impl<T> core::ops::Div<InversePower<T>> for TimePerDistance<T> where T: NumLike {
24120 type Output = Force<T>;
24121 fn div(self, rhs: InversePower<T>) -> Self::Output {
24122 Force{N: self.spm / rhs.per_W}
24123 }
24124}
24125impl<T> core::ops::Div<InversePower<T>> for &TimePerDistance<T> where T: NumLike {
24127 type Output = Force<T>;
24128 fn div(self, rhs: InversePower<T>) -> Self::Output {
24129 Force{N: self.spm.clone() / rhs.per_W}
24130 }
24131}
24132impl<T> core::ops::Div<&InversePower<T>> for TimePerDistance<T> where T: NumLike {
24134 type Output = Force<T>;
24135 fn div(self, rhs: &InversePower<T>) -> Self::Output {
24136 Force{N: self.spm / rhs.per_W.clone()}
24137 }
24138}
24139impl<T> core::ops::Div<&InversePower<T>> for &TimePerDistance<T> where T: NumLike {
24141 type Output = Force<T>;
24142 fn div(self, rhs: &InversePower<T>) -> Self::Output {
24143 Force{N: self.spm.clone() / rhs.per_W.clone()}
24144 }
24145}
24146
24147impl<T> core::ops::Mul<Momentum<T>> for TimePerDistance<T> where T: NumLike {
24150 type Output = Mass<T>;
24151 fn mul(self, rhs: Momentum<T>) -> Self::Output {
24152 Mass{kg: self.spm * rhs.kgmps}
24153 }
24154}
24155impl<T> core::ops::Mul<Momentum<T>> for &TimePerDistance<T> where T: NumLike {
24157 type Output = Mass<T>;
24158 fn mul(self, rhs: Momentum<T>) -> Self::Output {
24159 Mass{kg: self.spm.clone() * rhs.kgmps}
24160 }
24161}
24162impl<T> core::ops::Mul<&Momentum<T>> for TimePerDistance<T> where T: NumLike {
24164 type Output = Mass<T>;
24165 fn mul(self, rhs: &Momentum<T>) -> Self::Output {
24166 Mass{kg: self.spm * rhs.kgmps.clone()}
24167 }
24168}
24169impl<T> core::ops::Mul<&Momentum<T>> for &TimePerDistance<T> where T: NumLike {
24171 type Output = Mass<T>;
24172 fn mul(self, rhs: &Momentum<T>) -> Self::Output {
24173 Mass{kg: self.spm.clone() * rhs.kgmps.clone()}
24174 }
24175}
24176
24177impl<T> core::ops::Div<Momentum<T>> for TimePerDistance<T> where T: NumLike {
24180 type Output = InverseEnergy<T>;
24181 fn div(self, rhs: Momentum<T>) -> Self::Output {
24182 InverseEnergy{per_J: self.spm / rhs.kgmps}
24183 }
24184}
24185impl<T> core::ops::Div<Momentum<T>> for &TimePerDistance<T> where T: NumLike {
24187 type Output = InverseEnergy<T>;
24188 fn div(self, rhs: Momentum<T>) -> Self::Output {
24189 InverseEnergy{per_J: self.spm.clone() / rhs.kgmps}
24190 }
24191}
24192impl<T> core::ops::Div<&Momentum<T>> for TimePerDistance<T> where T: NumLike {
24194 type Output = InverseEnergy<T>;
24195 fn div(self, rhs: &Momentum<T>) -> Self::Output {
24196 InverseEnergy{per_J: self.spm / rhs.kgmps.clone()}
24197 }
24198}
24199impl<T> core::ops::Div<&Momentum<T>> for &TimePerDistance<T> where T: NumLike {
24201 type Output = InverseEnergy<T>;
24202 fn div(self, rhs: &Momentum<T>) -> Self::Output {
24203 InverseEnergy{per_J: self.spm.clone() / rhs.kgmps.clone()}
24204 }
24205}
24206
24207impl<T> core::ops::Mul<Power<T>> for TimePerDistance<T> where T: NumLike {
24210 type Output = Force<T>;
24211 fn mul(self, rhs: Power<T>) -> Self::Output {
24212 Force{N: self.spm * rhs.W}
24213 }
24214}
24215impl<T> core::ops::Mul<Power<T>> for &TimePerDistance<T> where T: NumLike {
24217 type Output = Force<T>;
24218 fn mul(self, rhs: Power<T>) -> Self::Output {
24219 Force{N: self.spm.clone() * rhs.W}
24220 }
24221}
24222impl<T> core::ops::Mul<&Power<T>> for TimePerDistance<T> where T: NumLike {
24224 type Output = Force<T>;
24225 fn mul(self, rhs: &Power<T>) -> Self::Output {
24226 Force{N: self.spm * rhs.W.clone()}
24227 }
24228}
24229impl<T> core::ops::Mul<&Power<T>> for &TimePerDistance<T> where T: NumLike {
24231 type Output = Force<T>;
24232 fn mul(self, rhs: &Power<T>) -> Self::Output {
24233 Force{N: self.spm.clone() * rhs.W.clone()}
24234 }
24235}
24236
24237impl<T> core::ops::Div<InverseAbsorbedDose<T>> for TimePerDistance<T> where T: NumLike {
24240 type Output = Velocity<T>;
24241 fn div(self, rhs: InverseAbsorbedDose<T>) -> Self::Output {
24242 Velocity{mps: self.spm / rhs.per_Gy}
24243 }
24244}
24245impl<T> core::ops::Div<InverseAbsorbedDose<T>> for &TimePerDistance<T> where T: NumLike {
24247 type Output = Velocity<T>;
24248 fn div(self, rhs: InverseAbsorbedDose<T>) -> Self::Output {
24249 Velocity{mps: self.spm.clone() / rhs.per_Gy}
24250 }
24251}
24252impl<T> core::ops::Div<&InverseAbsorbedDose<T>> for TimePerDistance<T> where T: NumLike {
24254 type Output = Velocity<T>;
24255 fn div(self, rhs: &InverseAbsorbedDose<T>) -> Self::Output {
24256 Velocity{mps: self.spm / rhs.per_Gy.clone()}
24257 }
24258}
24259impl<T> core::ops::Div<&InverseAbsorbedDose<T>> for &TimePerDistance<T> where T: NumLike {
24261 type Output = Velocity<T>;
24262 fn div(self, rhs: &InverseAbsorbedDose<T>) -> Self::Output {
24263 Velocity{mps: self.spm.clone() / rhs.per_Gy.clone()}
24264 }
24265}
24266
24267impl<T> core::ops::Div<InverseDoseEquivalent<T>> for TimePerDistance<T> where T: NumLike {
24270 type Output = Velocity<T>;
24271 fn div(self, rhs: InverseDoseEquivalent<T>) -> Self::Output {
24272 Velocity{mps: self.spm / rhs.per_Sv}
24273 }
24274}
24275impl<T> core::ops::Div<InverseDoseEquivalent<T>> for &TimePerDistance<T> where T: NumLike {
24277 type Output = Velocity<T>;
24278 fn div(self, rhs: InverseDoseEquivalent<T>) -> Self::Output {
24279 Velocity{mps: self.spm.clone() / rhs.per_Sv}
24280 }
24281}
24282impl<T> core::ops::Div<&InverseDoseEquivalent<T>> for TimePerDistance<T> where T: NumLike {
24284 type Output = Velocity<T>;
24285 fn div(self, rhs: &InverseDoseEquivalent<T>) -> Self::Output {
24286 Velocity{mps: self.spm / rhs.per_Sv.clone()}
24287 }
24288}
24289impl<T> core::ops::Div<&InverseDoseEquivalent<T>> for &TimePerDistance<T> where T: NumLike {
24291 type Output = Velocity<T>;
24292 fn div(self, rhs: &InverseDoseEquivalent<T>) -> Self::Output {
24293 Velocity{mps: self.spm.clone() / rhs.per_Sv.clone()}
24294 }
24295}
24296
24297impl<T> core::ops::Div<TimePerDistance<T>> for f64 where T: NumLike+From<f64> {
24300 type Output = Velocity<T>;
24301 fn div(self, rhs: TimePerDistance<T>) -> Self::Output {
24302 Velocity{mps: T::from(self) / rhs.spm}
24303 }
24304}
24305impl<T> core::ops::Div<TimePerDistance<T>> for &f64 where T: NumLike+From<f64> {
24307 type Output = Velocity<T>;
24308 fn div(self, rhs: TimePerDistance<T>) -> Self::Output {
24309 Velocity{mps: T::from(self.clone()) / rhs.spm}
24310 }
24311}
24312impl<T> core::ops::Div<&TimePerDistance<T>> for f64 where T: NumLike+From<f64> {
24314 type Output = Velocity<T>;
24315 fn div(self, rhs: &TimePerDistance<T>) -> Self::Output {
24316 Velocity{mps: T::from(self) / rhs.spm.clone()}
24317 }
24318}
24319impl<T> core::ops::Div<&TimePerDistance<T>> for &f64 where T: NumLike+From<f64> {
24321 type Output = Velocity<T>;
24322 fn div(self, rhs: &TimePerDistance<T>) -> Self::Output {
24323 Velocity{mps: T::from(self.clone()) / rhs.spm.clone()}
24324 }
24325}
24326
24327impl<T> core::ops::Div<TimePerDistance<T>> for f32 where T: NumLike+From<f32> {
24330 type Output = Velocity<T>;
24331 fn div(self, rhs: TimePerDistance<T>) -> Self::Output {
24332 Velocity{mps: T::from(self) / rhs.spm}
24333 }
24334}
24335impl<T> core::ops::Div<TimePerDistance<T>> for &f32 where T: NumLike+From<f32> {
24337 type Output = Velocity<T>;
24338 fn div(self, rhs: TimePerDistance<T>) -> Self::Output {
24339 Velocity{mps: T::from(self.clone()) / rhs.spm}
24340 }
24341}
24342impl<T> core::ops::Div<&TimePerDistance<T>> for f32 where T: NumLike+From<f32> {
24344 type Output = Velocity<T>;
24345 fn div(self, rhs: &TimePerDistance<T>) -> Self::Output {
24346 Velocity{mps: T::from(self) / rhs.spm.clone()}
24347 }
24348}
24349impl<T> core::ops::Div<&TimePerDistance<T>> for &f32 where T: NumLike+From<f32> {
24351 type Output = Velocity<T>;
24352 fn div(self, rhs: &TimePerDistance<T>) -> Self::Output {
24353 Velocity{mps: T::from(self.clone()) / rhs.spm.clone()}
24354 }
24355}
24356
24357impl<T> core::ops::Div<TimePerDistance<T>> for i64 where T: NumLike+From<i64> {
24360 type Output = Velocity<T>;
24361 fn div(self, rhs: TimePerDistance<T>) -> Self::Output {
24362 Velocity{mps: T::from(self) / rhs.spm}
24363 }
24364}
24365impl<T> core::ops::Div<TimePerDistance<T>> for &i64 where T: NumLike+From<i64> {
24367 type Output = Velocity<T>;
24368 fn div(self, rhs: TimePerDistance<T>) -> Self::Output {
24369 Velocity{mps: T::from(self.clone()) / rhs.spm}
24370 }
24371}
24372impl<T> core::ops::Div<&TimePerDistance<T>> for i64 where T: NumLike+From<i64> {
24374 type Output = Velocity<T>;
24375 fn div(self, rhs: &TimePerDistance<T>) -> Self::Output {
24376 Velocity{mps: T::from(self) / rhs.spm.clone()}
24377 }
24378}
24379impl<T> core::ops::Div<&TimePerDistance<T>> for &i64 where T: NumLike+From<i64> {
24381 type Output = Velocity<T>;
24382 fn div(self, rhs: &TimePerDistance<T>) -> Self::Output {
24383 Velocity{mps: T::from(self.clone()) / rhs.spm.clone()}
24384 }
24385}
24386
24387impl<T> core::ops::Div<TimePerDistance<T>> for i32 where T: NumLike+From<i32> {
24390 type Output = Velocity<T>;
24391 fn div(self, rhs: TimePerDistance<T>) -> Self::Output {
24392 Velocity{mps: T::from(self) / rhs.spm}
24393 }
24394}
24395impl<T> core::ops::Div<TimePerDistance<T>> for &i32 where T: NumLike+From<i32> {
24397 type Output = Velocity<T>;
24398 fn div(self, rhs: TimePerDistance<T>) -> Self::Output {
24399 Velocity{mps: T::from(self.clone()) / rhs.spm}
24400 }
24401}
24402impl<T> core::ops::Div<&TimePerDistance<T>> for i32 where T: NumLike+From<i32> {
24404 type Output = Velocity<T>;
24405 fn div(self, rhs: &TimePerDistance<T>) -> Self::Output {
24406 Velocity{mps: T::from(self) / rhs.spm.clone()}
24407 }
24408}
24409impl<T> core::ops::Div<&TimePerDistance<T>> for &i32 where T: NumLike+From<i32> {
24411 type Output = Velocity<T>;
24412 fn div(self, rhs: &TimePerDistance<T>) -> Self::Output {
24413 Velocity{mps: T::from(self.clone()) / rhs.spm.clone()}
24414 }
24415}
24416
24417#[cfg(feature="num-bigfloat")]
24420impl<T> core::ops::Div<TimePerDistance<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
24421 type Output = Velocity<T>;
24422 fn div(self, rhs: TimePerDistance<T>) -> Self::Output {
24423 Velocity{mps: T::from(self) / rhs.spm}
24424 }
24425}
24426#[cfg(feature="num-bigfloat")]
24428impl<T> core::ops::Div<TimePerDistance<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
24429 type Output = Velocity<T>;
24430 fn div(self, rhs: TimePerDistance<T>) -> Self::Output {
24431 Velocity{mps: T::from(self.clone()) / rhs.spm}
24432 }
24433}
24434#[cfg(feature="num-bigfloat")]
24436impl<T> core::ops::Div<&TimePerDistance<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
24437 type Output = Velocity<T>;
24438 fn div(self, rhs: &TimePerDistance<T>) -> Self::Output {
24439 Velocity{mps: T::from(self) / rhs.spm.clone()}
24440 }
24441}
24442#[cfg(feature="num-bigfloat")]
24444impl<T> core::ops::Div<&TimePerDistance<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
24445 type Output = Velocity<T>;
24446 fn div(self, rhs: &TimePerDistance<T>) -> Self::Output {
24447 Velocity{mps: T::from(self.clone()) / rhs.spm.clone()}
24448 }
24449}
24450
24451#[cfg(feature="num-complex")]
24454impl<T> core::ops::Div<TimePerDistance<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
24455 type Output = Velocity<T>;
24456 fn div(self, rhs: TimePerDistance<T>) -> Self::Output {
24457 Velocity{mps: T::from(self) / rhs.spm}
24458 }
24459}
24460#[cfg(feature="num-complex")]
24462impl<T> core::ops::Div<TimePerDistance<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
24463 type Output = Velocity<T>;
24464 fn div(self, rhs: TimePerDistance<T>) -> Self::Output {
24465 Velocity{mps: T::from(self.clone()) / rhs.spm}
24466 }
24467}
24468#[cfg(feature="num-complex")]
24470impl<T> core::ops::Div<&TimePerDistance<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
24471 type Output = Velocity<T>;
24472 fn div(self, rhs: &TimePerDistance<T>) -> Self::Output {
24473 Velocity{mps: T::from(self) / rhs.spm.clone()}
24474 }
24475}
24476#[cfg(feature="num-complex")]
24478impl<T> core::ops::Div<&TimePerDistance<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
24479 type Output = Velocity<T>;
24480 fn div(self, rhs: &TimePerDistance<T>) -> Self::Output {
24481 Velocity{mps: T::from(self.clone()) / rhs.spm.clone()}
24482 }
24483}
24484
24485#[cfg(feature="num-complex")]
24488impl<T> core::ops::Div<TimePerDistance<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
24489 type Output = Velocity<T>;
24490 fn div(self, rhs: TimePerDistance<T>) -> Self::Output {
24491 Velocity{mps: T::from(self) / rhs.spm}
24492 }
24493}
24494#[cfg(feature="num-complex")]
24496impl<T> core::ops::Div<TimePerDistance<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
24497 type Output = Velocity<T>;
24498 fn div(self, rhs: TimePerDistance<T>) -> Self::Output {
24499 Velocity{mps: T::from(self.clone()) / rhs.spm}
24500 }
24501}
24502#[cfg(feature="num-complex")]
24504impl<T> core::ops::Div<&TimePerDistance<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
24505 type Output = Velocity<T>;
24506 fn div(self, rhs: &TimePerDistance<T>) -> Self::Output {
24507 Velocity{mps: T::from(self) / rhs.spm.clone()}
24508 }
24509}
24510#[cfg(feature="num-complex")]
24512impl<T> core::ops::Div<&TimePerDistance<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
24513 type Output = Velocity<T>;
24514 fn div(self, rhs: &TimePerDistance<T>) -> Self::Output {
24515 Velocity{mps: T::from(self.clone()) / rhs.spm.clone()}
24516 }
24517}
24518
24519#[derive(UnitStruct, Debug, Clone)]
24521#[cfg_attr(feature="serde", derive(Serialize, Deserialize))]
24522pub struct Torque<T: NumLike>{
24523 pub Nm: T
24525}
24526
24527impl<T> Torque<T> where T: NumLike {
24528
24529 pub fn unit_name() -> &'static str { "newton meters" }
24531
24532 pub fn unit_symbol() -> &'static str { "Nm" }
24534
24535 pub fn from_Nm(Nm: T) -> Self { Torque{Nm: Nm} }
24540
24541 pub fn to_Nm(&self) -> T { self.Nm.clone() }
24543
24544 pub fn from_newton_meters(newton_meters: T) -> Self { Torque{Nm: newton_meters} }
24549
24550 pub fn to_newton_meters(&self) -> T { self.Nm.clone() }
24552
24553}
24554
24555impl<T> fmt::Display for Torque<T> where T: NumLike {
24556 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
24557 write!(f, "{} {}", &self.Nm, Self::unit_symbol())
24558 }
24559}
24560
24561impl<T> Torque<T> where T: NumLike+From<f64> {
24562
24563 pub fn to_ftlb(&self) -> T {
24567 return self.Nm.clone() * T::from(0.73756214927727_f64);
24568 }
24569
24570 pub fn from_ftlb(ftlb: T) -> Self {
24577 Torque{Nm: ftlb * T::from(1.35581794833139_f64)}
24578 }
24579
24580}
24581
24582
24583#[cfg(feature="num-bigfloat")]
24585impl core::ops::Mul<Torque<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
24586 type Output = Torque<num_bigfloat::BigFloat>;
24587 fn mul(self, rhs: Torque<num_bigfloat::BigFloat>) -> Self::Output {
24588 Torque{Nm: self * rhs.Nm}
24589 }
24590}
24591#[cfg(feature="num-bigfloat")]
24593impl core::ops::Mul<Torque<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
24594 type Output = Torque<num_bigfloat::BigFloat>;
24595 fn mul(self, rhs: Torque<num_bigfloat::BigFloat>) -> Self::Output {
24596 Torque{Nm: self.clone() * rhs.Nm}
24597 }
24598}
24599#[cfg(feature="num-bigfloat")]
24601impl core::ops::Mul<&Torque<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
24602 type Output = Torque<num_bigfloat::BigFloat>;
24603 fn mul(self, rhs: &Torque<num_bigfloat::BigFloat>) -> Self::Output {
24604 Torque{Nm: self * rhs.Nm.clone()}
24605 }
24606}
24607#[cfg(feature="num-bigfloat")]
24609impl core::ops::Mul<&Torque<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
24610 type Output = Torque<num_bigfloat::BigFloat>;
24611 fn mul(self, rhs: &Torque<num_bigfloat::BigFloat>) -> Self::Output {
24612 Torque{Nm: self.clone() * rhs.Nm.clone()}
24613 }
24614}
24615
24616#[cfg(feature="num-complex")]
24618impl core::ops::Mul<Torque<num_complex::Complex32>> for num_complex::Complex32 {
24619 type Output = Torque<num_complex::Complex32>;
24620 fn mul(self, rhs: Torque<num_complex::Complex32>) -> Self::Output {
24621 Torque{Nm: self * rhs.Nm}
24622 }
24623}
24624#[cfg(feature="num-complex")]
24626impl core::ops::Mul<Torque<num_complex::Complex32>> for &num_complex::Complex32 {
24627 type Output = Torque<num_complex::Complex32>;
24628 fn mul(self, rhs: Torque<num_complex::Complex32>) -> Self::Output {
24629 Torque{Nm: self.clone() * rhs.Nm}
24630 }
24631}
24632#[cfg(feature="num-complex")]
24634impl core::ops::Mul<&Torque<num_complex::Complex32>> for num_complex::Complex32 {
24635 type Output = Torque<num_complex::Complex32>;
24636 fn mul(self, rhs: &Torque<num_complex::Complex32>) -> Self::Output {
24637 Torque{Nm: self * rhs.Nm.clone()}
24638 }
24639}
24640#[cfg(feature="num-complex")]
24642impl core::ops::Mul<&Torque<num_complex::Complex32>> for &num_complex::Complex32 {
24643 type Output = Torque<num_complex::Complex32>;
24644 fn mul(self, rhs: &Torque<num_complex::Complex32>) -> Self::Output {
24645 Torque{Nm: self.clone() * rhs.Nm.clone()}
24646 }
24647}
24648
24649#[cfg(feature="num-complex")]
24651impl core::ops::Mul<Torque<num_complex::Complex64>> for num_complex::Complex64 {
24652 type Output = Torque<num_complex::Complex64>;
24653 fn mul(self, rhs: Torque<num_complex::Complex64>) -> Self::Output {
24654 Torque{Nm: self * rhs.Nm}
24655 }
24656}
24657#[cfg(feature="num-complex")]
24659impl core::ops::Mul<Torque<num_complex::Complex64>> for &num_complex::Complex64 {
24660 type Output = Torque<num_complex::Complex64>;
24661 fn mul(self, rhs: Torque<num_complex::Complex64>) -> Self::Output {
24662 Torque{Nm: self.clone() * rhs.Nm}
24663 }
24664}
24665#[cfg(feature="num-complex")]
24667impl core::ops::Mul<&Torque<num_complex::Complex64>> for num_complex::Complex64 {
24668 type Output = Torque<num_complex::Complex64>;
24669 fn mul(self, rhs: &Torque<num_complex::Complex64>) -> Self::Output {
24670 Torque{Nm: self * rhs.Nm.clone()}
24671 }
24672}
24673#[cfg(feature="num-complex")]
24675impl core::ops::Mul<&Torque<num_complex::Complex64>> for &num_complex::Complex64 {
24676 type Output = Torque<num_complex::Complex64>;
24677 fn mul(self, rhs: &Torque<num_complex::Complex64>) -> Self::Output {
24678 Torque{Nm: self.clone() * rhs.Nm.clone()}
24679 }
24680}
24681
24682
24683
24684#[cfg(feature = "uom")]
24686impl<T> Into<uom::si::f32::Torque> for Torque<T> where T: NumLike+Into<f32> {
24687 fn into(self) -> uom::si::f32::Torque {
24688 uom::si::f32::Torque::new::<uom::si::torque::newton_meter>(self.Nm.into())
24689 }
24690}
24691
24692#[cfg(feature = "uom")]
24694impl<T> From<uom::si::f32::Torque> for Torque<T> where T: NumLike+From<f32> {
24695 fn from(src: uom::si::f32::Torque) -> Self {
24696 Torque{Nm: T::from(src.value)}
24697 }
24698}
24699
24700#[cfg(feature = "uom")]
24702impl<T> Into<uom::si::f64::Torque> for Torque<T> where T: NumLike+Into<f64> {
24703 fn into(self) -> uom::si::f64::Torque {
24704 uom::si::f64::Torque::new::<uom::si::torque::newton_meter>(self.Nm.into())
24705 }
24706}
24707
24708#[cfg(feature = "uom")]
24710impl<T> From<uom::si::f64::Torque> for Torque<T> where T: NumLike+From<f64> {
24711 fn from(src: uom::si::f64::Torque) -> Self {
24712 Torque{Nm: T::from(src.value)}
24713 }
24714}
24715
24716
24717impl<T> core::ops::Div<Current<T>> for Torque<T> where T: NumLike {
24720 type Output = MagneticFlux<T>;
24721 fn div(self, rhs: Current<T>) -> Self::Output {
24722 MagneticFlux{Wb: self.Nm / rhs.A}
24723 }
24724}
24725impl<T> core::ops::Div<Current<T>> for &Torque<T> where T: NumLike {
24727 type Output = MagneticFlux<T>;
24728 fn div(self, rhs: Current<T>) -> Self::Output {
24729 MagneticFlux{Wb: self.Nm.clone() / rhs.A}
24730 }
24731}
24732impl<T> core::ops::Div<&Current<T>> for Torque<T> where T: NumLike {
24734 type Output = MagneticFlux<T>;
24735 fn div(self, rhs: &Current<T>) -> Self::Output {
24736 MagneticFlux{Wb: self.Nm / rhs.A.clone()}
24737 }
24738}
24739impl<T> core::ops::Div<&Current<T>> for &Torque<T> where T: NumLike {
24741 type Output = MagneticFlux<T>;
24742 fn div(self, rhs: &Current<T>) -> Self::Output {
24743 MagneticFlux{Wb: self.Nm.clone() / rhs.A.clone()}
24744 }
24745}
24746
24747impl<T> core::ops::Div<Distance<T>> for Torque<T> where T: NumLike {
24750 type Output = Force<T>;
24751 fn div(self, rhs: Distance<T>) -> Self::Output {
24752 Force{N: self.Nm / rhs.m}
24753 }
24754}
24755impl<T> core::ops::Div<Distance<T>> for &Torque<T> where T: NumLike {
24757 type Output = Force<T>;
24758 fn div(self, rhs: Distance<T>) -> Self::Output {
24759 Force{N: self.Nm.clone() / rhs.m}
24760 }
24761}
24762impl<T> core::ops::Div<&Distance<T>> for Torque<T> where T: NumLike {
24764 type Output = Force<T>;
24765 fn div(self, rhs: &Distance<T>) -> Self::Output {
24766 Force{N: self.Nm / rhs.m.clone()}
24767 }
24768}
24769impl<T> core::ops::Div<&Distance<T>> for &Torque<T> where T: NumLike {
24771 type Output = Force<T>;
24772 fn div(self, rhs: &Distance<T>) -> Self::Output {
24773 Force{N: self.Nm.clone() / rhs.m.clone()}
24774 }
24775}
24776
24777impl<T> core::ops::Mul<InverseCurrent<T>> for Torque<T> where T: NumLike {
24780 type Output = MagneticFlux<T>;
24781 fn mul(self, rhs: InverseCurrent<T>) -> Self::Output {
24782 MagneticFlux{Wb: self.Nm * rhs.per_A}
24783 }
24784}
24785impl<T> core::ops::Mul<InverseCurrent<T>> for &Torque<T> where T: NumLike {
24787 type Output = MagneticFlux<T>;
24788 fn mul(self, rhs: InverseCurrent<T>) -> Self::Output {
24789 MagneticFlux{Wb: self.Nm.clone() * rhs.per_A}
24790 }
24791}
24792impl<T> core::ops::Mul<&InverseCurrent<T>> for Torque<T> where T: NumLike {
24794 type Output = MagneticFlux<T>;
24795 fn mul(self, rhs: &InverseCurrent<T>) -> Self::Output {
24796 MagneticFlux{Wb: self.Nm * rhs.per_A.clone()}
24797 }
24798}
24799impl<T> core::ops::Mul<&InverseCurrent<T>> for &Torque<T> where T: NumLike {
24801 type Output = MagneticFlux<T>;
24802 fn mul(self, rhs: &InverseCurrent<T>) -> Self::Output {
24803 MagneticFlux{Wb: self.Nm.clone() * rhs.per_A.clone()}
24804 }
24805}
24806
24807impl<T> core::ops::Mul<InverseDistance<T>> for Torque<T> where T: NumLike {
24810 type Output = Force<T>;
24811 fn mul(self, rhs: InverseDistance<T>) -> Self::Output {
24812 Force{N: self.Nm * rhs.per_m}
24813 }
24814}
24815impl<T> core::ops::Mul<InverseDistance<T>> for &Torque<T> where T: NumLike {
24817 type Output = Force<T>;
24818 fn mul(self, rhs: InverseDistance<T>) -> Self::Output {
24819 Force{N: self.Nm.clone() * rhs.per_m}
24820 }
24821}
24822impl<T> core::ops::Mul<&InverseDistance<T>> for Torque<T> where T: NumLike {
24824 type Output = Force<T>;
24825 fn mul(self, rhs: &InverseDistance<T>) -> Self::Output {
24826 Force{N: self.Nm * rhs.per_m.clone()}
24827 }
24828}
24829impl<T> core::ops::Mul<&InverseDistance<T>> for &Torque<T> where T: NumLike {
24831 type Output = Force<T>;
24832 fn mul(self, rhs: &InverseDistance<T>) -> Self::Output {
24833 Force{N: self.Nm.clone() * rhs.per_m.clone()}
24834 }
24835}
24836
24837impl<T> core::ops::Div<Time<T>> for Torque<T> where T: NumLike {
24840 type Output = Power<T>;
24841 fn div(self, rhs: Time<T>) -> Self::Output {
24842 Power{W: self.Nm / rhs.s}
24843 }
24844}
24845impl<T> core::ops::Div<Time<T>> for &Torque<T> where T: NumLike {
24847 type Output = Power<T>;
24848 fn div(self, rhs: Time<T>) -> Self::Output {
24849 Power{W: self.Nm.clone() / rhs.s}
24850 }
24851}
24852impl<T> core::ops::Div<&Time<T>> for Torque<T> where T: NumLike {
24854 type Output = Power<T>;
24855 fn div(self, rhs: &Time<T>) -> Self::Output {
24856 Power{W: self.Nm / rhs.s.clone()}
24857 }
24858}
24859impl<T> core::ops::Div<&Time<T>> for &Torque<T> where T: NumLike {
24861 type Output = Power<T>;
24862 fn div(self, rhs: &Time<T>) -> Self::Output {
24863 Power{W: self.Nm.clone() / rhs.s.clone()}
24864 }
24865}
24866
24867impl<T> core::ops::Div<Charge<T>> for Torque<T> where T: NumLike {
24870 type Output = Voltage<T>;
24871 fn div(self, rhs: Charge<T>) -> Self::Output {
24872 Voltage{V: self.Nm / rhs.C}
24873 }
24874}
24875impl<T> core::ops::Div<Charge<T>> for &Torque<T> where T: NumLike {
24877 type Output = Voltage<T>;
24878 fn div(self, rhs: Charge<T>) -> Self::Output {
24879 Voltage{V: self.Nm.clone() / rhs.C}
24880 }
24881}
24882impl<T> core::ops::Div<&Charge<T>> for Torque<T> where T: NumLike {
24884 type Output = Voltage<T>;
24885 fn div(self, rhs: &Charge<T>) -> Self::Output {
24886 Voltage{V: self.Nm / rhs.C.clone()}
24887 }
24888}
24889impl<T> core::ops::Div<&Charge<T>> for &Torque<T> where T: NumLike {
24891 type Output = Voltage<T>;
24892 fn div(self, rhs: &Charge<T>) -> Self::Output {
24893 Voltage{V: self.Nm.clone() / rhs.C.clone()}
24894 }
24895}
24896
24897impl<T> core::ops::Mul<InverseCharge<T>> for Torque<T> where T: NumLike {
24900 type Output = Voltage<T>;
24901 fn mul(self, rhs: InverseCharge<T>) -> Self::Output {
24902 Voltage{V: self.Nm * rhs.per_C}
24903 }
24904}
24905impl<T> core::ops::Mul<InverseCharge<T>> for &Torque<T> where T: NumLike {
24907 type Output = Voltage<T>;
24908 fn mul(self, rhs: InverseCharge<T>) -> Self::Output {
24909 Voltage{V: self.Nm.clone() * rhs.per_C}
24910 }
24911}
24912impl<T> core::ops::Mul<&InverseCharge<T>> for Torque<T> where T: NumLike {
24914 type Output = Voltage<T>;
24915 fn mul(self, rhs: &InverseCharge<T>) -> Self::Output {
24916 Voltage{V: self.Nm * rhs.per_C.clone()}
24917 }
24918}
24919impl<T> core::ops::Mul<&InverseCharge<T>> for &Torque<T> where T: NumLike {
24921 type Output = Voltage<T>;
24922 fn mul(self, rhs: &InverseCharge<T>) -> Self::Output {
24923 Voltage{V: self.Nm.clone() * rhs.per_C.clone()}
24924 }
24925}
24926
24927impl<T> core::ops::Mul<InverseMagneticFlux<T>> for Torque<T> where T: NumLike {
24930 type Output = Current<T>;
24931 fn mul(self, rhs: InverseMagneticFlux<T>) -> Self::Output {
24932 Current{A: self.Nm * rhs.per_Wb}
24933 }
24934}
24935impl<T> core::ops::Mul<InverseMagneticFlux<T>> for &Torque<T> where T: NumLike {
24937 type Output = Current<T>;
24938 fn mul(self, rhs: InverseMagneticFlux<T>) -> Self::Output {
24939 Current{A: self.Nm.clone() * rhs.per_Wb}
24940 }
24941}
24942impl<T> core::ops::Mul<&InverseMagneticFlux<T>> for Torque<T> where T: NumLike {
24944 type Output = Current<T>;
24945 fn mul(self, rhs: &InverseMagneticFlux<T>) -> Self::Output {
24946 Current{A: self.Nm * rhs.per_Wb.clone()}
24947 }
24948}
24949impl<T> core::ops::Mul<&InverseMagneticFlux<T>> for &Torque<T> where T: NumLike {
24951 type Output = Current<T>;
24952 fn mul(self, rhs: &InverseMagneticFlux<T>) -> Self::Output {
24953 Current{A: self.Nm.clone() * rhs.per_Wb.clone()}
24954 }
24955}
24956
24957impl<T> core::ops::Mul<InverseVoltage<T>> for Torque<T> where T: NumLike {
24960 type Output = Charge<T>;
24961 fn mul(self, rhs: InverseVoltage<T>) -> Self::Output {
24962 Charge{C: self.Nm * rhs.per_V}
24963 }
24964}
24965impl<T> core::ops::Mul<InverseVoltage<T>> for &Torque<T> where T: NumLike {
24967 type Output = Charge<T>;
24968 fn mul(self, rhs: InverseVoltage<T>) -> Self::Output {
24969 Charge{C: self.Nm.clone() * rhs.per_V}
24970 }
24971}
24972impl<T> core::ops::Mul<&InverseVoltage<T>> for Torque<T> where T: NumLike {
24974 type Output = Charge<T>;
24975 fn mul(self, rhs: &InverseVoltage<T>) -> Self::Output {
24976 Charge{C: self.Nm * rhs.per_V.clone()}
24977 }
24978}
24979impl<T> core::ops::Mul<&InverseVoltage<T>> for &Torque<T> where T: NumLike {
24981 type Output = Charge<T>;
24982 fn mul(self, rhs: &InverseVoltage<T>) -> Self::Output {
24983 Charge{C: self.Nm.clone() * rhs.per_V.clone()}
24984 }
24985}
24986
24987impl<T> core::ops::Div<MagneticFlux<T>> for Torque<T> where T: NumLike {
24990 type Output = Current<T>;
24991 fn div(self, rhs: MagneticFlux<T>) -> Self::Output {
24992 Current{A: self.Nm / rhs.Wb}
24993 }
24994}
24995impl<T> core::ops::Div<MagneticFlux<T>> for &Torque<T> where T: NumLike {
24997 type Output = Current<T>;
24998 fn div(self, rhs: MagneticFlux<T>) -> Self::Output {
24999 Current{A: self.Nm.clone() / rhs.Wb}
25000 }
25001}
25002impl<T> core::ops::Div<&MagneticFlux<T>> for Torque<T> where T: NumLike {
25004 type Output = Current<T>;
25005 fn div(self, rhs: &MagneticFlux<T>) -> Self::Output {
25006 Current{A: self.Nm / rhs.Wb.clone()}
25007 }
25008}
25009impl<T> core::ops::Div<&MagneticFlux<T>> for &Torque<T> where T: NumLike {
25011 type Output = Current<T>;
25012 fn div(self, rhs: &MagneticFlux<T>) -> Self::Output {
25013 Current{A: self.Nm.clone() / rhs.Wb.clone()}
25014 }
25015}
25016
25017impl<T> core::ops::Div<Voltage<T>> for Torque<T> where T: NumLike {
25020 type Output = Charge<T>;
25021 fn div(self, rhs: Voltage<T>) -> Self::Output {
25022 Charge{C: self.Nm / rhs.V}
25023 }
25024}
25025impl<T> core::ops::Div<Voltage<T>> for &Torque<T> where T: NumLike {
25027 type Output = Charge<T>;
25028 fn div(self, rhs: Voltage<T>) -> Self::Output {
25029 Charge{C: self.Nm.clone() / rhs.V}
25030 }
25031}
25032impl<T> core::ops::Div<&Voltage<T>> for Torque<T> where T: NumLike {
25034 type Output = Charge<T>;
25035 fn div(self, rhs: &Voltage<T>) -> Self::Output {
25036 Charge{C: self.Nm / rhs.V.clone()}
25037 }
25038}
25039impl<T> core::ops::Div<&Voltage<T>> for &Torque<T> where T: NumLike {
25041 type Output = Charge<T>;
25042 fn div(self, rhs: &Voltage<T>) -> Self::Output {
25043 Charge{C: self.Nm.clone() / rhs.V.clone()}
25044 }
25045}
25046
25047impl<T> core::ops::Mul<InverseVolume<T>> for Torque<T> where T: NumLike {
25050 type Output = Pressure<T>;
25051 fn mul(self, rhs: InverseVolume<T>) -> Self::Output {
25052 Pressure{Pa: self.Nm * rhs.per_m3}
25053 }
25054}
25055impl<T> core::ops::Mul<InverseVolume<T>> for &Torque<T> where T: NumLike {
25057 type Output = Pressure<T>;
25058 fn mul(self, rhs: InverseVolume<T>) -> Self::Output {
25059 Pressure{Pa: self.Nm.clone() * rhs.per_m3}
25060 }
25061}
25062impl<T> core::ops::Mul<&InverseVolume<T>> for Torque<T> where T: NumLike {
25064 type Output = Pressure<T>;
25065 fn mul(self, rhs: &InverseVolume<T>) -> Self::Output {
25066 Pressure{Pa: self.Nm * rhs.per_m3.clone()}
25067 }
25068}
25069impl<T> core::ops::Mul<&InverseVolume<T>> for &Torque<T> where T: NumLike {
25071 type Output = Pressure<T>;
25072 fn mul(self, rhs: &InverseVolume<T>) -> Self::Output {
25073 Pressure{Pa: self.Nm.clone() * rhs.per_m3.clone()}
25074 }
25075}
25076
25077impl<T> core::ops::Div<Volume<T>> for Torque<T> where T: NumLike {
25080 type Output = Pressure<T>;
25081 fn div(self, rhs: Volume<T>) -> Self::Output {
25082 Pressure{Pa: self.Nm / rhs.m3}
25083 }
25084}
25085impl<T> core::ops::Div<Volume<T>> for &Torque<T> where T: NumLike {
25087 type Output = Pressure<T>;
25088 fn div(self, rhs: Volume<T>) -> Self::Output {
25089 Pressure{Pa: self.Nm.clone() / rhs.m3}
25090 }
25091}
25092impl<T> core::ops::Div<&Volume<T>> for Torque<T> where T: NumLike {
25094 type Output = Pressure<T>;
25095 fn div(self, rhs: &Volume<T>) -> Self::Output {
25096 Pressure{Pa: self.Nm / rhs.m3.clone()}
25097 }
25098}
25099impl<T> core::ops::Div<&Volume<T>> for &Torque<T> where T: NumLike {
25101 type Output = Pressure<T>;
25102 fn div(self, rhs: &Volume<T>) -> Self::Output {
25103 Pressure{Pa: self.Nm.clone() / rhs.m3.clone()}
25104 }
25105}
25106
25107impl<T> core::ops::Div<Force<T>> for Torque<T> where T: NumLike {
25110 type Output = Distance<T>;
25111 fn div(self, rhs: Force<T>) -> Self::Output {
25112 Distance{m: self.Nm / rhs.N}
25113 }
25114}
25115impl<T> core::ops::Div<Force<T>> for &Torque<T> where T: NumLike {
25117 type Output = Distance<T>;
25118 fn div(self, rhs: Force<T>) -> Self::Output {
25119 Distance{m: self.Nm.clone() / rhs.N}
25120 }
25121}
25122impl<T> core::ops::Div<&Force<T>> for Torque<T> where T: NumLike {
25124 type Output = Distance<T>;
25125 fn div(self, rhs: &Force<T>) -> Self::Output {
25126 Distance{m: self.Nm / rhs.N.clone()}
25127 }
25128}
25129impl<T> core::ops::Div<&Force<T>> for &Torque<T> where T: NumLike {
25131 type Output = Distance<T>;
25132 fn div(self, rhs: &Force<T>) -> Self::Output {
25133 Distance{m: self.Nm.clone() / rhs.N.clone()}
25134 }
25135}
25136
25137impl<T> core::ops::Mul<Frequency<T>> for Torque<T> where T: NumLike {
25140 type Output = Power<T>;
25141 fn mul(self, rhs: Frequency<T>) -> Self::Output {
25142 Power{W: self.Nm * rhs.Hz}
25143 }
25144}
25145impl<T> core::ops::Mul<Frequency<T>> for &Torque<T> where T: NumLike {
25147 type Output = Power<T>;
25148 fn mul(self, rhs: Frequency<T>) -> Self::Output {
25149 Power{W: self.Nm.clone() * rhs.Hz}
25150 }
25151}
25152impl<T> core::ops::Mul<&Frequency<T>> for Torque<T> where T: NumLike {
25154 type Output = Power<T>;
25155 fn mul(self, rhs: &Frequency<T>) -> Self::Output {
25156 Power{W: self.Nm * rhs.Hz.clone()}
25157 }
25158}
25159impl<T> core::ops::Mul<&Frequency<T>> for &Torque<T> where T: NumLike {
25161 type Output = Power<T>;
25162 fn mul(self, rhs: &Frequency<T>) -> Self::Output {
25163 Power{W: self.Nm.clone() * rhs.Hz.clone()}
25164 }
25165}
25166
25167impl<T> core::ops::Mul<InverseForce<T>> for Torque<T> where T: NumLike {
25170 type Output = Distance<T>;
25171 fn mul(self, rhs: InverseForce<T>) -> Self::Output {
25172 Distance{m: self.Nm * rhs.per_N}
25173 }
25174}
25175impl<T> core::ops::Mul<InverseForce<T>> for &Torque<T> where T: NumLike {
25177 type Output = Distance<T>;
25178 fn mul(self, rhs: InverseForce<T>) -> Self::Output {
25179 Distance{m: self.Nm.clone() * rhs.per_N}
25180 }
25181}
25182impl<T> core::ops::Mul<&InverseForce<T>> for Torque<T> where T: NumLike {
25184 type Output = Distance<T>;
25185 fn mul(self, rhs: &InverseForce<T>) -> Self::Output {
25186 Distance{m: self.Nm * rhs.per_N.clone()}
25187 }
25188}
25189impl<T> core::ops::Mul<&InverseForce<T>> for &Torque<T> where T: NumLike {
25191 type Output = Distance<T>;
25192 fn mul(self, rhs: &InverseForce<T>) -> Self::Output {
25193 Distance{m: self.Nm.clone() * rhs.per_N.clone()}
25194 }
25195}
25196
25197impl<T> core::ops::Mul<InverseMomentum<T>> for Torque<T> where T: NumLike {
25200 type Output = Velocity<T>;
25201 fn mul(self, rhs: InverseMomentum<T>) -> Self::Output {
25202 Velocity{mps: self.Nm * rhs.s_per_kgm}
25203 }
25204}
25205impl<T> core::ops::Mul<InverseMomentum<T>> for &Torque<T> where T: NumLike {
25207 type Output = Velocity<T>;
25208 fn mul(self, rhs: InverseMomentum<T>) -> Self::Output {
25209 Velocity{mps: self.Nm.clone() * rhs.s_per_kgm}
25210 }
25211}
25212impl<T> core::ops::Mul<&InverseMomentum<T>> for Torque<T> where T: NumLike {
25214 type Output = Velocity<T>;
25215 fn mul(self, rhs: &InverseMomentum<T>) -> Self::Output {
25216 Velocity{mps: self.Nm * rhs.s_per_kgm.clone()}
25217 }
25218}
25219impl<T> core::ops::Mul<&InverseMomentum<T>> for &Torque<T> where T: NumLike {
25221 type Output = Velocity<T>;
25222 fn mul(self, rhs: &InverseMomentum<T>) -> Self::Output {
25223 Velocity{mps: self.Nm.clone() * rhs.s_per_kgm.clone()}
25224 }
25225}
25226
25227impl<T> core::ops::Mul<InversePower<T>> for Torque<T> where T: NumLike {
25230 type Output = Time<T>;
25231 fn mul(self, rhs: InversePower<T>) -> Self::Output {
25232 Time{s: self.Nm * rhs.per_W}
25233 }
25234}
25235impl<T> core::ops::Mul<InversePower<T>> for &Torque<T> where T: NumLike {
25237 type Output = Time<T>;
25238 fn mul(self, rhs: InversePower<T>) -> Self::Output {
25239 Time{s: self.Nm.clone() * rhs.per_W}
25240 }
25241}
25242impl<T> core::ops::Mul<&InversePower<T>> for Torque<T> where T: NumLike {
25244 type Output = Time<T>;
25245 fn mul(self, rhs: &InversePower<T>) -> Self::Output {
25246 Time{s: self.Nm * rhs.per_W.clone()}
25247 }
25248}
25249impl<T> core::ops::Mul<&InversePower<T>> for &Torque<T> where T: NumLike {
25251 type Output = Time<T>;
25252 fn mul(self, rhs: &InversePower<T>) -> Self::Output {
25253 Time{s: self.Nm.clone() * rhs.per_W.clone()}
25254 }
25255}
25256
25257impl<T> core::ops::Mul<InversePressure<T>> for Torque<T> where T: NumLike {
25260 type Output = Volume<T>;
25261 fn mul(self, rhs: InversePressure<T>) -> Self::Output {
25262 Volume{m3: self.Nm * rhs.per_Pa}
25263 }
25264}
25265impl<T> core::ops::Mul<InversePressure<T>> for &Torque<T> where T: NumLike {
25267 type Output = Volume<T>;
25268 fn mul(self, rhs: InversePressure<T>) -> Self::Output {
25269 Volume{m3: self.Nm.clone() * rhs.per_Pa}
25270 }
25271}
25272impl<T> core::ops::Mul<&InversePressure<T>> for Torque<T> where T: NumLike {
25274 type Output = Volume<T>;
25275 fn mul(self, rhs: &InversePressure<T>) -> Self::Output {
25276 Volume{m3: self.Nm * rhs.per_Pa.clone()}
25277 }
25278}
25279impl<T> core::ops::Mul<&InversePressure<T>> for &Torque<T> where T: NumLike {
25281 type Output = Volume<T>;
25282 fn mul(self, rhs: &InversePressure<T>) -> Self::Output {
25283 Volume{m3: self.Nm.clone() * rhs.per_Pa.clone()}
25284 }
25285}
25286
25287impl<T> core::ops::Div<Momentum<T>> for Torque<T> where T: NumLike {
25290 type Output = Velocity<T>;
25291 fn div(self, rhs: Momentum<T>) -> Self::Output {
25292 Velocity{mps: self.Nm / rhs.kgmps}
25293 }
25294}
25295impl<T> core::ops::Div<Momentum<T>> for &Torque<T> where T: NumLike {
25297 type Output = Velocity<T>;
25298 fn div(self, rhs: Momentum<T>) -> Self::Output {
25299 Velocity{mps: self.Nm.clone() / rhs.kgmps}
25300 }
25301}
25302impl<T> core::ops::Div<&Momentum<T>> for Torque<T> where T: NumLike {
25304 type Output = Velocity<T>;
25305 fn div(self, rhs: &Momentum<T>) -> Self::Output {
25306 Velocity{mps: self.Nm / rhs.kgmps.clone()}
25307 }
25308}
25309impl<T> core::ops::Div<&Momentum<T>> for &Torque<T> where T: NumLike {
25311 type Output = Velocity<T>;
25312 fn div(self, rhs: &Momentum<T>) -> Self::Output {
25313 Velocity{mps: self.Nm.clone() / rhs.kgmps.clone()}
25314 }
25315}
25316
25317impl<T> core::ops::Div<Power<T>> for Torque<T> where T: NumLike {
25320 type Output = Time<T>;
25321 fn div(self, rhs: Power<T>) -> Self::Output {
25322 Time{s: self.Nm / rhs.W}
25323 }
25324}
25325impl<T> core::ops::Div<Power<T>> for &Torque<T> where T: NumLike {
25327 type Output = Time<T>;
25328 fn div(self, rhs: Power<T>) -> Self::Output {
25329 Time{s: self.Nm.clone() / rhs.W}
25330 }
25331}
25332impl<T> core::ops::Div<&Power<T>> for Torque<T> where T: NumLike {
25334 type Output = Time<T>;
25335 fn div(self, rhs: &Power<T>) -> Self::Output {
25336 Time{s: self.Nm / rhs.W.clone()}
25337 }
25338}
25339impl<T> core::ops::Div<&Power<T>> for &Torque<T> where T: NumLike {
25341 type Output = Time<T>;
25342 fn div(self, rhs: &Power<T>) -> Self::Output {
25343 Time{s: self.Nm.clone() / rhs.W.clone()}
25344 }
25345}
25346
25347impl<T> core::ops::Div<Pressure<T>> for Torque<T> where T: NumLike {
25350 type Output = Volume<T>;
25351 fn div(self, rhs: Pressure<T>) -> Self::Output {
25352 Volume{m3: self.Nm / rhs.Pa}
25353 }
25354}
25355impl<T> core::ops::Div<Pressure<T>> for &Torque<T> where T: NumLike {
25357 type Output = Volume<T>;
25358 fn div(self, rhs: Pressure<T>) -> Self::Output {
25359 Volume{m3: self.Nm.clone() / rhs.Pa}
25360 }
25361}
25362impl<T> core::ops::Div<&Pressure<T>> for Torque<T> where T: NumLike {
25364 type Output = Volume<T>;
25365 fn div(self, rhs: &Pressure<T>) -> Self::Output {
25366 Volume{m3: self.Nm / rhs.Pa.clone()}
25367 }
25368}
25369impl<T> core::ops::Div<&Pressure<T>> for &Torque<T> where T: NumLike {
25371 type Output = Volume<T>;
25372 fn div(self, rhs: &Pressure<T>) -> Self::Output {
25373 Volume{m3: self.Nm.clone() / rhs.Pa.clone()}
25374 }
25375}
25376
25377impl<T> core::ops::Mul<TimePerDistance<T>> for Torque<T> where T: NumLike {
25380 type Output = Momentum<T>;
25381 fn mul(self, rhs: TimePerDistance<T>) -> Self::Output {
25382 Momentum{kgmps: self.Nm * rhs.spm}
25383 }
25384}
25385impl<T> core::ops::Mul<TimePerDistance<T>> for &Torque<T> where T: NumLike {
25387 type Output = Momentum<T>;
25388 fn mul(self, rhs: TimePerDistance<T>) -> Self::Output {
25389 Momentum{kgmps: self.Nm.clone() * rhs.spm}
25390 }
25391}
25392impl<T> core::ops::Mul<&TimePerDistance<T>> for Torque<T> where T: NumLike {
25394 type Output = Momentum<T>;
25395 fn mul(self, rhs: &TimePerDistance<T>) -> Self::Output {
25396 Momentum{kgmps: self.Nm * rhs.spm.clone()}
25397 }
25398}
25399impl<T> core::ops::Mul<&TimePerDistance<T>> for &Torque<T> where T: NumLike {
25401 type Output = Momentum<T>;
25402 fn mul(self, rhs: &TimePerDistance<T>) -> Self::Output {
25403 Momentum{kgmps: self.Nm.clone() * rhs.spm.clone()}
25404 }
25405}
25406
25407impl<T> core::ops::Div<Velocity<T>> for Torque<T> where T: NumLike {
25410 type Output = Momentum<T>;
25411 fn div(self, rhs: Velocity<T>) -> Self::Output {
25412 Momentum{kgmps: self.Nm / rhs.mps}
25413 }
25414}
25415impl<T> core::ops::Div<Velocity<T>> for &Torque<T> where T: NumLike {
25417 type Output = Momentum<T>;
25418 fn div(self, rhs: Velocity<T>) -> Self::Output {
25419 Momentum{kgmps: self.Nm.clone() / rhs.mps}
25420 }
25421}
25422impl<T> core::ops::Div<&Velocity<T>> for Torque<T> where T: NumLike {
25424 type Output = Momentum<T>;
25425 fn div(self, rhs: &Velocity<T>) -> Self::Output {
25426 Momentum{kgmps: self.Nm / rhs.mps.clone()}
25427 }
25428}
25429impl<T> core::ops::Div<&Velocity<T>> for &Torque<T> where T: NumLike {
25431 type Output = Momentum<T>;
25432 fn div(self, rhs: &Velocity<T>) -> Self::Output {
25433 Momentum{kgmps: self.Nm.clone() / rhs.mps.clone()}
25434 }
25435}
25436
25437impl<T> core::ops::Mul<InverseAbsorbedDose<T>> for Torque<T> where T: NumLike {
25440 type Output = Mass<T>;
25441 fn mul(self, rhs: InverseAbsorbedDose<T>) -> Self::Output {
25442 Mass{kg: self.Nm * rhs.per_Gy}
25443 }
25444}
25445impl<T> core::ops::Mul<InverseAbsorbedDose<T>> for &Torque<T> where T: NumLike {
25447 type Output = Mass<T>;
25448 fn mul(self, rhs: InverseAbsorbedDose<T>) -> Self::Output {
25449 Mass{kg: self.Nm.clone() * rhs.per_Gy}
25450 }
25451}
25452impl<T> core::ops::Mul<&InverseAbsorbedDose<T>> for Torque<T> where T: NumLike {
25454 type Output = Mass<T>;
25455 fn mul(self, rhs: &InverseAbsorbedDose<T>) -> Self::Output {
25456 Mass{kg: self.Nm * rhs.per_Gy.clone()}
25457 }
25458}
25459impl<T> core::ops::Mul<&InverseAbsorbedDose<T>> for &Torque<T> where T: NumLike {
25461 type Output = Mass<T>;
25462 fn mul(self, rhs: &InverseAbsorbedDose<T>) -> Self::Output {
25463 Mass{kg: self.Nm.clone() * rhs.per_Gy.clone()}
25464 }
25465}
25466
25467impl<T> core::ops::Mul<InverseDoseEquivalent<T>> for Torque<T> where T: NumLike {
25470 type Output = Mass<T>;
25471 fn mul(self, rhs: InverseDoseEquivalent<T>) -> Self::Output {
25472 Mass{kg: self.Nm * rhs.per_Sv}
25473 }
25474}
25475impl<T> core::ops::Mul<InverseDoseEquivalent<T>> for &Torque<T> where T: NumLike {
25477 type Output = Mass<T>;
25478 fn mul(self, rhs: InverseDoseEquivalent<T>) -> Self::Output {
25479 Mass{kg: self.Nm.clone() * rhs.per_Sv}
25480 }
25481}
25482impl<T> core::ops::Mul<&InverseDoseEquivalent<T>> for Torque<T> where T: NumLike {
25484 type Output = Mass<T>;
25485 fn mul(self, rhs: &InverseDoseEquivalent<T>) -> Self::Output {
25486 Mass{kg: self.Nm * rhs.per_Sv.clone()}
25487 }
25488}
25489impl<T> core::ops::Mul<&InverseDoseEquivalent<T>> for &Torque<T> where T: NumLike {
25491 type Output = Mass<T>;
25492 fn mul(self, rhs: &InverseDoseEquivalent<T>) -> Self::Output {
25493 Mass{kg: self.Nm.clone() * rhs.per_Sv.clone()}
25494 }
25495}
25496
25497impl<T> core::ops::Div<Torque<T>> for f64 where T: NumLike+From<f64> {
25500 type Output = InverseEnergy<T>;
25501 fn div(self, rhs: Torque<T>) -> Self::Output {
25502 InverseEnergy{per_J: T::from(self) / rhs.Nm}
25503 }
25504}
25505impl<T> core::ops::Div<Torque<T>> for &f64 where T: NumLike+From<f64> {
25507 type Output = InverseEnergy<T>;
25508 fn div(self, rhs: Torque<T>) -> Self::Output {
25509 InverseEnergy{per_J: T::from(self.clone()) / rhs.Nm}
25510 }
25511}
25512impl<T> core::ops::Div<&Torque<T>> for f64 where T: NumLike+From<f64> {
25514 type Output = InverseEnergy<T>;
25515 fn div(self, rhs: &Torque<T>) -> Self::Output {
25516 InverseEnergy{per_J: T::from(self) / rhs.Nm.clone()}
25517 }
25518}
25519impl<T> core::ops::Div<&Torque<T>> for &f64 where T: NumLike+From<f64> {
25521 type Output = InverseEnergy<T>;
25522 fn div(self, rhs: &Torque<T>) -> Self::Output {
25523 InverseEnergy{per_J: T::from(self.clone()) / rhs.Nm.clone()}
25524 }
25525}
25526
25527impl<T> core::ops::Div<Torque<T>> for f32 where T: NumLike+From<f32> {
25530 type Output = InverseEnergy<T>;
25531 fn div(self, rhs: Torque<T>) -> Self::Output {
25532 InverseEnergy{per_J: T::from(self) / rhs.Nm}
25533 }
25534}
25535impl<T> core::ops::Div<Torque<T>> for &f32 where T: NumLike+From<f32> {
25537 type Output = InverseEnergy<T>;
25538 fn div(self, rhs: Torque<T>) -> Self::Output {
25539 InverseEnergy{per_J: T::from(self.clone()) / rhs.Nm}
25540 }
25541}
25542impl<T> core::ops::Div<&Torque<T>> for f32 where T: NumLike+From<f32> {
25544 type Output = InverseEnergy<T>;
25545 fn div(self, rhs: &Torque<T>) -> Self::Output {
25546 InverseEnergy{per_J: T::from(self) / rhs.Nm.clone()}
25547 }
25548}
25549impl<T> core::ops::Div<&Torque<T>> for &f32 where T: NumLike+From<f32> {
25551 type Output = InverseEnergy<T>;
25552 fn div(self, rhs: &Torque<T>) -> Self::Output {
25553 InverseEnergy{per_J: T::from(self.clone()) / rhs.Nm.clone()}
25554 }
25555}
25556
25557impl<T> core::ops::Div<Torque<T>> for i64 where T: NumLike+From<i64> {
25560 type Output = InverseEnergy<T>;
25561 fn div(self, rhs: Torque<T>) -> Self::Output {
25562 InverseEnergy{per_J: T::from(self) / rhs.Nm}
25563 }
25564}
25565impl<T> core::ops::Div<Torque<T>> for &i64 where T: NumLike+From<i64> {
25567 type Output = InverseEnergy<T>;
25568 fn div(self, rhs: Torque<T>) -> Self::Output {
25569 InverseEnergy{per_J: T::from(self.clone()) / rhs.Nm}
25570 }
25571}
25572impl<T> core::ops::Div<&Torque<T>> for i64 where T: NumLike+From<i64> {
25574 type Output = InverseEnergy<T>;
25575 fn div(self, rhs: &Torque<T>) -> Self::Output {
25576 InverseEnergy{per_J: T::from(self) / rhs.Nm.clone()}
25577 }
25578}
25579impl<T> core::ops::Div<&Torque<T>> for &i64 where T: NumLike+From<i64> {
25581 type Output = InverseEnergy<T>;
25582 fn div(self, rhs: &Torque<T>) -> Self::Output {
25583 InverseEnergy{per_J: T::from(self.clone()) / rhs.Nm.clone()}
25584 }
25585}
25586
25587impl<T> core::ops::Div<Torque<T>> for i32 where T: NumLike+From<i32> {
25590 type Output = InverseEnergy<T>;
25591 fn div(self, rhs: Torque<T>) -> Self::Output {
25592 InverseEnergy{per_J: T::from(self) / rhs.Nm}
25593 }
25594}
25595impl<T> core::ops::Div<Torque<T>> for &i32 where T: NumLike+From<i32> {
25597 type Output = InverseEnergy<T>;
25598 fn div(self, rhs: Torque<T>) -> Self::Output {
25599 InverseEnergy{per_J: T::from(self.clone()) / rhs.Nm}
25600 }
25601}
25602impl<T> core::ops::Div<&Torque<T>> for i32 where T: NumLike+From<i32> {
25604 type Output = InverseEnergy<T>;
25605 fn div(self, rhs: &Torque<T>) -> Self::Output {
25606 InverseEnergy{per_J: T::from(self) / rhs.Nm.clone()}
25607 }
25608}
25609impl<T> core::ops::Div<&Torque<T>> for &i32 where T: NumLike+From<i32> {
25611 type Output = InverseEnergy<T>;
25612 fn div(self, rhs: &Torque<T>) -> Self::Output {
25613 InverseEnergy{per_J: T::from(self.clone()) / rhs.Nm.clone()}
25614 }
25615}
25616
25617#[cfg(feature="num-bigfloat")]
25620impl<T> core::ops::Div<Torque<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
25621 type Output = InverseEnergy<T>;
25622 fn div(self, rhs: Torque<T>) -> Self::Output {
25623 InverseEnergy{per_J: T::from(self) / rhs.Nm}
25624 }
25625}
25626#[cfg(feature="num-bigfloat")]
25628impl<T> core::ops::Div<Torque<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
25629 type Output = InverseEnergy<T>;
25630 fn div(self, rhs: Torque<T>) -> Self::Output {
25631 InverseEnergy{per_J: T::from(self.clone()) / rhs.Nm}
25632 }
25633}
25634#[cfg(feature="num-bigfloat")]
25636impl<T> core::ops::Div<&Torque<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
25637 type Output = InverseEnergy<T>;
25638 fn div(self, rhs: &Torque<T>) -> Self::Output {
25639 InverseEnergy{per_J: T::from(self) / rhs.Nm.clone()}
25640 }
25641}
25642#[cfg(feature="num-bigfloat")]
25644impl<T> core::ops::Div<&Torque<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
25645 type Output = InverseEnergy<T>;
25646 fn div(self, rhs: &Torque<T>) -> Self::Output {
25647 InverseEnergy{per_J: T::from(self.clone()) / rhs.Nm.clone()}
25648 }
25649}
25650
25651#[cfg(feature="num-complex")]
25654impl<T> core::ops::Div<Torque<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
25655 type Output = InverseEnergy<T>;
25656 fn div(self, rhs: Torque<T>) -> Self::Output {
25657 InverseEnergy{per_J: T::from(self) / rhs.Nm}
25658 }
25659}
25660#[cfg(feature="num-complex")]
25662impl<T> core::ops::Div<Torque<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
25663 type Output = InverseEnergy<T>;
25664 fn div(self, rhs: Torque<T>) -> Self::Output {
25665 InverseEnergy{per_J: T::from(self.clone()) / rhs.Nm}
25666 }
25667}
25668#[cfg(feature="num-complex")]
25670impl<T> core::ops::Div<&Torque<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
25671 type Output = InverseEnergy<T>;
25672 fn div(self, rhs: &Torque<T>) -> Self::Output {
25673 InverseEnergy{per_J: T::from(self) / rhs.Nm.clone()}
25674 }
25675}
25676#[cfg(feature="num-complex")]
25678impl<T> core::ops::Div<&Torque<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
25679 type Output = InverseEnergy<T>;
25680 fn div(self, rhs: &Torque<T>) -> Self::Output {
25681 InverseEnergy{per_J: T::from(self.clone()) / rhs.Nm.clone()}
25682 }
25683}
25684
25685#[cfg(feature="num-complex")]
25688impl<T> core::ops::Div<Torque<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
25689 type Output = InverseEnergy<T>;
25690 fn div(self, rhs: Torque<T>) -> Self::Output {
25691 InverseEnergy{per_J: T::from(self) / rhs.Nm}
25692 }
25693}
25694#[cfg(feature="num-complex")]
25696impl<T> core::ops::Div<Torque<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
25697 type Output = InverseEnergy<T>;
25698 fn div(self, rhs: Torque<T>) -> Self::Output {
25699 InverseEnergy{per_J: T::from(self.clone()) / rhs.Nm}
25700 }
25701}
25702#[cfg(feature="num-complex")]
25704impl<T> core::ops::Div<&Torque<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
25705 type Output = InverseEnergy<T>;
25706 fn div(self, rhs: &Torque<T>) -> Self::Output {
25707 InverseEnergy{per_J: T::from(self) / rhs.Nm.clone()}
25708 }
25709}
25710#[cfg(feature="num-complex")]
25712impl<T> core::ops::Div<&Torque<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
25713 type Output = InverseEnergy<T>;
25714 fn div(self, rhs: &Torque<T>) -> Self::Output {
25715 InverseEnergy{per_J: T::from(self.clone()) / rhs.Nm.clone()}
25716 }
25717}
25718
25719#[derive(UnitStruct, Debug, Clone)]
25721#[cfg_attr(feature="serde", derive(Serialize, Deserialize))]
25722pub struct Velocity<T: NumLike>{
25723 pub mps: T
25725}
25726
25727impl<T> Velocity<T> where T: NumLike {
25728
25729 pub fn unit_name() -> &'static str { "meters per second" }
25731
25732 pub fn unit_symbol() -> &'static str { "m/s" }
25734
25735 pub fn from_mps(mps: T) -> Self { Velocity{mps: mps} }
25740
25741 pub fn to_mps(&self) -> T { self.mps.clone() }
25743
25744 pub fn from_meters_per_second(meters_per_second: T) -> Self { Velocity{mps: meters_per_second} }
25749
25750 pub fn to_meters_per_second(&self) -> T { self.mps.clone() }
25752
25753}
25754
25755impl<T> fmt::Display for Velocity<T> where T: NumLike {
25756 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
25757 write!(f, "{} {}", &self.mps, Self::unit_symbol())
25758 }
25759}
25760
25761impl<T> Velocity<T> where T: NumLike+From<f64> {
25762
25763 pub fn to_cmps(&self) -> T {
25767 return self.mps.clone() * T::from(100.0_f64);
25768 }
25769
25770 pub fn from_cmps(cmps: T) -> Self {
25777 Velocity{mps: cmps * T::from(0.01_f64)}
25778 }
25779
25780 pub fn to_mmps(&self) -> T {
25784 return self.mps.clone() * T::from(1000.0_f64);
25785 }
25786
25787 pub fn from_mmps(mmps: T) -> Self {
25794 Velocity{mps: mmps * T::from(0.001_f64)}
25795 }
25796
25797 pub fn to_mmph(&self) -> T {
25801 return self.mps.clone() * T::from(3600000.0_f64);
25802 }
25803
25804 pub fn from_mmph(mmph: T) -> Self {
25811 Velocity{mps: mmph * T::from(2.77777777777778e-07_f64)}
25812 }
25813
25814 pub fn to_kph(&self) -> T {
25818 return self.mps.clone() * T::from(3.6_f64);
25819 }
25820
25821 pub fn from_kph(kph: T) -> Self {
25828 Velocity{mps: kph * T::from(0.277777777777778_f64)}
25829 }
25830
25831 pub fn to_mph(&self) -> T {
25835 return self.mps.clone() * T::from(2.2369362920544_f64);
25836 }
25837
25838 pub fn from_mph(mph: T) -> Self {
25845 Velocity{mps: mph * T::from(0.44704_f64)}
25846 }
25847
25848 pub fn to_kmps(&self) -> T {
25852 return self.mps.clone() * T::from(0.001_f64);
25853 }
25854
25855 pub fn from_kmps(kmps: T) -> Self {
25862 Velocity{mps: kmps * T::from(1000.0_f64)}
25863 }
25864
25865 pub fn to_c(&self) -> T {
25869 return self.mps.clone() * T::from(3.3356409519815204e-09_f64);
25870 }
25871
25872 pub fn from_c(c: T) -> Self {
25879 Velocity{mps: c * T::from(299792458.0_f64)}
25880 }
25881
25882}
25883
25884
25885#[cfg(feature="num-bigfloat")]
25887impl core::ops::Mul<Velocity<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
25888 type Output = Velocity<num_bigfloat::BigFloat>;
25889 fn mul(self, rhs: Velocity<num_bigfloat::BigFloat>) -> Self::Output {
25890 Velocity{mps: self * rhs.mps}
25891 }
25892}
25893#[cfg(feature="num-bigfloat")]
25895impl core::ops::Mul<Velocity<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
25896 type Output = Velocity<num_bigfloat::BigFloat>;
25897 fn mul(self, rhs: Velocity<num_bigfloat::BigFloat>) -> Self::Output {
25898 Velocity{mps: self.clone() * rhs.mps}
25899 }
25900}
25901#[cfg(feature="num-bigfloat")]
25903impl core::ops::Mul<&Velocity<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
25904 type Output = Velocity<num_bigfloat::BigFloat>;
25905 fn mul(self, rhs: &Velocity<num_bigfloat::BigFloat>) -> Self::Output {
25906 Velocity{mps: self * rhs.mps.clone()}
25907 }
25908}
25909#[cfg(feature="num-bigfloat")]
25911impl core::ops::Mul<&Velocity<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
25912 type Output = Velocity<num_bigfloat::BigFloat>;
25913 fn mul(self, rhs: &Velocity<num_bigfloat::BigFloat>) -> Self::Output {
25914 Velocity{mps: self.clone() * rhs.mps.clone()}
25915 }
25916}
25917
25918#[cfg(feature="num-complex")]
25920impl core::ops::Mul<Velocity<num_complex::Complex32>> for num_complex::Complex32 {
25921 type Output = Velocity<num_complex::Complex32>;
25922 fn mul(self, rhs: Velocity<num_complex::Complex32>) -> Self::Output {
25923 Velocity{mps: self * rhs.mps}
25924 }
25925}
25926#[cfg(feature="num-complex")]
25928impl core::ops::Mul<Velocity<num_complex::Complex32>> for &num_complex::Complex32 {
25929 type Output = Velocity<num_complex::Complex32>;
25930 fn mul(self, rhs: Velocity<num_complex::Complex32>) -> Self::Output {
25931 Velocity{mps: self.clone() * rhs.mps}
25932 }
25933}
25934#[cfg(feature="num-complex")]
25936impl core::ops::Mul<&Velocity<num_complex::Complex32>> for num_complex::Complex32 {
25937 type Output = Velocity<num_complex::Complex32>;
25938 fn mul(self, rhs: &Velocity<num_complex::Complex32>) -> Self::Output {
25939 Velocity{mps: self * rhs.mps.clone()}
25940 }
25941}
25942#[cfg(feature="num-complex")]
25944impl core::ops::Mul<&Velocity<num_complex::Complex32>> for &num_complex::Complex32 {
25945 type Output = Velocity<num_complex::Complex32>;
25946 fn mul(self, rhs: &Velocity<num_complex::Complex32>) -> Self::Output {
25947 Velocity{mps: self.clone() * rhs.mps.clone()}
25948 }
25949}
25950
25951#[cfg(feature="num-complex")]
25953impl core::ops::Mul<Velocity<num_complex::Complex64>> for num_complex::Complex64 {
25954 type Output = Velocity<num_complex::Complex64>;
25955 fn mul(self, rhs: Velocity<num_complex::Complex64>) -> Self::Output {
25956 Velocity{mps: self * rhs.mps}
25957 }
25958}
25959#[cfg(feature="num-complex")]
25961impl core::ops::Mul<Velocity<num_complex::Complex64>> for &num_complex::Complex64 {
25962 type Output = Velocity<num_complex::Complex64>;
25963 fn mul(self, rhs: Velocity<num_complex::Complex64>) -> Self::Output {
25964 Velocity{mps: self.clone() * rhs.mps}
25965 }
25966}
25967#[cfg(feature="num-complex")]
25969impl core::ops::Mul<&Velocity<num_complex::Complex64>> for num_complex::Complex64 {
25970 type Output = Velocity<num_complex::Complex64>;
25971 fn mul(self, rhs: &Velocity<num_complex::Complex64>) -> Self::Output {
25972 Velocity{mps: self * rhs.mps.clone()}
25973 }
25974}
25975#[cfg(feature="num-complex")]
25977impl core::ops::Mul<&Velocity<num_complex::Complex64>> for &num_complex::Complex64 {
25978 type Output = Velocity<num_complex::Complex64>;
25979 fn mul(self, rhs: &Velocity<num_complex::Complex64>) -> Self::Output {
25980 Velocity{mps: self.clone() * rhs.mps.clone()}
25981 }
25982}
25983
25984
25985
25986#[cfg(feature = "uom")]
25988impl<T> Into<uom::si::f32::Velocity> for Velocity<T> where T: NumLike+Into<f32> {
25989 fn into(self) -> uom::si::f32::Velocity {
25990 uom::si::f32::Velocity::new::<uom::si::velocity::meter_per_second>(self.mps.into())
25991 }
25992}
25993
25994#[cfg(feature = "uom")]
25996impl<T> From<uom::si::f32::Velocity> for Velocity<T> where T: NumLike+From<f32> {
25997 fn from(src: uom::si::f32::Velocity) -> Self {
25998 Velocity{mps: T::from(src.value)}
25999 }
26000}
26001
26002#[cfg(feature = "uom")]
26004impl<T> Into<uom::si::f64::Velocity> for Velocity<T> where T: NumLike+Into<f64> {
26005 fn into(self) -> uom::si::f64::Velocity {
26006 uom::si::f64::Velocity::new::<uom::si::velocity::meter_per_second>(self.mps.into())
26007 }
26008}
26009
26010#[cfg(feature = "uom")]
26012impl<T> From<uom::si::f64::Velocity> for Velocity<T> where T: NumLike+From<f64> {
26013 fn from(src: uom::si::f64::Velocity) -> Self {
26014 Velocity{mps: T::from(src.value)}
26015 }
26016}
26017
26018
26019impl<T> core::ops::Div<Distance<T>> for Velocity<T> where T: NumLike {
26022 type Output = Frequency<T>;
26023 fn div(self, rhs: Distance<T>) -> Self::Output {
26024 Frequency{Hz: self.mps / rhs.m}
26025 }
26026}
26027impl<T> core::ops::Div<Distance<T>> for &Velocity<T> where T: NumLike {
26029 type Output = Frequency<T>;
26030 fn div(self, rhs: Distance<T>) -> Self::Output {
26031 Frequency{Hz: self.mps.clone() / rhs.m}
26032 }
26033}
26034impl<T> core::ops::Div<&Distance<T>> for Velocity<T> where T: NumLike {
26036 type Output = Frequency<T>;
26037 fn div(self, rhs: &Distance<T>) -> Self::Output {
26038 Frequency{Hz: self.mps / rhs.m.clone()}
26039 }
26040}
26041impl<T> core::ops::Div<&Distance<T>> for &Velocity<T> where T: NumLike {
26043 type Output = Frequency<T>;
26044 fn div(self, rhs: &Distance<T>) -> Self::Output {
26045 Frequency{Hz: self.mps.clone() / rhs.m.clone()}
26046 }
26047}
26048
26049impl<T> core::ops::Mul<InverseDistance<T>> for Velocity<T> where T: NumLike {
26052 type Output = Frequency<T>;
26053 fn mul(self, rhs: InverseDistance<T>) -> Self::Output {
26054 Frequency{Hz: self.mps * rhs.per_m}
26055 }
26056}
26057impl<T> core::ops::Mul<InverseDistance<T>> for &Velocity<T> where T: NumLike {
26059 type Output = Frequency<T>;
26060 fn mul(self, rhs: InverseDistance<T>) -> Self::Output {
26061 Frequency{Hz: self.mps.clone() * rhs.per_m}
26062 }
26063}
26064impl<T> core::ops::Mul<&InverseDistance<T>> for Velocity<T> where T: NumLike {
26066 type Output = Frequency<T>;
26067 fn mul(self, rhs: &InverseDistance<T>) -> Self::Output {
26068 Frequency{Hz: self.mps * rhs.per_m.clone()}
26069 }
26070}
26071impl<T> core::ops::Mul<&InverseDistance<T>> for &Velocity<T> where T: NumLike {
26073 type Output = Frequency<T>;
26074 fn mul(self, rhs: &InverseDistance<T>) -> Self::Output {
26075 Frequency{Hz: self.mps.clone() * rhs.per_m.clone()}
26076 }
26077}
26078
26079impl<T> core::ops::Div<InverseMass<T>> for Velocity<T> where T: NumLike {
26082 type Output = Momentum<T>;
26083 fn div(self, rhs: InverseMass<T>) -> Self::Output {
26084 Momentum{kgmps: self.mps / rhs.per_kg}
26085 }
26086}
26087impl<T> core::ops::Div<InverseMass<T>> for &Velocity<T> where T: NumLike {
26089 type Output = Momentum<T>;
26090 fn div(self, rhs: InverseMass<T>) -> Self::Output {
26091 Momentum{kgmps: self.mps.clone() / rhs.per_kg}
26092 }
26093}
26094impl<T> core::ops::Div<&InverseMass<T>> for Velocity<T> where T: NumLike {
26096 type Output = Momentum<T>;
26097 fn div(self, rhs: &InverseMass<T>) -> Self::Output {
26098 Momentum{kgmps: self.mps / rhs.per_kg.clone()}
26099 }
26100}
26101impl<T> core::ops::Div<&InverseMass<T>> for &Velocity<T> where T: NumLike {
26103 type Output = Momentum<T>;
26104 fn div(self, rhs: &InverseMass<T>) -> Self::Output {
26105 Momentum{kgmps: self.mps.clone() / rhs.per_kg.clone()}
26106 }
26107}
26108
26109impl<T> core::ops::Mul<Mass<T>> for Velocity<T> where T: NumLike {
26112 type Output = Momentum<T>;
26113 fn mul(self, rhs: Mass<T>) -> Self::Output {
26114 Momentum{kgmps: self.mps * rhs.kg}
26115 }
26116}
26117impl<T> core::ops::Mul<Mass<T>> for &Velocity<T> where T: NumLike {
26119 type Output = Momentum<T>;
26120 fn mul(self, rhs: Mass<T>) -> Self::Output {
26121 Momentum{kgmps: self.mps.clone() * rhs.kg}
26122 }
26123}
26124impl<T> core::ops::Mul<&Mass<T>> for Velocity<T> where T: NumLike {
26126 type Output = Momentum<T>;
26127 fn mul(self, rhs: &Mass<T>) -> Self::Output {
26128 Momentum{kgmps: self.mps * rhs.kg.clone()}
26129 }
26130}
26131impl<T> core::ops::Mul<&Mass<T>> for &Velocity<T> where T: NumLike {
26133 type Output = Momentum<T>;
26134 fn mul(self, rhs: &Mass<T>) -> Self::Output {
26135 Momentum{kgmps: self.mps.clone() * rhs.kg.clone()}
26136 }
26137}
26138
26139impl<T> core::ops::Mul<Time<T>> for Velocity<T> where T: NumLike {
26142 type Output = Distance<T>;
26143 fn mul(self, rhs: Time<T>) -> Self::Output {
26144 Distance{m: self.mps * rhs.s}
26145 }
26146}
26147impl<T> core::ops::Mul<Time<T>> for &Velocity<T> where T: NumLike {
26149 type Output = Distance<T>;
26150 fn mul(self, rhs: Time<T>) -> Self::Output {
26151 Distance{m: self.mps.clone() * rhs.s}
26152 }
26153}
26154impl<T> core::ops::Mul<&Time<T>> for Velocity<T> where T: NumLike {
26156 type Output = Distance<T>;
26157 fn mul(self, rhs: &Time<T>) -> Self::Output {
26158 Distance{m: self.mps * rhs.s.clone()}
26159 }
26160}
26161impl<T> core::ops::Mul<&Time<T>> for &Velocity<T> where T: NumLike {
26163 type Output = Distance<T>;
26164 fn mul(self, rhs: &Time<T>) -> Self::Output {
26165 Distance{m: self.mps.clone() * rhs.s.clone()}
26166 }
26167}
26168
26169impl<T> core::ops::Div<Time<T>> for Velocity<T> where T: NumLike {
26172 type Output = Acceleration<T>;
26173 fn div(self, rhs: Time<T>) -> Self::Output {
26174 Acceleration{mps2: self.mps / rhs.s}
26175 }
26176}
26177impl<T> core::ops::Div<Time<T>> for &Velocity<T> where T: NumLike {
26179 type Output = Acceleration<T>;
26180 fn div(self, rhs: Time<T>) -> Self::Output {
26181 Acceleration{mps2: self.mps.clone() / rhs.s}
26182 }
26183}
26184impl<T> core::ops::Div<&Time<T>> for Velocity<T> where T: NumLike {
26186 type Output = Acceleration<T>;
26187 fn div(self, rhs: &Time<T>) -> Self::Output {
26188 Acceleration{mps2: self.mps / rhs.s.clone()}
26189 }
26190}
26191impl<T> core::ops::Div<&Time<T>> for &Velocity<T> where T: NumLike {
26193 type Output = Acceleration<T>;
26194 fn div(self, rhs: &Time<T>) -> Self::Output {
26195 Acceleration{mps2: self.mps.clone() / rhs.s.clone()}
26196 }
26197}
26198
26199impl<T> core::ops::Div<Acceleration<T>> for Velocity<T> where T: NumLike {
26202 type Output = Time<T>;
26203 fn div(self, rhs: Acceleration<T>) -> Self::Output {
26204 Time{s: self.mps / rhs.mps2}
26205 }
26206}
26207impl<T> core::ops::Div<Acceleration<T>> for &Velocity<T> where T: NumLike {
26209 type Output = Time<T>;
26210 fn div(self, rhs: Acceleration<T>) -> Self::Output {
26211 Time{s: self.mps.clone() / rhs.mps2}
26212 }
26213}
26214impl<T> core::ops::Div<&Acceleration<T>> for Velocity<T> where T: NumLike {
26216 type Output = Time<T>;
26217 fn div(self, rhs: &Acceleration<T>) -> Self::Output {
26218 Time{s: self.mps / rhs.mps2.clone()}
26219 }
26220}
26221impl<T> core::ops::Div<&Acceleration<T>> for &Velocity<T> where T: NumLike {
26223 type Output = Time<T>;
26224 fn div(self, rhs: &Acceleration<T>) -> Self::Output {
26225 Time{s: self.mps.clone() / rhs.mps2.clone()}
26226 }
26227}
26228
26229impl<T> core::ops::Div<Energy<T>> for Velocity<T> where T: NumLike {
26232 type Output = InverseMomentum<T>;
26233 fn div(self, rhs: Energy<T>) -> Self::Output {
26234 InverseMomentum{s_per_kgm: self.mps / rhs.J}
26235 }
26236}
26237impl<T> core::ops::Div<Energy<T>> for &Velocity<T> where T: NumLike {
26239 type Output = InverseMomentum<T>;
26240 fn div(self, rhs: Energy<T>) -> Self::Output {
26241 InverseMomentum{s_per_kgm: self.mps.clone() / rhs.J}
26242 }
26243}
26244impl<T> core::ops::Div<&Energy<T>> for Velocity<T> where T: NumLike {
26246 type Output = InverseMomentum<T>;
26247 fn div(self, rhs: &Energy<T>) -> Self::Output {
26248 InverseMomentum{s_per_kgm: self.mps / rhs.J.clone()}
26249 }
26250}
26251impl<T> core::ops::Div<&Energy<T>> for &Velocity<T> where T: NumLike {
26253 type Output = InverseMomentum<T>;
26254 fn div(self, rhs: &Energy<T>) -> Self::Output {
26255 InverseMomentum{s_per_kgm: self.mps.clone() / rhs.J.clone()}
26256 }
26257}
26258
26259impl<T> core::ops::Div<Torque<T>> for Velocity<T> where T: NumLike {
26262 type Output = InverseMomentum<T>;
26263 fn div(self, rhs: Torque<T>) -> Self::Output {
26264 InverseMomentum{s_per_kgm: self.mps / rhs.Nm}
26265 }
26266}
26267impl<T> core::ops::Div<Torque<T>> for &Velocity<T> where T: NumLike {
26269 type Output = InverseMomentum<T>;
26270 fn div(self, rhs: Torque<T>) -> Self::Output {
26271 InverseMomentum{s_per_kgm: self.mps.clone() / rhs.Nm}
26272 }
26273}
26274impl<T> core::ops::Div<&Torque<T>> for Velocity<T> where T: NumLike {
26276 type Output = InverseMomentum<T>;
26277 fn div(self, rhs: &Torque<T>) -> Self::Output {
26278 InverseMomentum{s_per_kgm: self.mps / rhs.Nm.clone()}
26279 }
26280}
26281impl<T> core::ops::Div<&Torque<T>> for &Velocity<T> where T: NumLike {
26283 type Output = InverseMomentum<T>;
26284 fn div(self, rhs: &Torque<T>) -> Self::Output {
26285 InverseMomentum{s_per_kgm: self.mps.clone() / rhs.Nm.clone()}
26286 }
26287}
26288
26289impl<T> core::ops::Mul<Force<T>> for Velocity<T> where T: NumLike {
26292 type Output = Power<T>;
26293 fn mul(self, rhs: Force<T>) -> Self::Output {
26294 Power{W: self.mps * rhs.N}
26295 }
26296}
26297impl<T> core::ops::Mul<Force<T>> for &Velocity<T> where T: NumLike {
26299 type Output = Power<T>;
26300 fn mul(self, rhs: Force<T>) -> Self::Output {
26301 Power{W: self.mps.clone() * rhs.N}
26302 }
26303}
26304impl<T> core::ops::Mul<&Force<T>> for Velocity<T> where T: NumLike {
26306 type Output = Power<T>;
26307 fn mul(self, rhs: &Force<T>) -> Self::Output {
26308 Power{W: self.mps * rhs.N.clone()}
26309 }
26310}
26311impl<T> core::ops::Mul<&Force<T>> for &Velocity<T> where T: NumLike {
26313 type Output = Power<T>;
26314 fn mul(self, rhs: &Force<T>) -> Self::Output {
26315 Power{W: self.mps.clone() * rhs.N.clone()}
26316 }
26317}
26318
26319impl<T> core::ops::Mul<Frequency<T>> for Velocity<T> where T: NumLike {
26322 type Output = Acceleration<T>;
26323 fn mul(self, rhs: Frequency<T>) -> Self::Output {
26324 Acceleration{mps2: self.mps * rhs.Hz}
26325 }
26326}
26327impl<T> core::ops::Mul<Frequency<T>> for &Velocity<T> where T: NumLike {
26329 type Output = Acceleration<T>;
26330 fn mul(self, rhs: Frequency<T>) -> Self::Output {
26331 Acceleration{mps2: self.mps.clone() * rhs.Hz}
26332 }
26333}
26334impl<T> core::ops::Mul<&Frequency<T>> for Velocity<T> where T: NumLike {
26336 type Output = Acceleration<T>;
26337 fn mul(self, rhs: &Frequency<T>) -> Self::Output {
26338 Acceleration{mps2: self.mps * rhs.Hz.clone()}
26339 }
26340}
26341impl<T> core::ops::Mul<&Frequency<T>> for &Velocity<T> where T: NumLike {
26343 type Output = Acceleration<T>;
26344 fn mul(self, rhs: &Frequency<T>) -> Self::Output {
26345 Acceleration{mps2: self.mps.clone() * rhs.Hz.clone()}
26346 }
26347}
26348
26349impl<T> core::ops::Div<Frequency<T>> for Velocity<T> where T: NumLike {
26352 type Output = Distance<T>;
26353 fn div(self, rhs: Frequency<T>) -> Self::Output {
26354 Distance{m: self.mps / rhs.Hz}
26355 }
26356}
26357impl<T> core::ops::Div<Frequency<T>> for &Velocity<T> where T: NumLike {
26359 type Output = Distance<T>;
26360 fn div(self, rhs: Frequency<T>) -> Self::Output {
26361 Distance{m: self.mps.clone() / rhs.Hz}
26362 }
26363}
26364impl<T> core::ops::Div<&Frequency<T>> for Velocity<T> where T: NumLike {
26366 type Output = Distance<T>;
26367 fn div(self, rhs: &Frequency<T>) -> Self::Output {
26368 Distance{m: self.mps / rhs.Hz.clone()}
26369 }
26370}
26371impl<T> core::ops::Div<&Frequency<T>> for &Velocity<T> where T: NumLike {
26373 type Output = Distance<T>;
26374 fn div(self, rhs: &Frequency<T>) -> Self::Output {
26375 Distance{m: self.mps.clone() / rhs.Hz.clone()}
26376 }
26377}
26378
26379impl<T> core::ops::Mul<InverseAcceleration<T>> for Velocity<T> where T: NumLike {
26382 type Output = Time<T>;
26383 fn mul(self, rhs: InverseAcceleration<T>) -> Self::Output {
26384 Time{s: self.mps * rhs.s2pm}
26385 }
26386}
26387impl<T> core::ops::Mul<InverseAcceleration<T>> for &Velocity<T> where T: NumLike {
26389 type Output = Time<T>;
26390 fn mul(self, rhs: InverseAcceleration<T>) -> Self::Output {
26391 Time{s: self.mps.clone() * rhs.s2pm}
26392 }
26393}
26394impl<T> core::ops::Mul<&InverseAcceleration<T>> for Velocity<T> where T: NumLike {
26396 type Output = Time<T>;
26397 fn mul(self, rhs: &InverseAcceleration<T>) -> Self::Output {
26398 Time{s: self.mps * rhs.s2pm.clone()}
26399 }
26400}
26401impl<T> core::ops::Mul<&InverseAcceleration<T>> for &Velocity<T> where T: NumLike {
26403 type Output = Time<T>;
26404 fn mul(self, rhs: &InverseAcceleration<T>) -> Self::Output {
26405 Time{s: self.mps.clone() * rhs.s2pm.clone()}
26406 }
26407}
26408
26409impl<T> core::ops::Mul<InverseEnergy<T>> for Velocity<T> where T: NumLike {
26412 type Output = InverseMomentum<T>;
26413 fn mul(self, rhs: InverseEnergy<T>) -> Self::Output {
26414 InverseMomentum{s_per_kgm: self.mps * rhs.per_J}
26415 }
26416}
26417impl<T> core::ops::Mul<InverseEnergy<T>> for &Velocity<T> where T: NumLike {
26419 type Output = InverseMomentum<T>;
26420 fn mul(self, rhs: InverseEnergy<T>) -> Self::Output {
26421 InverseMomentum{s_per_kgm: self.mps.clone() * rhs.per_J}
26422 }
26423}
26424impl<T> core::ops::Mul<&InverseEnergy<T>> for Velocity<T> where T: NumLike {
26426 type Output = InverseMomentum<T>;
26427 fn mul(self, rhs: &InverseEnergy<T>) -> Self::Output {
26428 InverseMomentum{s_per_kgm: self.mps * rhs.per_J.clone()}
26429 }
26430}
26431impl<T> core::ops::Mul<&InverseEnergy<T>> for &Velocity<T> where T: NumLike {
26433 type Output = InverseMomentum<T>;
26434 fn mul(self, rhs: &InverseEnergy<T>) -> Self::Output {
26435 InverseMomentum{s_per_kgm: self.mps.clone() * rhs.per_J.clone()}
26436 }
26437}
26438
26439impl<T> core::ops::Mul<InverseTorque<T>> for Velocity<T> where T: NumLike {
26442 type Output = InverseMomentum<T>;
26443 fn mul(self, rhs: InverseTorque<T>) -> Self::Output {
26444 InverseMomentum{s_per_kgm: self.mps * rhs.per_Nm}
26445 }
26446}
26447impl<T> core::ops::Mul<InverseTorque<T>> for &Velocity<T> where T: NumLike {
26449 type Output = InverseMomentum<T>;
26450 fn mul(self, rhs: InverseTorque<T>) -> Self::Output {
26451 InverseMomentum{s_per_kgm: self.mps.clone() * rhs.per_Nm}
26452 }
26453}
26454impl<T> core::ops::Mul<&InverseTorque<T>> for Velocity<T> where T: NumLike {
26456 type Output = InverseMomentum<T>;
26457 fn mul(self, rhs: &InverseTorque<T>) -> Self::Output {
26458 InverseMomentum{s_per_kgm: self.mps * rhs.per_Nm.clone()}
26459 }
26460}
26461impl<T> core::ops::Mul<&InverseTorque<T>> for &Velocity<T> where T: NumLike {
26463 type Output = InverseMomentum<T>;
26464 fn mul(self, rhs: &InverseTorque<T>) -> Self::Output {
26465 InverseMomentum{s_per_kgm: self.mps.clone() * rhs.per_Nm.clone()}
26466 }
26467}
26468
26469impl<T> core::ops::Div<InverseForce<T>> for Velocity<T> where T: NumLike {
26472 type Output = Power<T>;
26473 fn div(self, rhs: InverseForce<T>) -> Self::Output {
26474 Power{W: self.mps / rhs.per_N}
26475 }
26476}
26477impl<T> core::ops::Div<InverseForce<T>> for &Velocity<T> where T: NumLike {
26479 type Output = Power<T>;
26480 fn div(self, rhs: InverseForce<T>) -> Self::Output {
26481 Power{W: self.mps.clone() / rhs.per_N}
26482 }
26483}
26484impl<T> core::ops::Div<&InverseForce<T>> for Velocity<T> where T: NumLike {
26486 type Output = Power<T>;
26487 fn div(self, rhs: &InverseForce<T>) -> Self::Output {
26488 Power{W: self.mps / rhs.per_N.clone()}
26489 }
26490}
26491impl<T> core::ops::Div<&InverseForce<T>> for &Velocity<T> where T: NumLike {
26493 type Output = Power<T>;
26494 fn div(self, rhs: &InverseForce<T>) -> Self::Output {
26495 Power{W: self.mps.clone() / rhs.per_N.clone()}
26496 }
26497}
26498
26499impl<T> core::ops::Mul<InverseMomentum<T>> for Velocity<T> where T: NumLike {
26502 type Output = InverseMass<T>;
26503 fn mul(self, rhs: InverseMomentum<T>) -> Self::Output {
26504 InverseMass{per_kg: self.mps * rhs.s_per_kgm}
26505 }
26506}
26507impl<T> core::ops::Mul<InverseMomentum<T>> for &Velocity<T> where T: NumLike {
26509 type Output = InverseMass<T>;
26510 fn mul(self, rhs: InverseMomentum<T>) -> Self::Output {
26511 InverseMass{per_kg: self.mps.clone() * rhs.s_per_kgm}
26512 }
26513}
26514impl<T> core::ops::Mul<&InverseMomentum<T>> for Velocity<T> where T: NumLike {
26516 type Output = InverseMass<T>;
26517 fn mul(self, rhs: &InverseMomentum<T>) -> Self::Output {
26518 InverseMass{per_kg: self.mps * rhs.s_per_kgm.clone()}
26519 }
26520}
26521impl<T> core::ops::Mul<&InverseMomentum<T>> for &Velocity<T> where T: NumLike {
26523 type Output = InverseMass<T>;
26524 fn mul(self, rhs: &InverseMomentum<T>) -> Self::Output {
26525 InverseMass{per_kg: self.mps.clone() * rhs.s_per_kgm.clone()}
26526 }
26527}
26528
26529impl<T> core::ops::Div<InverseMomentum<T>> for Velocity<T> where T: NumLike {
26532 type Output = Energy<T>;
26533 fn div(self, rhs: InverseMomentum<T>) -> Self::Output {
26534 Energy{J: self.mps / rhs.s_per_kgm}
26535 }
26536}
26537impl<T> core::ops::Div<InverseMomentum<T>> for &Velocity<T> where T: NumLike {
26539 type Output = Energy<T>;
26540 fn div(self, rhs: InverseMomentum<T>) -> Self::Output {
26541 Energy{J: self.mps.clone() / rhs.s_per_kgm}
26542 }
26543}
26544impl<T> core::ops::Div<&InverseMomentum<T>> for Velocity<T> where T: NumLike {
26546 type Output = Energy<T>;
26547 fn div(self, rhs: &InverseMomentum<T>) -> Self::Output {
26548 Energy{J: self.mps / rhs.s_per_kgm.clone()}
26549 }
26550}
26551impl<T> core::ops::Div<&InverseMomentum<T>> for &Velocity<T> where T: NumLike {
26553 type Output = Energy<T>;
26554 fn div(self, rhs: &InverseMomentum<T>) -> Self::Output {
26555 Energy{J: self.mps.clone() / rhs.s_per_kgm.clone()}
26556 }
26557}
26558
26559impl<T> core::ops::Mul<InversePower<T>> for Velocity<T> where T: NumLike {
26562 type Output = InverseForce<T>;
26563 fn mul(self, rhs: InversePower<T>) -> Self::Output {
26564 InverseForce{per_N: self.mps * rhs.per_W}
26565 }
26566}
26567impl<T> core::ops::Mul<InversePower<T>> for &Velocity<T> where T: NumLike {
26569 type Output = InverseForce<T>;
26570 fn mul(self, rhs: InversePower<T>) -> Self::Output {
26571 InverseForce{per_N: self.mps.clone() * rhs.per_W}
26572 }
26573}
26574impl<T> core::ops::Mul<&InversePower<T>> for Velocity<T> where T: NumLike {
26576 type Output = InverseForce<T>;
26577 fn mul(self, rhs: &InversePower<T>) -> Self::Output {
26578 InverseForce{per_N: self.mps * rhs.per_W.clone()}
26579 }
26580}
26581impl<T> core::ops::Mul<&InversePower<T>> for &Velocity<T> where T: NumLike {
26583 type Output = InverseForce<T>;
26584 fn mul(self, rhs: &InversePower<T>) -> Self::Output {
26585 InverseForce{per_N: self.mps.clone() * rhs.per_W.clone()}
26586 }
26587}
26588
26589impl<T> core::ops::Mul<Momentum<T>> for Velocity<T> where T: NumLike {
26592 type Output = Energy<T>;
26593 fn mul(self, rhs: Momentum<T>) -> Self::Output {
26594 Energy{J: self.mps * rhs.kgmps}
26595 }
26596}
26597impl<T> core::ops::Mul<Momentum<T>> for &Velocity<T> where T: NumLike {
26599 type Output = Energy<T>;
26600 fn mul(self, rhs: Momentum<T>) -> Self::Output {
26601 Energy{J: self.mps.clone() * rhs.kgmps}
26602 }
26603}
26604impl<T> core::ops::Mul<&Momentum<T>> for Velocity<T> where T: NumLike {
26606 type Output = Energy<T>;
26607 fn mul(self, rhs: &Momentum<T>) -> Self::Output {
26608 Energy{J: self.mps * rhs.kgmps.clone()}
26609 }
26610}
26611impl<T> core::ops::Mul<&Momentum<T>> for &Velocity<T> where T: NumLike {
26613 type Output = Energy<T>;
26614 fn mul(self, rhs: &Momentum<T>) -> Self::Output {
26615 Energy{J: self.mps.clone() * rhs.kgmps.clone()}
26616 }
26617}
26618
26619impl<T> core::ops::Div<Momentum<T>> for Velocity<T> where T: NumLike {
26622 type Output = InverseMass<T>;
26623 fn div(self, rhs: Momentum<T>) -> Self::Output {
26624 InverseMass{per_kg: self.mps / rhs.kgmps}
26625 }
26626}
26627impl<T> core::ops::Div<Momentum<T>> for &Velocity<T> where T: NumLike {
26629 type Output = InverseMass<T>;
26630 fn div(self, rhs: Momentum<T>) -> Self::Output {
26631 InverseMass{per_kg: self.mps.clone() / rhs.kgmps}
26632 }
26633}
26634impl<T> core::ops::Div<&Momentum<T>> for Velocity<T> where T: NumLike {
26636 type Output = InverseMass<T>;
26637 fn div(self, rhs: &Momentum<T>) -> Self::Output {
26638 InverseMass{per_kg: self.mps / rhs.kgmps.clone()}
26639 }
26640}
26641impl<T> core::ops::Div<&Momentum<T>> for &Velocity<T> where T: NumLike {
26643 type Output = InverseMass<T>;
26644 fn div(self, rhs: &Momentum<T>) -> Self::Output {
26645 InverseMass{per_kg: self.mps.clone() / rhs.kgmps.clone()}
26646 }
26647}
26648
26649impl<T> core::ops::Div<Power<T>> for Velocity<T> where T: NumLike {
26652 type Output = InverseForce<T>;
26653 fn div(self, rhs: Power<T>) -> Self::Output {
26654 InverseForce{per_N: self.mps / rhs.W}
26655 }
26656}
26657impl<T> core::ops::Div<Power<T>> for &Velocity<T> where T: NumLike {
26659 type Output = InverseForce<T>;
26660 fn div(self, rhs: Power<T>) -> Self::Output {
26661 InverseForce{per_N: self.mps.clone() / rhs.W}
26662 }
26663}
26664impl<T> core::ops::Div<&Power<T>> for Velocity<T> where T: NumLike {
26666 type Output = InverseForce<T>;
26667 fn div(self, rhs: &Power<T>) -> Self::Output {
26668 InverseForce{per_N: self.mps / rhs.W.clone()}
26669 }
26670}
26671impl<T> core::ops::Div<&Power<T>> for &Velocity<T> where T: NumLike {
26673 type Output = InverseForce<T>;
26674 fn div(self, rhs: &Power<T>) -> Self::Output {
26675 InverseForce{per_N: self.mps.clone() / rhs.W.clone()}
26676 }
26677}
26678
26679impl<T> core::ops::Mul<InverseAbsorbedDose<T>> for Velocity<T> where T: NumLike {
26682 type Output = TimePerDistance<T>;
26683 fn mul(self, rhs: InverseAbsorbedDose<T>) -> Self::Output {
26684 TimePerDistance{spm: self.mps * rhs.per_Gy}
26685 }
26686}
26687impl<T> core::ops::Mul<InverseAbsorbedDose<T>> for &Velocity<T> where T: NumLike {
26689 type Output = TimePerDistance<T>;
26690 fn mul(self, rhs: InverseAbsorbedDose<T>) -> Self::Output {
26691 TimePerDistance{spm: self.mps.clone() * rhs.per_Gy}
26692 }
26693}
26694impl<T> core::ops::Mul<&InverseAbsorbedDose<T>> for Velocity<T> where T: NumLike {
26696 type Output = TimePerDistance<T>;
26697 fn mul(self, rhs: &InverseAbsorbedDose<T>) -> Self::Output {
26698 TimePerDistance{spm: self.mps * rhs.per_Gy.clone()}
26699 }
26700}
26701impl<T> core::ops::Mul<&InverseAbsorbedDose<T>> for &Velocity<T> where T: NumLike {
26703 type Output = TimePerDistance<T>;
26704 fn mul(self, rhs: &InverseAbsorbedDose<T>) -> Self::Output {
26705 TimePerDistance{spm: self.mps.clone() * rhs.per_Gy.clone()}
26706 }
26707}
26708
26709impl<T> core::ops::Mul<InverseDoseEquivalent<T>> for Velocity<T> where T: NumLike {
26712 type Output = TimePerDistance<T>;
26713 fn mul(self, rhs: InverseDoseEquivalent<T>) -> Self::Output {
26714 TimePerDistance{spm: self.mps * rhs.per_Sv}
26715 }
26716}
26717impl<T> core::ops::Mul<InverseDoseEquivalent<T>> for &Velocity<T> where T: NumLike {
26719 type Output = TimePerDistance<T>;
26720 fn mul(self, rhs: InverseDoseEquivalent<T>) -> Self::Output {
26721 TimePerDistance{spm: self.mps.clone() * rhs.per_Sv}
26722 }
26723}
26724impl<T> core::ops::Mul<&InverseDoseEquivalent<T>> for Velocity<T> where T: NumLike {
26726 type Output = TimePerDistance<T>;
26727 fn mul(self, rhs: &InverseDoseEquivalent<T>) -> Self::Output {
26728 TimePerDistance{spm: self.mps * rhs.per_Sv.clone()}
26729 }
26730}
26731impl<T> core::ops::Mul<&InverseDoseEquivalent<T>> for &Velocity<T> where T: NumLike {
26733 type Output = TimePerDistance<T>;
26734 fn mul(self, rhs: &InverseDoseEquivalent<T>) -> Self::Output {
26735 TimePerDistance{spm: self.mps.clone() * rhs.per_Sv.clone()}
26736 }
26737}
26738
26739impl<T> core::ops::Div<Velocity<T>> for f64 where T: NumLike+From<f64> {
26742 type Output = TimePerDistance<T>;
26743 fn div(self, rhs: Velocity<T>) -> Self::Output {
26744 TimePerDistance{spm: T::from(self) / rhs.mps}
26745 }
26746}
26747impl<T> core::ops::Div<Velocity<T>> for &f64 where T: NumLike+From<f64> {
26749 type Output = TimePerDistance<T>;
26750 fn div(self, rhs: Velocity<T>) -> Self::Output {
26751 TimePerDistance{spm: T::from(self.clone()) / rhs.mps}
26752 }
26753}
26754impl<T> core::ops::Div<&Velocity<T>> for f64 where T: NumLike+From<f64> {
26756 type Output = TimePerDistance<T>;
26757 fn div(self, rhs: &Velocity<T>) -> Self::Output {
26758 TimePerDistance{spm: T::from(self) / rhs.mps.clone()}
26759 }
26760}
26761impl<T> core::ops::Div<&Velocity<T>> for &f64 where T: NumLike+From<f64> {
26763 type Output = TimePerDistance<T>;
26764 fn div(self, rhs: &Velocity<T>) -> Self::Output {
26765 TimePerDistance{spm: T::from(self.clone()) / rhs.mps.clone()}
26766 }
26767}
26768
26769impl<T> core::ops::Div<Velocity<T>> for f32 where T: NumLike+From<f32> {
26772 type Output = TimePerDistance<T>;
26773 fn div(self, rhs: Velocity<T>) -> Self::Output {
26774 TimePerDistance{spm: T::from(self) / rhs.mps}
26775 }
26776}
26777impl<T> core::ops::Div<Velocity<T>> for &f32 where T: NumLike+From<f32> {
26779 type Output = TimePerDistance<T>;
26780 fn div(self, rhs: Velocity<T>) -> Self::Output {
26781 TimePerDistance{spm: T::from(self.clone()) / rhs.mps}
26782 }
26783}
26784impl<T> core::ops::Div<&Velocity<T>> for f32 where T: NumLike+From<f32> {
26786 type Output = TimePerDistance<T>;
26787 fn div(self, rhs: &Velocity<T>) -> Self::Output {
26788 TimePerDistance{spm: T::from(self) / rhs.mps.clone()}
26789 }
26790}
26791impl<T> core::ops::Div<&Velocity<T>> for &f32 where T: NumLike+From<f32> {
26793 type Output = TimePerDistance<T>;
26794 fn div(self, rhs: &Velocity<T>) -> Self::Output {
26795 TimePerDistance{spm: T::from(self.clone()) / rhs.mps.clone()}
26796 }
26797}
26798
26799impl<T> core::ops::Div<Velocity<T>> for i64 where T: NumLike+From<i64> {
26802 type Output = TimePerDistance<T>;
26803 fn div(self, rhs: Velocity<T>) -> Self::Output {
26804 TimePerDistance{spm: T::from(self) / rhs.mps}
26805 }
26806}
26807impl<T> core::ops::Div<Velocity<T>> for &i64 where T: NumLike+From<i64> {
26809 type Output = TimePerDistance<T>;
26810 fn div(self, rhs: Velocity<T>) -> Self::Output {
26811 TimePerDistance{spm: T::from(self.clone()) / rhs.mps}
26812 }
26813}
26814impl<T> core::ops::Div<&Velocity<T>> for i64 where T: NumLike+From<i64> {
26816 type Output = TimePerDistance<T>;
26817 fn div(self, rhs: &Velocity<T>) -> Self::Output {
26818 TimePerDistance{spm: T::from(self) / rhs.mps.clone()}
26819 }
26820}
26821impl<T> core::ops::Div<&Velocity<T>> for &i64 where T: NumLike+From<i64> {
26823 type Output = TimePerDistance<T>;
26824 fn div(self, rhs: &Velocity<T>) -> Self::Output {
26825 TimePerDistance{spm: T::from(self.clone()) / rhs.mps.clone()}
26826 }
26827}
26828
26829impl<T> core::ops::Div<Velocity<T>> for i32 where T: NumLike+From<i32> {
26832 type Output = TimePerDistance<T>;
26833 fn div(self, rhs: Velocity<T>) -> Self::Output {
26834 TimePerDistance{spm: T::from(self) / rhs.mps}
26835 }
26836}
26837impl<T> core::ops::Div<Velocity<T>> for &i32 where T: NumLike+From<i32> {
26839 type Output = TimePerDistance<T>;
26840 fn div(self, rhs: Velocity<T>) -> Self::Output {
26841 TimePerDistance{spm: T::from(self.clone()) / rhs.mps}
26842 }
26843}
26844impl<T> core::ops::Div<&Velocity<T>> for i32 where T: NumLike+From<i32> {
26846 type Output = TimePerDistance<T>;
26847 fn div(self, rhs: &Velocity<T>) -> Self::Output {
26848 TimePerDistance{spm: T::from(self) / rhs.mps.clone()}
26849 }
26850}
26851impl<T> core::ops::Div<&Velocity<T>> for &i32 where T: NumLike+From<i32> {
26853 type Output = TimePerDistance<T>;
26854 fn div(self, rhs: &Velocity<T>) -> Self::Output {
26855 TimePerDistance{spm: T::from(self.clone()) / rhs.mps.clone()}
26856 }
26857}
26858
26859#[cfg(feature="num-bigfloat")]
26862impl<T> core::ops::Div<Velocity<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
26863 type Output = TimePerDistance<T>;
26864 fn div(self, rhs: Velocity<T>) -> Self::Output {
26865 TimePerDistance{spm: T::from(self) / rhs.mps}
26866 }
26867}
26868#[cfg(feature="num-bigfloat")]
26870impl<T> core::ops::Div<Velocity<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
26871 type Output = TimePerDistance<T>;
26872 fn div(self, rhs: Velocity<T>) -> Self::Output {
26873 TimePerDistance{spm: T::from(self.clone()) / rhs.mps}
26874 }
26875}
26876#[cfg(feature="num-bigfloat")]
26878impl<T> core::ops::Div<&Velocity<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
26879 type Output = TimePerDistance<T>;
26880 fn div(self, rhs: &Velocity<T>) -> Self::Output {
26881 TimePerDistance{spm: T::from(self) / rhs.mps.clone()}
26882 }
26883}
26884#[cfg(feature="num-bigfloat")]
26886impl<T> core::ops::Div<&Velocity<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
26887 type Output = TimePerDistance<T>;
26888 fn div(self, rhs: &Velocity<T>) -> Self::Output {
26889 TimePerDistance{spm: T::from(self.clone()) / rhs.mps.clone()}
26890 }
26891}
26892
26893#[cfg(feature="num-complex")]
26896impl<T> core::ops::Div<Velocity<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
26897 type Output = TimePerDistance<T>;
26898 fn div(self, rhs: Velocity<T>) -> Self::Output {
26899 TimePerDistance{spm: T::from(self) / rhs.mps}
26900 }
26901}
26902#[cfg(feature="num-complex")]
26904impl<T> core::ops::Div<Velocity<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
26905 type Output = TimePerDistance<T>;
26906 fn div(self, rhs: Velocity<T>) -> Self::Output {
26907 TimePerDistance{spm: T::from(self.clone()) / rhs.mps}
26908 }
26909}
26910#[cfg(feature="num-complex")]
26912impl<T> core::ops::Div<&Velocity<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
26913 type Output = TimePerDistance<T>;
26914 fn div(self, rhs: &Velocity<T>) -> Self::Output {
26915 TimePerDistance{spm: T::from(self) / rhs.mps.clone()}
26916 }
26917}
26918#[cfg(feature="num-complex")]
26920impl<T> core::ops::Div<&Velocity<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
26921 type Output = TimePerDistance<T>;
26922 fn div(self, rhs: &Velocity<T>) -> Self::Output {
26923 TimePerDistance{spm: T::from(self.clone()) / rhs.mps.clone()}
26924 }
26925}
26926
26927#[cfg(feature="num-complex")]
26930impl<T> core::ops::Div<Velocity<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
26931 type Output = TimePerDistance<T>;
26932 fn div(self, rhs: Velocity<T>) -> Self::Output {
26933 TimePerDistance{spm: T::from(self) / rhs.mps}
26934 }
26935}
26936#[cfg(feature="num-complex")]
26938impl<T> core::ops::Div<Velocity<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
26939 type Output = TimePerDistance<T>;
26940 fn div(self, rhs: Velocity<T>) -> Self::Output {
26941 TimePerDistance{spm: T::from(self.clone()) / rhs.mps}
26942 }
26943}
26944#[cfg(feature="num-complex")]
26946impl<T> core::ops::Div<&Velocity<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
26947 type Output = TimePerDistance<T>;
26948 fn div(self, rhs: &Velocity<T>) -> Self::Output {
26949 TimePerDistance{spm: T::from(self) / rhs.mps.clone()}
26950 }
26951}
26952#[cfg(feature="num-complex")]
26954impl<T> core::ops::Div<&Velocity<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
26955 type Output = TimePerDistance<T>;
26956 fn div(self, rhs: &Velocity<T>) -> Self::Output {
26957 TimePerDistance{spm: T::from(self.clone()) / rhs.mps.clone()}
26958 }
26959}
26960
26961#[derive(UnitStruct, Debug, Clone)]
26963#[cfg_attr(feature="serde", derive(Serialize, Deserialize))]
26964pub struct VolumePerMass<T: NumLike>{
26965 pub m3_per_kg: T
26967}
26968
26969impl<T> VolumePerMass<T> where T: NumLike {
26970
26971 pub fn unit_name() -> &'static str { "cubic meters per kilogram" }
26973
26974 pub fn unit_symbol() -> &'static str { "m³/kg" }
26976
26977 pub fn from_m3_per_kg(m3_per_kg: T) -> Self { VolumePerMass{m3_per_kg: m3_per_kg} }
26982
26983 pub fn to_m3_per_kg(&self) -> T { self.m3_per_kg.clone() }
26985
26986 pub fn from_cubic_meters_per_kilogram(cubic_meters_per_kilogram: T) -> Self { VolumePerMass{m3_per_kg: cubic_meters_per_kilogram} }
26991
26992 pub fn to_cubic_meters_per_kilogram(&self) -> T { self.m3_per_kg.clone() }
26994
26995}
26996
26997impl<T> fmt::Display for VolumePerMass<T> where T: NumLike {
26998 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
26999 write!(f, "{} {}", &self.m3_per_kg, Self::unit_symbol())
27000 }
27001}
27002
27003impl<T> VolumePerMass<T> where T: NumLike+From<f64> {
27004
27005 pub fn to_L_per_kg(&self) -> T {
27009 return self.m3_per_kg.clone() * T::from(1000.0_f64);
27010 }
27011
27012 pub fn from_L_per_kg(L_per_kg: T) -> Self {
27019 VolumePerMass{m3_per_kg: L_per_kg * T::from(0.001_f64)}
27020 }
27021
27022 pub fn to_liters_per_kilogram(&self) -> T {
27026 return self.m3_per_kg.clone() * T::from(1000.0_f64);
27027 }
27028
27029 pub fn from_liters_per_kilogram(liters_per_kilogram: T) -> Self {
27036 VolumePerMass{m3_per_kg: liters_per_kilogram * T::from(0.001_f64)}
27037 }
27038
27039 pub fn to_cc_per_g(&self) -> T {
27043 return self.m3_per_kg.clone() * T::from(1000.0_f64);
27044 }
27045
27046 pub fn from_cc_per_g(cc_per_g: T) -> Self {
27053 VolumePerMass{m3_per_kg: cc_per_g * T::from(0.001_f64)}
27054 }
27055
27056 pub fn to_cubic_centimeters_per_gram(&self) -> T {
27060 return self.m3_per_kg.clone() * T::from(1000.0_f64);
27061 }
27062
27063 pub fn from_cubic_centimeters_per_gram(cubic_centimeters_per_gram: T) -> Self {
27070 VolumePerMass{m3_per_kg: cubic_centimeters_per_gram * T::from(0.001_f64)}
27071 }
27072
27073}
27074
27075
27076#[cfg(feature="num-bigfloat")]
27078impl core::ops::Mul<VolumePerMass<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
27079 type Output = VolumePerMass<num_bigfloat::BigFloat>;
27080 fn mul(self, rhs: VolumePerMass<num_bigfloat::BigFloat>) -> Self::Output {
27081 VolumePerMass{m3_per_kg: self * rhs.m3_per_kg}
27082 }
27083}
27084#[cfg(feature="num-bigfloat")]
27086impl core::ops::Mul<VolumePerMass<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
27087 type Output = VolumePerMass<num_bigfloat::BigFloat>;
27088 fn mul(self, rhs: VolumePerMass<num_bigfloat::BigFloat>) -> Self::Output {
27089 VolumePerMass{m3_per_kg: self.clone() * rhs.m3_per_kg}
27090 }
27091}
27092#[cfg(feature="num-bigfloat")]
27094impl core::ops::Mul<&VolumePerMass<num_bigfloat::BigFloat>> for num_bigfloat::BigFloat {
27095 type Output = VolumePerMass<num_bigfloat::BigFloat>;
27096 fn mul(self, rhs: &VolumePerMass<num_bigfloat::BigFloat>) -> Self::Output {
27097 VolumePerMass{m3_per_kg: self * rhs.m3_per_kg.clone()}
27098 }
27099}
27100#[cfg(feature="num-bigfloat")]
27102impl core::ops::Mul<&VolumePerMass<num_bigfloat::BigFloat>> for &num_bigfloat::BigFloat {
27103 type Output = VolumePerMass<num_bigfloat::BigFloat>;
27104 fn mul(self, rhs: &VolumePerMass<num_bigfloat::BigFloat>) -> Self::Output {
27105 VolumePerMass{m3_per_kg: self.clone() * rhs.m3_per_kg.clone()}
27106 }
27107}
27108
27109#[cfg(feature="num-complex")]
27111impl core::ops::Mul<VolumePerMass<num_complex::Complex32>> for num_complex::Complex32 {
27112 type Output = VolumePerMass<num_complex::Complex32>;
27113 fn mul(self, rhs: VolumePerMass<num_complex::Complex32>) -> Self::Output {
27114 VolumePerMass{m3_per_kg: self * rhs.m3_per_kg}
27115 }
27116}
27117#[cfg(feature="num-complex")]
27119impl core::ops::Mul<VolumePerMass<num_complex::Complex32>> for &num_complex::Complex32 {
27120 type Output = VolumePerMass<num_complex::Complex32>;
27121 fn mul(self, rhs: VolumePerMass<num_complex::Complex32>) -> Self::Output {
27122 VolumePerMass{m3_per_kg: self.clone() * rhs.m3_per_kg}
27123 }
27124}
27125#[cfg(feature="num-complex")]
27127impl core::ops::Mul<&VolumePerMass<num_complex::Complex32>> for num_complex::Complex32 {
27128 type Output = VolumePerMass<num_complex::Complex32>;
27129 fn mul(self, rhs: &VolumePerMass<num_complex::Complex32>) -> Self::Output {
27130 VolumePerMass{m3_per_kg: self * rhs.m3_per_kg.clone()}
27131 }
27132}
27133#[cfg(feature="num-complex")]
27135impl core::ops::Mul<&VolumePerMass<num_complex::Complex32>> for &num_complex::Complex32 {
27136 type Output = VolumePerMass<num_complex::Complex32>;
27137 fn mul(self, rhs: &VolumePerMass<num_complex::Complex32>) -> Self::Output {
27138 VolumePerMass{m3_per_kg: self.clone() * rhs.m3_per_kg.clone()}
27139 }
27140}
27141
27142#[cfg(feature="num-complex")]
27144impl core::ops::Mul<VolumePerMass<num_complex::Complex64>> for num_complex::Complex64 {
27145 type Output = VolumePerMass<num_complex::Complex64>;
27146 fn mul(self, rhs: VolumePerMass<num_complex::Complex64>) -> Self::Output {
27147 VolumePerMass{m3_per_kg: self * rhs.m3_per_kg}
27148 }
27149}
27150#[cfg(feature="num-complex")]
27152impl core::ops::Mul<VolumePerMass<num_complex::Complex64>> for &num_complex::Complex64 {
27153 type Output = VolumePerMass<num_complex::Complex64>;
27154 fn mul(self, rhs: VolumePerMass<num_complex::Complex64>) -> Self::Output {
27155 VolumePerMass{m3_per_kg: self.clone() * rhs.m3_per_kg}
27156 }
27157}
27158#[cfg(feature="num-complex")]
27160impl core::ops::Mul<&VolumePerMass<num_complex::Complex64>> for num_complex::Complex64 {
27161 type Output = VolumePerMass<num_complex::Complex64>;
27162 fn mul(self, rhs: &VolumePerMass<num_complex::Complex64>) -> Self::Output {
27163 VolumePerMass{m3_per_kg: self * rhs.m3_per_kg.clone()}
27164 }
27165}
27166#[cfg(feature="num-complex")]
27168impl core::ops::Mul<&VolumePerMass<num_complex::Complex64>> for &num_complex::Complex64 {
27169 type Output = VolumePerMass<num_complex::Complex64>;
27170 fn mul(self, rhs: &VolumePerMass<num_complex::Complex64>) -> Self::Output {
27171 VolumePerMass{m3_per_kg: self.clone() * rhs.m3_per_kg.clone()}
27172 }
27173}
27174
27175
27176
27177#[cfg(feature = "uom")]
27179impl<T> Into<uom::si::f32::SpecificVolume> for VolumePerMass<T> where T: NumLike+Into<f32> {
27180 fn into(self) -> uom::si::f32::SpecificVolume {
27181 uom::si::f32::SpecificVolume::new::<uom::si::specific_volume::cubic_meter_per_kilogram>(self.m3_per_kg.into())
27182 }
27183}
27184
27185#[cfg(feature = "uom")]
27187impl<T> From<uom::si::f32::SpecificVolume> for VolumePerMass<T> where T: NumLike+From<f32> {
27188 fn from(src: uom::si::f32::SpecificVolume) -> Self {
27189 VolumePerMass{m3_per_kg: T::from(src.value)}
27190 }
27191}
27192
27193#[cfg(feature = "uom")]
27195impl<T> Into<uom::si::f64::SpecificVolume> for VolumePerMass<T> where T: NumLike+Into<f64> {
27196 fn into(self) -> uom::si::f64::SpecificVolume {
27197 uom::si::f64::SpecificVolume::new::<uom::si::specific_volume::cubic_meter_per_kilogram>(self.m3_per_kg.into())
27198 }
27199}
27200
27201#[cfg(feature = "uom")]
27203impl<T> From<uom::si::f64::SpecificVolume> for VolumePerMass<T> where T: NumLike+From<f64> {
27204 fn from(src: uom::si::f64::SpecificVolume) -> Self {
27205 VolumePerMass{m3_per_kg: T::from(src.value)}
27206 }
27207}
27208
27209
27210impl<T> core::ops::Div<Distance<T>> for VolumePerMass<T> where T: NumLike {
27213 type Output = AreaPerMass<T>;
27214 fn div(self, rhs: Distance<T>) -> Self::Output {
27215 AreaPerMass{m2_per_kg: self.m3_per_kg / rhs.m}
27216 }
27217}
27218impl<T> core::ops::Div<Distance<T>> for &VolumePerMass<T> where T: NumLike {
27220 type Output = AreaPerMass<T>;
27221 fn div(self, rhs: Distance<T>) -> Self::Output {
27222 AreaPerMass{m2_per_kg: self.m3_per_kg.clone() / rhs.m}
27223 }
27224}
27225impl<T> core::ops::Div<&Distance<T>> for VolumePerMass<T> where T: NumLike {
27227 type Output = AreaPerMass<T>;
27228 fn div(self, rhs: &Distance<T>) -> Self::Output {
27229 AreaPerMass{m2_per_kg: self.m3_per_kg / rhs.m.clone()}
27230 }
27231}
27232impl<T> core::ops::Div<&Distance<T>> for &VolumePerMass<T> where T: NumLike {
27234 type Output = AreaPerMass<T>;
27235 fn div(self, rhs: &Distance<T>) -> Self::Output {
27236 AreaPerMass{m2_per_kg: self.m3_per_kg.clone() / rhs.m.clone()}
27237 }
27238}
27239
27240impl<T> core::ops::Mul<InverseDistance<T>> for VolumePerMass<T> where T: NumLike {
27243 type Output = AreaPerMass<T>;
27244 fn mul(self, rhs: InverseDistance<T>) -> Self::Output {
27245 AreaPerMass{m2_per_kg: self.m3_per_kg * rhs.per_m}
27246 }
27247}
27248impl<T> core::ops::Mul<InverseDistance<T>> for &VolumePerMass<T> where T: NumLike {
27250 type Output = AreaPerMass<T>;
27251 fn mul(self, rhs: InverseDistance<T>) -> Self::Output {
27252 AreaPerMass{m2_per_kg: self.m3_per_kg.clone() * rhs.per_m}
27253 }
27254}
27255impl<T> core::ops::Mul<&InverseDistance<T>> for VolumePerMass<T> where T: NumLike {
27257 type Output = AreaPerMass<T>;
27258 fn mul(self, rhs: &InverseDistance<T>) -> Self::Output {
27259 AreaPerMass{m2_per_kg: self.m3_per_kg * rhs.per_m.clone()}
27260 }
27261}
27262impl<T> core::ops::Mul<&InverseDistance<T>> for &VolumePerMass<T> where T: NumLike {
27264 type Output = AreaPerMass<T>;
27265 fn mul(self, rhs: &InverseDistance<T>) -> Self::Output {
27266 AreaPerMass{m2_per_kg: self.m3_per_kg.clone() * rhs.per_m.clone()}
27267 }
27268}
27269
27270impl<T> core::ops::Div<InverseMass<T>> for VolumePerMass<T> where T: NumLike {
27273 type Output = Volume<T>;
27274 fn div(self, rhs: InverseMass<T>) -> Self::Output {
27275 Volume{m3: self.m3_per_kg / rhs.per_kg}
27276 }
27277}
27278impl<T> core::ops::Div<InverseMass<T>> for &VolumePerMass<T> where T: NumLike {
27280 type Output = Volume<T>;
27281 fn div(self, rhs: InverseMass<T>) -> Self::Output {
27282 Volume{m3: self.m3_per_kg.clone() / rhs.per_kg}
27283 }
27284}
27285impl<T> core::ops::Div<&InverseMass<T>> for VolumePerMass<T> where T: NumLike {
27287 type Output = Volume<T>;
27288 fn div(self, rhs: &InverseMass<T>) -> Self::Output {
27289 Volume{m3: self.m3_per_kg / rhs.per_kg.clone()}
27290 }
27291}
27292impl<T> core::ops::Div<&InverseMass<T>> for &VolumePerMass<T> where T: NumLike {
27294 type Output = Volume<T>;
27295 fn div(self, rhs: &InverseMass<T>) -> Self::Output {
27296 Volume{m3: self.m3_per_kg.clone() / rhs.per_kg.clone()}
27297 }
27298}
27299
27300impl<T> core::ops::Mul<Mass<T>> for VolumePerMass<T> where T: NumLike {
27303 type Output = Volume<T>;
27304 fn mul(self, rhs: Mass<T>) -> Self::Output {
27305 Volume{m3: self.m3_per_kg * rhs.kg}
27306 }
27307}
27308impl<T> core::ops::Mul<Mass<T>> for &VolumePerMass<T> where T: NumLike {
27310 type Output = Volume<T>;
27311 fn mul(self, rhs: Mass<T>) -> Self::Output {
27312 Volume{m3: self.m3_per_kg.clone() * rhs.kg}
27313 }
27314}
27315impl<T> core::ops::Mul<&Mass<T>> for VolumePerMass<T> where T: NumLike {
27317 type Output = Volume<T>;
27318 fn mul(self, rhs: &Mass<T>) -> Self::Output {
27319 Volume{m3: self.m3_per_kg * rhs.kg.clone()}
27320 }
27321}
27322impl<T> core::ops::Mul<&Mass<T>> for &VolumePerMass<T> where T: NumLike {
27324 type Output = Volume<T>;
27325 fn mul(self, rhs: &Mass<T>) -> Self::Output {
27326 Volume{m3: self.m3_per_kg.clone() * rhs.kg.clone()}
27327 }
27328}
27329
27330impl<T> core::ops::Mul<Concentration<T>> for VolumePerMass<T> where T: NumLike {
27333 type Output = Molality<T>;
27334 fn mul(self, rhs: Concentration<T>) -> Self::Output {
27335 Molality{molpkg: self.m3_per_kg * rhs.molpm3}
27336 }
27337}
27338impl<T> core::ops::Mul<Concentration<T>> for &VolumePerMass<T> where T: NumLike {
27340 type Output = Molality<T>;
27341 fn mul(self, rhs: Concentration<T>) -> Self::Output {
27342 Molality{molpkg: self.m3_per_kg.clone() * rhs.molpm3}
27343 }
27344}
27345impl<T> core::ops::Mul<&Concentration<T>> for VolumePerMass<T> where T: NumLike {
27347 type Output = Molality<T>;
27348 fn mul(self, rhs: &Concentration<T>) -> Self::Output {
27349 Molality{molpkg: self.m3_per_kg * rhs.molpm3.clone()}
27350 }
27351}
27352impl<T> core::ops::Mul<&Concentration<T>> for &VolumePerMass<T> where T: NumLike {
27354 type Output = Molality<T>;
27355 fn mul(self, rhs: &Concentration<T>) -> Self::Output {
27356 Molality{molpkg: self.m3_per_kg.clone() * rhs.molpm3.clone()}
27357 }
27358}
27359
27360impl<T> core::ops::Div<Molality<T>> for VolumePerMass<T> where T: NumLike {
27363 type Output = MolarVolume<T>;
27364 fn div(self, rhs: Molality<T>) -> Self::Output {
27365 MolarVolume{m3_per_mol: self.m3_per_kg / rhs.molpkg}
27366 }
27367}
27368impl<T> core::ops::Div<Molality<T>> for &VolumePerMass<T> where T: NumLike {
27370 type Output = MolarVolume<T>;
27371 fn div(self, rhs: Molality<T>) -> Self::Output {
27372 MolarVolume{m3_per_mol: self.m3_per_kg.clone() / rhs.molpkg}
27373 }
27374}
27375impl<T> core::ops::Div<&Molality<T>> for VolumePerMass<T> where T: NumLike {
27377 type Output = MolarVolume<T>;
27378 fn div(self, rhs: &Molality<T>) -> Self::Output {
27379 MolarVolume{m3_per_mol: self.m3_per_kg / rhs.molpkg.clone()}
27380 }
27381}
27382impl<T> core::ops::Div<&Molality<T>> for &VolumePerMass<T> where T: NumLike {
27384 type Output = MolarVolume<T>;
27385 fn div(self, rhs: &Molality<T>) -> Self::Output {
27386 MolarVolume{m3_per_mol: self.m3_per_kg.clone() / rhs.molpkg.clone()}
27387 }
27388}
27389
27390impl<T> core::ops::Mul<MolarMass<T>> for VolumePerMass<T> where T: NumLike {
27393 type Output = MolarVolume<T>;
27394 fn mul(self, rhs: MolarMass<T>) -> Self::Output {
27395 MolarVolume{m3_per_mol: self.m3_per_kg * rhs.kgpmol}
27396 }
27397}
27398impl<T> core::ops::Mul<MolarMass<T>> for &VolumePerMass<T> where T: NumLike {
27400 type Output = MolarVolume<T>;
27401 fn mul(self, rhs: MolarMass<T>) -> Self::Output {
27402 MolarVolume{m3_per_mol: self.m3_per_kg.clone() * rhs.kgpmol}
27403 }
27404}
27405impl<T> core::ops::Mul<&MolarMass<T>> for VolumePerMass<T> where T: NumLike {
27407 type Output = MolarVolume<T>;
27408 fn mul(self, rhs: &MolarMass<T>) -> Self::Output {
27409 MolarVolume{m3_per_mol: self.m3_per_kg * rhs.kgpmol.clone()}
27410 }
27411}
27412impl<T> core::ops::Mul<&MolarMass<T>> for &VolumePerMass<T> where T: NumLike {
27414 type Output = MolarVolume<T>;
27415 fn mul(self, rhs: &MolarMass<T>) -> Self::Output {
27416 MolarVolume{m3_per_mol: self.m3_per_kg.clone() * rhs.kgpmol.clone()}
27417 }
27418}
27419
27420impl<T> core::ops::Div<MolarVolume<T>> for VolumePerMass<T> where T: NumLike {
27423 type Output = Molality<T>;
27424 fn div(self, rhs: MolarVolume<T>) -> Self::Output {
27425 Molality{molpkg: self.m3_per_kg / rhs.m3_per_mol}
27426 }
27427}
27428impl<T> core::ops::Div<MolarVolume<T>> for &VolumePerMass<T> where T: NumLike {
27430 type Output = Molality<T>;
27431 fn div(self, rhs: MolarVolume<T>) -> Self::Output {
27432 Molality{molpkg: self.m3_per_kg.clone() / rhs.m3_per_mol}
27433 }
27434}
27435impl<T> core::ops::Div<&MolarVolume<T>> for VolumePerMass<T> where T: NumLike {
27437 type Output = Molality<T>;
27438 fn div(self, rhs: &MolarVolume<T>) -> Self::Output {
27439 Molality{molpkg: self.m3_per_kg / rhs.m3_per_mol.clone()}
27440 }
27441}
27442impl<T> core::ops::Div<&MolarVolume<T>> for &VolumePerMass<T> where T: NumLike {
27444 type Output = Molality<T>;
27445 fn div(self, rhs: &MolarVolume<T>) -> Self::Output {
27446 Molality{molpkg: self.m3_per_kg.clone() / rhs.m3_per_mol.clone()}
27447 }
27448}
27449
27450impl<T> core::ops::Mul<InverseVolume<T>> for VolumePerMass<T> where T: NumLike {
27453 type Output = InverseMass<T>;
27454 fn mul(self, rhs: InverseVolume<T>) -> Self::Output {
27455 InverseMass{per_kg: self.m3_per_kg * rhs.per_m3}
27456 }
27457}
27458impl<T> core::ops::Mul<InverseVolume<T>> for &VolumePerMass<T> where T: NumLike {
27460 type Output = InverseMass<T>;
27461 fn mul(self, rhs: InverseVolume<T>) -> Self::Output {
27462 InverseMass{per_kg: self.m3_per_kg.clone() * rhs.per_m3}
27463 }
27464}
27465impl<T> core::ops::Mul<&InverseVolume<T>> for VolumePerMass<T> where T: NumLike {
27467 type Output = InverseMass<T>;
27468 fn mul(self, rhs: &InverseVolume<T>) -> Self::Output {
27469 InverseMass{per_kg: self.m3_per_kg * rhs.per_m3.clone()}
27470 }
27471}
27472impl<T> core::ops::Mul<&InverseVolume<T>> for &VolumePerMass<T> where T: NumLike {
27474 type Output = InverseMass<T>;
27475 fn mul(self, rhs: &InverseVolume<T>) -> Self::Output {
27476 InverseMass{per_kg: self.m3_per_kg.clone() * rhs.per_m3.clone()}
27477 }
27478}
27479
27480impl<T> core::ops::Div<Volume<T>> for VolumePerMass<T> where T: NumLike {
27483 type Output = InverseMass<T>;
27484 fn div(self, rhs: Volume<T>) -> Self::Output {
27485 InverseMass{per_kg: self.m3_per_kg / rhs.m3}
27486 }
27487}
27488impl<T> core::ops::Div<Volume<T>> for &VolumePerMass<T> where T: NumLike {
27490 type Output = InverseMass<T>;
27491 fn div(self, rhs: Volume<T>) -> Self::Output {
27492 InverseMass{per_kg: self.m3_per_kg.clone() / rhs.m3}
27493 }
27494}
27495impl<T> core::ops::Div<&Volume<T>> for VolumePerMass<T> where T: NumLike {
27497 type Output = InverseMass<T>;
27498 fn div(self, rhs: &Volume<T>) -> Self::Output {
27499 InverseMass{per_kg: self.m3_per_kg / rhs.m3.clone()}
27500 }
27501}
27502impl<T> core::ops::Div<&Volume<T>> for &VolumePerMass<T> where T: NumLike {
27504 type Output = InverseMass<T>;
27505 fn div(self, rhs: &Volume<T>) -> Self::Output {
27506 InverseMass{per_kg: self.m3_per_kg.clone() / rhs.m3.clone()}
27507 }
27508}
27509
27510impl<T> core::ops::Mul<AreaDensity<T>> for VolumePerMass<T> where T: NumLike {
27513 type Output = Distance<T>;
27514 fn mul(self, rhs: AreaDensity<T>) -> Self::Output {
27515 Distance{m: self.m3_per_kg * rhs.kgpm2}
27516 }
27517}
27518impl<T> core::ops::Mul<AreaDensity<T>> for &VolumePerMass<T> where T: NumLike {
27520 type Output = Distance<T>;
27521 fn mul(self, rhs: AreaDensity<T>) -> Self::Output {
27522 Distance{m: self.m3_per_kg.clone() * rhs.kgpm2}
27523 }
27524}
27525impl<T> core::ops::Mul<&AreaDensity<T>> for VolumePerMass<T> where T: NumLike {
27527 type Output = Distance<T>;
27528 fn mul(self, rhs: &AreaDensity<T>) -> Self::Output {
27529 Distance{m: self.m3_per_kg * rhs.kgpm2.clone()}
27530 }
27531}
27532impl<T> core::ops::Mul<&AreaDensity<T>> for &VolumePerMass<T> where T: NumLike {
27534 type Output = Distance<T>;
27535 fn mul(self, rhs: &AreaDensity<T>) -> Self::Output {
27536 Distance{m: self.m3_per_kg.clone() * rhs.kgpm2.clone()}
27537 }
27538}
27539
27540impl<T> core::ops::Div<AreaPerMass<T>> for VolumePerMass<T> where T: NumLike {
27543 type Output = Distance<T>;
27544 fn div(self, rhs: AreaPerMass<T>) -> Self::Output {
27545 Distance{m: self.m3_per_kg / rhs.m2_per_kg}
27546 }
27547}
27548impl<T> core::ops::Div<AreaPerMass<T>> for &VolumePerMass<T> where T: NumLike {
27550 type Output = Distance<T>;
27551 fn div(self, rhs: AreaPerMass<T>) -> Self::Output {
27552 Distance{m: self.m3_per_kg.clone() / rhs.m2_per_kg}
27553 }
27554}
27555impl<T> core::ops::Div<&AreaPerMass<T>> for VolumePerMass<T> where T: NumLike {
27557 type Output = Distance<T>;
27558 fn div(self, rhs: &AreaPerMass<T>) -> Self::Output {
27559 Distance{m: self.m3_per_kg / rhs.m2_per_kg.clone()}
27560 }
27561}
27562impl<T> core::ops::Div<&AreaPerMass<T>> for &VolumePerMass<T> where T: NumLike {
27564 type Output = Distance<T>;
27565 fn div(self, rhs: &AreaPerMass<T>) -> Self::Output {
27566 Distance{m: self.m3_per_kg.clone() / rhs.m2_per_kg.clone()}
27567 }
27568}
27569
27570impl<T> core::ops::Mul<InverseAbsorbedDose<T>> for VolumePerMass<T> where T: NumLike {
27573 type Output = InversePressure<T>;
27574 fn mul(self, rhs: InverseAbsorbedDose<T>) -> Self::Output {
27575 InversePressure{per_Pa: self.m3_per_kg * rhs.per_Gy}
27576 }
27577}
27578impl<T> core::ops::Mul<InverseAbsorbedDose<T>> for &VolumePerMass<T> where T: NumLike {
27580 type Output = InversePressure<T>;
27581 fn mul(self, rhs: InverseAbsorbedDose<T>) -> Self::Output {
27582 InversePressure{per_Pa: self.m3_per_kg.clone() * rhs.per_Gy}
27583 }
27584}
27585impl<T> core::ops::Mul<&InverseAbsorbedDose<T>> for VolumePerMass<T> where T: NumLike {
27587 type Output = InversePressure<T>;
27588 fn mul(self, rhs: &InverseAbsorbedDose<T>) -> Self::Output {
27589 InversePressure{per_Pa: self.m3_per_kg * rhs.per_Gy.clone()}
27590 }
27591}
27592impl<T> core::ops::Mul<&InverseAbsorbedDose<T>> for &VolumePerMass<T> where T: NumLike {
27594 type Output = InversePressure<T>;
27595 fn mul(self, rhs: &InverseAbsorbedDose<T>) -> Self::Output {
27596 InversePressure{per_Pa: self.m3_per_kg.clone() * rhs.per_Gy.clone()}
27597 }
27598}
27599
27600impl<T> core::ops::Mul<InverseDoseEquivalent<T>> for VolumePerMass<T> where T: NumLike {
27603 type Output = InversePressure<T>;
27604 fn mul(self, rhs: InverseDoseEquivalent<T>) -> Self::Output {
27605 InversePressure{per_Pa: self.m3_per_kg * rhs.per_Sv}
27606 }
27607}
27608impl<T> core::ops::Mul<InverseDoseEquivalent<T>> for &VolumePerMass<T> where T: NumLike {
27610 type Output = InversePressure<T>;
27611 fn mul(self, rhs: InverseDoseEquivalent<T>) -> Self::Output {
27612 InversePressure{per_Pa: self.m3_per_kg.clone() * rhs.per_Sv}
27613 }
27614}
27615impl<T> core::ops::Mul<&InverseDoseEquivalent<T>> for VolumePerMass<T> where T: NumLike {
27617 type Output = InversePressure<T>;
27618 fn mul(self, rhs: &InverseDoseEquivalent<T>) -> Self::Output {
27619 InversePressure{per_Pa: self.m3_per_kg * rhs.per_Sv.clone()}
27620 }
27621}
27622impl<T> core::ops::Mul<&InverseDoseEquivalent<T>> for &VolumePerMass<T> where T: NumLike {
27624 type Output = InversePressure<T>;
27625 fn mul(self, rhs: &InverseDoseEquivalent<T>) -> Self::Output {
27626 InversePressure{per_Pa: self.m3_per_kg.clone() * rhs.per_Sv.clone()}
27627 }
27628}
27629
27630impl<T> core::ops::Div<VolumePerMass<T>> for f64 where T: NumLike+From<f64> {
27633 type Output = Density<T>;
27634 fn div(self, rhs: VolumePerMass<T>) -> Self::Output {
27635 Density{kgpm3: T::from(self) / rhs.m3_per_kg}
27636 }
27637}
27638impl<T> core::ops::Div<VolumePerMass<T>> for &f64 where T: NumLike+From<f64> {
27640 type Output = Density<T>;
27641 fn div(self, rhs: VolumePerMass<T>) -> Self::Output {
27642 Density{kgpm3: T::from(self.clone()) / rhs.m3_per_kg}
27643 }
27644}
27645impl<T> core::ops::Div<&VolumePerMass<T>> for f64 where T: NumLike+From<f64> {
27647 type Output = Density<T>;
27648 fn div(self, rhs: &VolumePerMass<T>) -> Self::Output {
27649 Density{kgpm3: T::from(self) / rhs.m3_per_kg.clone()}
27650 }
27651}
27652impl<T> core::ops::Div<&VolumePerMass<T>> for &f64 where T: NumLike+From<f64> {
27654 type Output = Density<T>;
27655 fn div(self, rhs: &VolumePerMass<T>) -> Self::Output {
27656 Density{kgpm3: T::from(self.clone()) / rhs.m3_per_kg.clone()}
27657 }
27658}
27659
27660impl<T> core::ops::Div<VolumePerMass<T>> for f32 where T: NumLike+From<f32> {
27663 type Output = Density<T>;
27664 fn div(self, rhs: VolumePerMass<T>) -> Self::Output {
27665 Density{kgpm3: T::from(self) / rhs.m3_per_kg}
27666 }
27667}
27668impl<T> core::ops::Div<VolumePerMass<T>> for &f32 where T: NumLike+From<f32> {
27670 type Output = Density<T>;
27671 fn div(self, rhs: VolumePerMass<T>) -> Self::Output {
27672 Density{kgpm3: T::from(self.clone()) / rhs.m3_per_kg}
27673 }
27674}
27675impl<T> core::ops::Div<&VolumePerMass<T>> for f32 where T: NumLike+From<f32> {
27677 type Output = Density<T>;
27678 fn div(self, rhs: &VolumePerMass<T>) -> Self::Output {
27679 Density{kgpm3: T::from(self) / rhs.m3_per_kg.clone()}
27680 }
27681}
27682impl<T> core::ops::Div<&VolumePerMass<T>> for &f32 where T: NumLike+From<f32> {
27684 type Output = Density<T>;
27685 fn div(self, rhs: &VolumePerMass<T>) -> Self::Output {
27686 Density{kgpm3: T::from(self.clone()) / rhs.m3_per_kg.clone()}
27687 }
27688}
27689
27690impl<T> core::ops::Div<VolumePerMass<T>> for i64 where T: NumLike+From<i64> {
27693 type Output = Density<T>;
27694 fn div(self, rhs: VolumePerMass<T>) -> Self::Output {
27695 Density{kgpm3: T::from(self) / rhs.m3_per_kg}
27696 }
27697}
27698impl<T> core::ops::Div<VolumePerMass<T>> for &i64 where T: NumLike+From<i64> {
27700 type Output = Density<T>;
27701 fn div(self, rhs: VolumePerMass<T>) -> Self::Output {
27702 Density{kgpm3: T::from(self.clone()) / rhs.m3_per_kg}
27703 }
27704}
27705impl<T> core::ops::Div<&VolumePerMass<T>> for i64 where T: NumLike+From<i64> {
27707 type Output = Density<T>;
27708 fn div(self, rhs: &VolumePerMass<T>) -> Self::Output {
27709 Density{kgpm3: T::from(self) / rhs.m3_per_kg.clone()}
27710 }
27711}
27712impl<T> core::ops::Div<&VolumePerMass<T>> for &i64 where T: NumLike+From<i64> {
27714 type Output = Density<T>;
27715 fn div(self, rhs: &VolumePerMass<T>) -> Self::Output {
27716 Density{kgpm3: T::from(self.clone()) / rhs.m3_per_kg.clone()}
27717 }
27718}
27719
27720impl<T> core::ops::Div<VolumePerMass<T>> for i32 where T: NumLike+From<i32> {
27723 type Output = Density<T>;
27724 fn div(self, rhs: VolumePerMass<T>) -> Self::Output {
27725 Density{kgpm3: T::from(self) / rhs.m3_per_kg}
27726 }
27727}
27728impl<T> core::ops::Div<VolumePerMass<T>> for &i32 where T: NumLike+From<i32> {
27730 type Output = Density<T>;
27731 fn div(self, rhs: VolumePerMass<T>) -> Self::Output {
27732 Density{kgpm3: T::from(self.clone()) / rhs.m3_per_kg}
27733 }
27734}
27735impl<T> core::ops::Div<&VolumePerMass<T>> for i32 where T: NumLike+From<i32> {
27737 type Output = Density<T>;
27738 fn div(self, rhs: &VolumePerMass<T>) -> Self::Output {
27739 Density{kgpm3: T::from(self) / rhs.m3_per_kg.clone()}
27740 }
27741}
27742impl<T> core::ops::Div<&VolumePerMass<T>> for &i32 where T: NumLike+From<i32> {
27744 type Output = Density<T>;
27745 fn div(self, rhs: &VolumePerMass<T>) -> Self::Output {
27746 Density{kgpm3: T::from(self.clone()) / rhs.m3_per_kg.clone()}
27747 }
27748}
27749
27750#[cfg(feature="num-bigfloat")]
27753impl<T> core::ops::Div<VolumePerMass<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
27754 type Output = Density<T>;
27755 fn div(self, rhs: VolumePerMass<T>) -> Self::Output {
27756 Density{kgpm3: T::from(self) / rhs.m3_per_kg}
27757 }
27758}
27759#[cfg(feature="num-bigfloat")]
27761impl<T> core::ops::Div<VolumePerMass<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
27762 type Output = Density<T>;
27763 fn div(self, rhs: VolumePerMass<T>) -> Self::Output {
27764 Density{kgpm3: T::from(self.clone()) / rhs.m3_per_kg}
27765 }
27766}
27767#[cfg(feature="num-bigfloat")]
27769impl<T> core::ops::Div<&VolumePerMass<T>> for num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
27770 type Output = Density<T>;
27771 fn div(self, rhs: &VolumePerMass<T>) -> Self::Output {
27772 Density{kgpm3: T::from(self) / rhs.m3_per_kg.clone()}
27773 }
27774}
27775#[cfg(feature="num-bigfloat")]
27777impl<T> core::ops::Div<&VolumePerMass<T>> for &num_bigfloat::BigFloat where T: NumLike+From<num_bigfloat::BigFloat> {
27778 type Output = Density<T>;
27779 fn div(self, rhs: &VolumePerMass<T>) -> Self::Output {
27780 Density{kgpm3: T::from(self.clone()) / rhs.m3_per_kg.clone()}
27781 }
27782}
27783
27784#[cfg(feature="num-complex")]
27787impl<T> core::ops::Div<VolumePerMass<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
27788 type Output = Density<T>;
27789 fn div(self, rhs: VolumePerMass<T>) -> Self::Output {
27790 Density{kgpm3: T::from(self) / rhs.m3_per_kg}
27791 }
27792}
27793#[cfg(feature="num-complex")]
27795impl<T> core::ops::Div<VolumePerMass<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
27796 type Output = Density<T>;
27797 fn div(self, rhs: VolumePerMass<T>) -> Self::Output {
27798 Density{kgpm3: T::from(self.clone()) / rhs.m3_per_kg}
27799 }
27800}
27801#[cfg(feature="num-complex")]
27803impl<T> core::ops::Div<&VolumePerMass<T>> for num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
27804 type Output = Density<T>;
27805 fn div(self, rhs: &VolumePerMass<T>) -> Self::Output {
27806 Density{kgpm3: T::from(self) / rhs.m3_per_kg.clone()}
27807 }
27808}
27809#[cfg(feature="num-complex")]
27811impl<T> core::ops::Div<&VolumePerMass<T>> for &num_complex::Complex32 where T: NumLike+From<num_complex::Complex32> {
27812 type Output = Density<T>;
27813 fn div(self, rhs: &VolumePerMass<T>) -> Self::Output {
27814 Density{kgpm3: T::from(self.clone()) / rhs.m3_per_kg.clone()}
27815 }
27816}
27817
27818#[cfg(feature="num-complex")]
27821impl<T> core::ops::Div<VolumePerMass<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
27822 type Output = Density<T>;
27823 fn div(self, rhs: VolumePerMass<T>) -> Self::Output {
27824 Density{kgpm3: T::from(self) / rhs.m3_per_kg}
27825 }
27826}
27827#[cfg(feature="num-complex")]
27829impl<T> core::ops::Div<VolumePerMass<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
27830 type Output = Density<T>;
27831 fn div(self, rhs: VolumePerMass<T>) -> Self::Output {
27832 Density{kgpm3: T::from(self.clone()) / rhs.m3_per_kg}
27833 }
27834}
27835#[cfg(feature="num-complex")]
27837impl<T> core::ops::Div<&VolumePerMass<T>> for num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
27838 type Output = Density<T>;
27839 fn div(self, rhs: &VolumePerMass<T>) -> Self::Output {
27840 Density{kgpm3: T::from(self) / rhs.m3_per_kg.clone()}
27841 }
27842}
27843#[cfg(feature="num-complex")]
27845impl<T> core::ops::Div<&VolumePerMass<T>> for &num_complex::Complex64 where T: NumLike+From<num_complex::Complex64> {
27846 type Output = Density<T>;
27847 fn div(self, rhs: &VolumePerMass<T>) -> Self::Output {
27848 Density{kgpm3: T::from(self.clone()) / rhs.m3_per_kg.clone()}
27849 }
27850}
27851
27852
27853