This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn nearest_point_within_rounded_rect( | |
point: Pos2, | |
rect: Rect, | |
corner_radius: f32, | |
) -> Pos2 { | |
let mut x = point.x; | |
let mut y = point.y; | |
// Check if point is inside or outside the rounded corners | |
let mut in_top_left_corner = false; |