unit_conversions/
speed.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//! # Speed based converters
8
9/// Feet Per Second conversion functions
10pub mod feet_per_second {
11	/// Converts the supplied Feet Per Second value to Miles Per Hour
12	/// # Arguments
13	/// * `value` - The Feet Per Second input value
14	pub fn to_miles_per_hour(value: f64) -> f64 {
15		return value / 1.46667;
16	}
17	/// Converts the supplied Feet Per Second value to Kilometres Per Hour
18	/// # Arguments
19	/// * `value` - The Feet Per Second input value
20	pub fn to_kilometres_per_hour(value: f64) -> f64 {
21		return value * 1.09728;
22	}
23	/// Converts the supplied Feet Per Second value to Metres Per Second
24	/// # Arguments
25	/// * `value` - The Feet Per Second input value
26	pub fn to_metres_per_second(value: f64) -> f64 {
27		return value / 3.28084;
28	}
29	/// Converts the supplied Feet Per Second value to Knots
30	/// # Arguments
31	/// * `value` - The Feet Per Second input value
32	pub fn to_knots(value: f64) -> f64 {
33		return value / 1.68781;
34	}
35}
36/// Kilometres Per Hour conversion functions
37pub mod kilometres_per_hour {
38	/// Converts the supplied Kilometres Per Hour value to Miles Per Hour
39	/// # Arguments
40	/// * `value` - The Kilometres Per Hour input value
41	pub fn to_miles_per_hour(value: f64) -> f64 {
42		return value / 1.60934;
43	}
44	/// Converts the supplied Kilometres Per Hour value to Feet Per Second
45	/// # Arguments
46	/// * `value` - The Kilometres Per Hour input value
47	pub fn to_feet_per_second(value: f64) -> f64 {
48		return value / 1.09728;
49	}
50	/// Converts the supplied Kilometres Per Hour value to Metres Per Second
51	/// # Arguments
52	/// * `value` - The Kilometres Per Hour input value
53	pub fn to_metres_per_second(value: f64) -> f64 {
54		return value / 3.6;
55	}
56	/// Converts the supplied Kilometres Per Hour value to Knots
57	/// # Arguments
58	/// * `value` - The Kilometres Per Hour input value
59	pub fn to_knots(value: f64) -> f64 {
60		return value / 1.852;
61	}
62}
63/// Knots conversion functions
64pub mod knots {
65	/// Converts the supplied Knots value to Miles Per Hour
66	/// # Arguments
67	/// * `value` - The Knots input value
68	pub fn to_miles_per_hour(value: f64) -> f64 {
69		return value * 1.15078;
70	}
71	/// Converts the supplied Knots value to Kilometres Per Hour
72	/// # Arguments
73	/// * `value` - The Knots input value
74	pub fn to_kilometres_per_hour(value: f64) -> f64 {
75		return value * 1.852;
76	}
77	/// Converts the supplied Knots value to Feet Per Second
78	/// # Arguments
79	/// * `value` - The Knots input value
80	pub fn to_feet_per_second(value: f64) -> f64 {
81		return value * 1.68781;
82	}
83	/// Converts the supplied Knots value to Metres Per Second
84	/// # Arguments
85	/// * `value` - The Knots input value
86	pub fn to_metres_per_second(value: f64) -> f64 {
87		return value / 1.94384;
88	}
89}
90/// Metres Per Second conversion functions
91pub mod metres_per_second {
92	/// Converts the supplied Metres Per Second value to Miles Per Hour
93	/// # Arguments
94	/// * `value` - The Metres Per Second input value
95	pub fn to_miles_per_hour(value: f64) -> f64 {
96		return value * 2.23694;
97	}
98	/// Converts the supplied Metres Per Second value to Kilometres Per Hour
99	/// # Arguments
100	/// * `value` - The Metres Per Second input value
101	pub fn to_kilometres_per_hour(value: f64) -> f64 {
102		return value * 3.6;
103	}
104	/// Converts the supplied Metres Per Second value to Feet Per Second
105	/// # Arguments
106	/// * `value` - The Metres Per Second input value
107	pub fn to_feet_per_second(value: f64) -> f64 {
108		return value * 3.28084;
109	}
110	/// Converts the supplied Metres Per Second value to Knots
111	/// # Arguments
112	/// * `value` - The Metres Per Second input value
113	pub fn to_knots(value: f64) -> f64 {
114		return value * 1.94384;
115	}
116}
117/// Miles Per Hour conversion functions
118pub mod miles_per_hour {
119	/// Converts the supplied Miles Per Hour value to Kilometres Per Hour
120	/// # Arguments
121	/// * `value` - The Miles Per Hour input value
122	pub fn to_kilometres_per_hour(value: f64) -> f64 {
123		return value * 1.60934;
124	}
125	/// Converts the supplied Miles Per Hour value to Feet Per Second
126	/// # Arguments
127	/// * `value` - The Miles Per Hour input value
128	pub fn to_feet_per_second(value: f64) -> f64 {
129		return value * 1.46667;
130	}
131	/// Converts the supplied Miles Per Hour value to Metres Per Second
132	/// # Arguments
133	/// * `value` - The Miles Per Hour input value
134	pub fn to_metres_per_second(value: f64) -> f64 {
135		return value / 2.23694;
136	}
137	/// Converts the supplied Miles Per Hour value to Knots
138	/// # Arguments
139	/// * `value` - The Miles Per Hour input value
140	pub fn to_knots(value: f64) -> f64 {
141		return value / 1.15078;
142	}
143}