MCPcopy Create free account
hub / github.com/ComodoSecurity/openedr / InRange

Function InRange

edrav2/eprj/jsoncpp/src/lib_json/json_value.cpp:98–103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

96#if !defined(JSON_USE_INT64_DOUBLE_CONVERSION)
97template <typename T, typename U>
98static inline bool InRange(double d, T min, U max) {
99 // The casts can lose precision, but we are looking only for
100 // an approximate range. Might fail on edge cases though. ~cdunn
101 // return d >= static_cast<double>(min) && d <= static_cast<double>(max);
102 return d >= min && d <= max;
103}
104#else // if !defined(JSON_USE_INT64_DOUBLE_CONVERSION)
105static inline double integerToDouble(Json::UInt64 value) {
106 return static_cast<double>(Int64(value / 2)) * 2.0 +

Callers 5

asIntMethod · 0.85
asUIntMethod · 0.85
asInt64Method · 0.85
asUInt64Method · 0.85
isConvertibleToMethod · 0.85

Calls 1

integerToDoubleFunction · 0.85

Tested by

no test coverage detected