mirror of
https://github.com/griffi-gh/hUI.git
synced 2024-11-24 08:08:41 -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)
|
//TODO: fix some corners tris being invisible (but it's already close enough lol)
|
||||||
let rounded_corner_verts = corner.point_count.get() as u32;
|
let rounded_corner_verts = corner.point_count.get() as u32;
|
||||||
for i in 0..rounded_corner_verts {
|
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 angle = cratio * std::f32::consts::PI * 0.5;
|
||||||
let x = angle.sin();
|
let x = angle.sin();
|
||||||
let y = angle.cos();
|
let y = angle.cos();
|
||||||
|
|
Loading…
Reference in a new issue