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>

//! # Speed based converters

/// Feet Per Second conversion functions
pub mod feet_per_second {
	/// Converts the supplied Feet Per Second value to Miles Per Hour
	/// # Arguments
	/// * `value` - The Feet Per Second input value
	pub fn to_miles_per_hour(value: f64) -> f64 {
		return value / 1.46667;
	}
	/// Converts the supplied Feet Per Second value to Kilometres Per Hour
	/// # Arguments
	/// * `value` - The Feet Per Second input value
	pub fn to_kilometres_per_hour(value: f64) -> f64 {
		return value * 1.09728;
	}
	/// Converts the supplied Feet Per Second value to Metres Per Second
	/// # Arguments
	/// * `value` - The Feet Per Second input value
	pub fn to_metres_per_second(value: f64) -> f64 {
		return value / 3.28084;
	}
	/// Converts the supplied Feet Per Second value to Knots
	/// # Arguments
	/// * `value` - The Feet Per Second input value
	pub fn to_knots(value: f64) -> f64 {
		return value / 1.68781;
	}
}
/// Kilometres Per Hour conversion functions
pub mod kilometres_per_hour {
	/// Converts the supplied Kilometres Per Hour value to Miles Per Hour
	/// # Arguments
	/// * `value` - The Kilometres Per Hour input value
	pub fn to_miles_per_hour(value: f64) -> f64 {
		return value / 1.60934;
	}
	/// Converts the supplied Kilometres Per Hour value to Feet Per Second
	/// # Arguments
	/// * `value` - The Kilometres Per Hour input value
	pub fn to_feet_per_second(value: f64) -> f64 {
		return value / 1.09728;
	}
	/// Converts the supplied Kilometres Per Hour value to Metres Per Second
	/// # Arguments
	/// * `value` - The Kilometres Per Hour input value
	pub fn to_metres_per_second(value: f64) -> f64 {
		return value / 3.6;
	}
	/// Converts the supplied Kilometres Per Hour value to Knots
	/// # Arguments
	/// * `value` - The Kilometres Per Hour input value
	pub fn to_knots(value: f64) -> f64 {
		return value / 1.852;
	}
}
/// Knots conversion functions
pub mod knots {
	/// Converts the supplied Knots value to Miles Per Hour
	/// # Arguments
	/// * `value` - The Knots input value
	pub fn to_miles_per_hour(value: f64) -> f64 {
		return value * 1.15078;
	}
	/// Converts the supplied Knots value to Kilometres Per Hour
	/// # Arguments
	/// * `value` - The Knots input value
	pub fn to_kilometres_per_hour(value: f64) -> f64 {
		return value * 1.852;
	}
	/// Converts the supplied Knots value to Feet Per Second
	/// # Arguments
	/// * `value` - The Knots input value
	pub fn to_feet_per_second(value: f64) -> f64 {
		return value * 1.68781;
	}
	/// Converts the supplied Knots value to Metres Per Second
	/// # Arguments
	/// * `value` - The Knots input value
	pub fn to_metres_per_second(value: f64) -> f64 {
		return value / 1.94384;
	}
}
/// Metres Per Second conversion functions
pub mod metres_per_second {
	/// Converts the supplied Metres Per Second value to Miles Per Hour
	/// # Arguments
	/// * `value` - The Metres Per Second input value
	pub fn to_miles_per_hour(value: f64) -> f64 {
		return value * 2.23694;
	}
	/// Converts the supplied Metres Per Second value to Kilometres Per Hour
	/// # Arguments
	/// * `value` - The Metres Per Second input value
	pub fn to_kilometres_per_hour(value: f64) -> f64 {
		return value * 3.6;
	}
	/// Converts the supplied Metres Per Second value to Feet Per Second
	/// # Arguments
	/// * `value` - The Metres Per Second input value
	pub fn to_feet_per_second(value: f64) -> f64 {
		return value * 3.28084;
	}
	/// Converts the supplied Metres Per Second value to Knots
	/// # Arguments
	/// * `value` - The Metres Per Second input value
	pub fn to_knots(value: f64) -> f64 {
		return value * 1.94384;
	}
}
/// Miles Per Hour conversion functions
pub mod miles_per_hour {
	/// Converts the supplied Miles Per Hour value to Kilometres Per Hour
	/// # Arguments
	/// * `value` - The Miles Per Hour input value
	pub fn to_kilometres_per_hour(value: f64) -> f64 {
		return value * 1.60934;
	}
	/// Converts the supplied Miles Per Hour value to Feet Per Second
	/// # Arguments
	/// * `value` - The Miles Per Hour input value
	pub fn to_feet_per_second(value: f64) -> f64 {
		return value * 1.46667;
	}
	/// Converts the supplied Miles Per Hour value to Metres Per Second
	/// # Arguments
	/// * `value` - The Miles Per Hour input value
	pub fn to_metres_per_second(value: f64) -> f64 {
		return value / 2.23694;
	}
	/// Converts the supplied Miles Per Hour value to Knots
	/// # Arguments
	/// * `value` - The Miles Per Hour input value
	pub fn to_knots(value: f64) -> f64 {
		return value / 1.15078;
	}
}