mirror of
https://github.com/griffi-gh/hUI.git
synced 2024-11-21 14:48:42 -06:00
fix ratio
This commit is contained in:
parent
db3f7ae7f7
commit
8890c2c0a3
|
@ -211,7 +211,7 @@ impl UiDrawCall {
|
|||
//TODO: fix some corners tris being invisible (but it's already close enough lol)
|
||||
let rounded_corner_verts = corner.point_count.get() as u32;
|
||||
for i in 0..rounded_corner_verts {
|
||||
let cratio = i as f32 / rounded_corner_verts as f32;
|
||||
let cratio = i as f32 / (rounded_corner_verts - 1) as f32;
|
||||
let angle = cratio * std::f32::consts::PI * 0.5;
|
||||
let x = angle.sin();
|
||||
let y = angle.cos();
|
||||
|
|
Loading…
Reference in a new issue