[][src]Module civil::units

Modules

conversions

//! # UNTESTED # //! # strings need replacement //! //! This contains conversion factors for commonly used units. Instead of //! having a very large number of functions for each conversion, there is //! just one big hashmap. The entries for all items into the hashmap all have //! the same format: //! //! //! ((&str,&str),f32) //! (("from units","to units"),1.0) //! (("meter","foot"),3.2) //! //! //! That is, the key in the hashmap is a tuple of string slices in the order //! of units you are converting from to the unit you are converting to. Units //! are always in the singular, lower case, with no special characters. Units //! with exponents have the exponent named first, ie "square foot" or //! "cubic meter". Units should be written as they are typically pronounced in //! English, such as "pound per square inch". In cases where units are multiplied //! such as torque (ie foot-pound) the units are hyphenated.