radius = fmin (w / 2.0f, h / 2.0f);
vkvg_move_to(ctx, x, y + radius);
- vkvg_arc(ctx, x + radius, y + radius, radius, (float)M_PI, (float)-M_PI_2);
+ vkvg_arc(ctx, x + radius, y + radius, radius, M_PIF, -M_PIF_2);
vkvg_line_to(ctx, x + w - radius, y);
- vkvg_arc(ctx, x + w - radius, y + radius, radius, (float)-M_PI_2, 0);
+ vkvg_arc(ctx, x + w - radius, y + radius, radius, -M_PIF_2, 0);
vkvg_line_to(ctx, x + w, y + h - radius);
- vkvg_arc(ctx, x + w - radius, y + h - radius, radius, 0, (float)M_PI_2);
+ vkvg_arc(ctx, x + w - radius, y + h - radius, radius, 0, M_PIF_2);
vkvg_line_to(ctx, x + radius, y + h);
- vkvg_arc(ctx, x + radius, y + h - radius, radius, (float)M_PI_2, (float)M_PI);
+ vkvg_arc(ctx, x + radius, y + h - radius, radius, M_PIF_2, M_PIF);
vkvg_line_to(ctx, x, y + radius);
vkvg_close_path(ctx);
vkvg_matrix_get_scale (&ctx->pushConsts.mat, &sx, &sy);
float r = radius * fabsf(fmaxf(sx,sy));
if (r < 30.0f)
- return fminf(M_PI / 3.f, M_PI / r);
- return fminf(M_PI / 3.f,M_PI / (r * 0.4f));
+ return fminf(M_PIF / 3.f, M_PIF / r);
+ return fminf(M_PIF / 3.f,M_PIF / (r * 0.4f));
}
void _create_gradient_buff (VkvgContext ctx){
vkvg_buffer_create (ctx->dev,
double theta = sa;
double ea = sa + delta_theta;
- float step = fmaxf(0.001f, fminf(M_PI, _get_arc_step(ctx, fminf (rx, ry))*0.1f));
+ float step = fmaxf(0.001f, fminf(M_PIF, _get_arc_step(ctx, fminf (rx, ry))*0.1f));
p = (vec2) {
rx * cosf (theta),