added kilometer2mile,inch2centimeter,kilometer2nauticalmile.....

This commit is contained in:
HuYingzhuo(hugo/hyzboy) 2023-10-31 16:23:21 +08:00
parent 4be7c2a2d0
commit 006eaa3f1c

View File

@ -111,5 +111,62 @@ namespace hgl
{ {
return k - 273.15; return k - 273.15;
} }
/**
* .
*/
template<typename T>
inline T Kilometer2Mile(const T &k)
{
return k * 0.621371192;
}
/**
* .
*/
template<typename T>
inline T Mile2Kilometer(const T &m)
{
return m * 1.609344;
}
/**
* .
*/
template<typename T>
inline T Inch2Centimeter(const T &i)
{
return i * 2.54;
}
/**
* .
*/
template<typename T>
inline T Centimeter2Inch(const T &c)
{
return c * 0.393700787;
}
/**
* .
*/
template<typename T>
inline T Kilometer2NauticalMile(const T &k)
{
return k * 0.539956803;
}
/**
* .
*/
template<typename T>
inline T NauticalMile2Kilometer(const T &n)
{
return n * 1.852;
}
}//namespace hgl }//namespace hgl
#endif//HGL_MATH_PHYSICS_CONST_INCLUDE #endif//HGL_MATH_PHYSICS_CONST_INCLUDE