MCPcopy Create free account
hub / github.com/LunarG/VulkanTools / Equal

Method Equal

vkconfig_core/setting_float.cpp:71–83  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69}
70
71bool SettingMetaFloat::Equal(const SettingMeta& other) const {
72 if (!SettingMeta::Equal(other)) return false;
73
74 const SettingMetaFloat& meta = static_cast<const SettingMetaFloat&>(other);
75
76 if (std::abs(this->min_value - meta.min_value) > std::numeric_limits<float>::epsilon()) return false;
77 if (std::abs(this->max_value - meta.max_value) > std::numeric_limits<float>::epsilon()) return false;
78 if (this->precision != meta.precision) return false;
79 if (this->width != meta.width) return false;
80 if (this->unit != meta.unit) return false;
81
82 return std::abs(this->default_value - meta.default_value) <= std::numeric_limits<float>::epsilon();
83}
84
85// SettingDataFloat
86

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected