| 220 | } |
| 221 | |
| 222 | static bool valid_resolution(F64 coordinate, F64 offset, F64 scale_factor) { |
| 223 | F64 coordinate_without_offset = coordinate - offset; |
| 224 | F64 fixed_precision_multiplier = coordinate_without_offset / scale_factor; |
| 225 | I64 quantized_fixed_precision_multiplier = I64_QUANTIZE(fixed_precision_multiplier); |
| 226 | if ((fabs(fixed_precision_multiplier - quantized_fixed_precision_multiplier)) < 0.001) { |
| 227 | return true; |
| 228 | } |
| 229 | return false; |
| 230 | } |
| 231 | |
| 232 | /// Adds a key-value pair to the csv data container and converts the value to a Variant value. In all reports |
| 233 | static void add_csv_field(FileMap& file, const std::string& key, const Value& value) { |