unit-conversions 0.1.16

Various units of measurement conversions
Documentation
// <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;
	}
}