| 69 | } |
| 70 | |
| 71 | bool 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 |
nothing calls this directly
no outgoing calls
no test coverage detected