mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
Common unit functions moved to unit class
This commit is contained in:
@@ -29,3 +29,8 @@ bool DllExport operator!= (const Offset& a, const Offset& b);
|
||||
bool DllExport operator== (const Offset& a, const int& b);
|
||||
bool DllExport operator!= (const Offset& a, const int& b);
|
||||
|
||||
double DllExport knotsToMs(const double knots);
|
||||
double DllExport msToKnots(const double ms);
|
||||
double DllExport ftToM(const double ft);
|
||||
double DllExport mToFt(const double m);
|
||||
|
||||
|
||||
@@ -63,3 +63,20 @@ bool operator== (const Offset& a, const Offset& b) { return a.x == b.x && a.y ==
|
||||
bool operator!= (const Offset& a, const Offset& b) { return !(a == b); }
|
||||
bool operator== (const Offset& a, const int& b) { return a.x == b && a.y == b && a.z == b; }
|
||||
bool operator!= (const Offset& a, const int& b) { return !(a == b); }
|
||||
|
||||
|
||||
double knotsToMs(const double knots) {
|
||||
return knots / 1.94384;
|
||||
}
|
||||
|
||||
double msToKnots(const double ms) {
|
||||
return ms * 1.94384;
|
||||
}
|
||||
|
||||
double ftToM(const double ft) {
|
||||
return ft * 0.3048;
|
||||
}
|
||||
|
||||
double mToFt(const double m) {
|
||||
return m / 0.3048;
|
||||
}
|
||||
Reference in New Issue
Block a user