unit_conversions/force.rs
1// <auto-generated>
2// This code was generated by the UnitCodeGenerator tool
3//
4// Changes to this file will be lost if the code is regenerated
5// </auto-generated>
6
7//! # Force based converters
8
9/// Dynes conversion functions
10pub mod dynes {
11 /// Converts the supplied Dynes value to Newtons
12 /// # Arguments
13 /// * `value` - The Dynes input value
14 pub fn to_newtons(value: f64) -> f64 {
15 return value / 100000.0;
16 }
17 /// Converts the supplied Dynes value to Poundals
18 /// # Arguments
19 /// * `value` - The Dynes input value
20 pub fn to_poundals(value: f64) -> f64 {
21 return value / 13825.4954376;
22 }
23 /// Converts the supplied Dynes value to Kilogram-force
24 /// # Arguments
25 /// * `value` - The Dynes input value
26 pub fn to_kilogramforce(value: f64) -> f64 {
27 return value / 980665.0;
28 }
29}
30/// Kilogram-force conversion functions
31pub mod kilogramforce {
32 /// Converts the supplied Kilogram-force value to Newtons
33 /// # Arguments
34 /// * `value` - The Kilogram-force input value
35 pub fn to_newtons(value: f64) -> f64 {
36 return value * 9.80665;
37 }
38 /// Converts the supplied Kilogram-force value to Dynes
39 /// # Arguments
40 /// * `value` - The Kilogram-force input value
41 pub fn to_dynes(value: f64) -> f64 {
42 return value * 980665.0;
43 }
44 /// Converts the supplied Kilogram-force value to Poundals
45 /// # Arguments
46 /// * `value` - The Kilogram-force input value
47 pub fn to_poundals(value: f64) -> f64 {
48 return value * 70.93163528397;
49 }
50}
51/// Newtons conversion functions
52pub mod newtons {
53 /// Converts the supplied Newtons value to Dynes
54 /// # Arguments
55 /// * `value` - The Newtons input value
56 pub fn to_dynes(value: f64) -> f64 {
57 return value * 100000.0;
58 }
59 /// Converts the supplied Newtons value to Poundals
60 /// # Arguments
61 /// * `value` - The Newtons input value
62 pub fn to_poundals(value: f64) -> f64 {
63 return value * 7.23301;
64 }
65 /// Converts the supplied Newtons value to Kilogram-force
66 /// # Arguments
67 /// * `value` - The Newtons input value
68 pub fn to_kilogramforce(value: f64) -> f64 {
69 return value / 9.80665;
70 }
71}
72/// Poundals conversion functions
73pub mod poundals {
74 /// Converts the supplied Poundals value to Newtons
75 /// # Arguments
76 /// * `value` - The Poundals input value
77 pub fn to_newtons(value: f64) -> f64 {
78 return value / 7.23301;
79 }
80 /// Converts the supplied Poundals value to Dynes
81 /// # Arguments
82 /// * `value` - The Poundals input value
83 pub fn to_dynes(value: f64) -> f64 {
84 return value * 13825.4954376;
85 }
86 /// Converts the supplied Poundals value to Kilogram-force
87 /// # Arguments
88 /// * `value` - The Poundals input value
89 pub fn to_kilogramforce(value: f64) -> f64 {
90 return value / 70.93163528397;
91 }
92}