Skip to main content

circle_chord_width

Function circle_chord_width 

Source
pub fn circle_chord_width(radius: u32, y_offset_from_center: i32) -> u32
Expand description

Calculates the horizontal chord width across a circle at a given vertical distance from center.

Formula: $w = 2 \times \sqrt{R^2 - y^2}$