mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-08 21:05:34 +08:00
Ref T709, only update settings if changed
This commit is contained in:
committed by
Mat Sutcliffe
parent
79f347cc1b
commit
447152bd13
@@ -15,6 +15,7 @@
|
||||
#include <fstream>
|
||||
#include <vector>
|
||||
#include <cctype>
|
||||
#include <cmath>
|
||||
#include <algorithm>
|
||||
|
||||
// Strict header only X-Plane model parser utils shared between BlackMisc and XSwiftBus.
|
||||
@@ -155,6 +156,15 @@ namespace BlackMisc
|
||||
return t ? tr : fa;
|
||||
}
|
||||
|
||||
//! Qt free version of fuzzy compare
|
||||
inline bool isFuzzyEqual(double v1, double v2)
|
||||
{
|
||||
// we allow some epsilon here
|
||||
// static const double Epsilon = 5 * std::numeric_limits<double>::min();
|
||||
static const double Epsilon = 1E-08;
|
||||
return (fabs(v1 - v2) < Epsilon);
|
||||
}
|
||||
|
||||
//! Trim whitespace from the beginning and end, and replace sequences of whitespace with single space characters
|
||||
inline std::string simplifyWhitespace(const std::string &s)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user