Giovanni Mascellani (@giomasce) commented about libs/vkd3d-shader/hlsl.y:
" return (min(in_x, in_y) < 0.0 && max(in_x, in_y) >= 0.0)\n"
" ? -poly_approx\n"
" : poly_approx;\n"
"}";
- if (!(type = elementwise_intrinsic_get_common_type(ctx, params, loc)))
return false;
- type = hlsl_get_numeric_type(ctx, type->class, HLSL_TYPE_FLOAT, type->dimx, type->dimy);
- header = atan2_mode
? hlsl_sprintf_alloc(ctx, atan2_header_template,
type->name, type->name, type->name,
type->name, type->name)
: hlsl_sprintf_alloc(ctx, atan_header_template,
type->name, type->name,
type->name, type->name);
I don't know if we have specific conventions for this construct, but in general continuation lines are expected to be indented 8 spaces. Though I would say that here it even makes sense to use a regular `if` construct, and my suggestion above might make everything shorter anyway.