| 72 | } |
| 73 | |
| 74 | int64_t python_round_to_int(float value) { |
| 75 | const double input = static_cast<double>(value); |
| 76 | const double floor_value = std::floor(input); |
| 77 | const double fraction = input - floor_value; |
| 78 | if (fraction > 0.5) { |
| 79 | return static_cast<int64_t>(floor_value + 1.0); |
| 80 | } |
| 81 | if (fraction < 0.5) { |
| 82 | return static_cast<int64_t>(floor_value); |
| 83 | } |
| 84 | const int64_t floor_int = static_cast<int64_t>(floor_value); |
| 85 | return (floor_int % 2 == 0) ? floor_int : floor_int + 1; |
| 86 | } |
| 87 | |
| 88 | void apply_repaint_mode_strength(AceStepGenerationOptions & options, const runtime::TaskRequest & request) { |
| 89 | const auto mode_value = runtime::find_option(request.options, {"repaint_mode"}); |
no outgoing calls
no test coverage detected