1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
// <auto-generated>
// This code was generated by the UnitCodeGenerator tool
//
// Changes to this file will be lost if the code is regenerated
// </auto-generated>

//! # Frequency based converters

/// Gigahertz conversion functions
pub mod gigahertz {
	/// Converts the supplied Gigahertz value to Hertz
	/// # Arguments
	/// * `value` - The Gigahertz input value
	pub fn to_hertz(value: f64) -> f64 {
		return value * 1e+9;
	}
	/// Converts the supplied Gigahertz value to Kilohertz
	/// # Arguments
	/// * `value` - The Gigahertz input value
	pub fn to_kilohertz(value: f64) -> f64 {
		return value * 1e+6;
	}
	/// Converts the supplied Gigahertz value to Megahertz
	/// # Arguments
	/// * `value` - The Gigahertz input value
	pub fn to_megahertz(value: f64) -> f64 {
		return value * 1000.0;
	}
}
/// Hertz conversion functions
pub mod hertz {
	/// Converts the supplied Hertz value to Kilohertz
	/// # Arguments
	/// * `value` - The Hertz input value
	pub fn to_kilohertz(value: f64) -> f64 {
		return value / 1000.0;
	}
	/// Converts the supplied Hertz value to Megahertz
	/// # Arguments
	/// * `value` - The Hertz input value
	pub fn to_megahertz(value: f64) -> f64 {
		return value / 1e+6;
	}
	/// Converts the supplied Hertz value to Gigahertz
	/// # Arguments
	/// * `value` - The Hertz input value
	pub fn to_gigahertz(value: f64) -> f64 {
		return value / 1e+9;
	}
}
/// Kilohertz conversion functions
pub mod kilohertz {
	/// Converts the supplied Kilohertz value to Hertz
	/// # Arguments
	/// * `value` - The Kilohertz input value
	pub fn to_hertz(value: f64) -> f64 {
		return value * 1000.0;
	}
	/// Converts the supplied Kilohertz value to Megahertz
	/// # Arguments
	/// * `value` - The Kilohertz input value
	pub fn to_megahertz(value: f64) -> f64 {
		return value / 1000.0;
	}
	/// Converts the supplied Kilohertz value to Gigahertz
	/// # Arguments
	/// * `value` - The Kilohertz input value
	pub fn to_gigahertz(value: f64) -> f64 {
		return value / 1e+6;
	}
}
/// Megahertz conversion functions
pub mod megahertz {
	/// Converts the supplied Megahertz value to Hertz
	/// # Arguments
	/// * `value` - The Megahertz input value
	pub fn to_hertz(value: f64) -> f64 {
		return value * 1e+6;
	}
	/// Converts the supplied Megahertz value to Kilohertz
	/// # Arguments
	/// * `value` - The Megahertz input value
	pub fn to_kilohertz(value: f64) -> f64 {
		return value * 1000.0;
	}
	/// Converts the supplied Megahertz value to Gigahertz
	/// # Arguments
	/// * `value` - The Megahertz input value
	pub fn to_gigahertz(value: f64) -> f64 {
		return value / 1000.0;
	}
}