ui_draw_chevron: simplify calc size (#19616)

albatross
Dean Lee 2020-12-30 06:08:49 +08:00 committed by GitHub
parent 123f36581f
commit 39bd8c7ce6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 4 deletions

View File

@ -73,10 +73,7 @@ static void draw_chevron(UIState *s, float x_in, float y_in, float sz,
return;
}
sz *= 30;
sz /= (x_in / 3 + 30);
if (sz > 30) sz = 30;
if (sz < 15) sz = 15;
sz = std::clamp((sz * 30) / (x_in / 3 + 30), 15.0f, 30.0f);
// glow
float g_xo = sz/5;