Fix rounded corner drawing

This commit is contained in:
mars 2022-11-05 16:07:53 -06:00
parent ab50a8e130
commit 69318a02e5
1 changed files with 4 additions and 4 deletions

View File

@ -255,10 +255,10 @@ impl DrawContext {
let delta = PI / 4.0 / spoke_num;
let (mut theta, limit) = match corner {
Corner::TopRight => (0.0, FRAC_PI_2),
Corner::BottomRight => (FRAC_PI_2 * 3.0, PI * 2.0),
Corner::BottomLeft => (PI, FRAC_PI_2 * 3.0),
Corner::TopLeft => (FRAC_PI_2, PI),
Corner::TopRight => (FRAC_PI_2 * 3.0, PI * 2.0),
Corner::BottomRight => (0.0, FRAC_PI_2),
Corner::BottomLeft => (FRAC_PI_2, PI),
Corner::TopLeft => (PI, FRAC_PI_2 * 3.0),
};
let mut last_spoke = Vec2::from_angle(theta) * radius + center;