im trying to find some sort of formula to calculate lines within a circle.

I need to find the length of the various lines within the circle from which I only know the diameter. Is there some sort of formula that uses the dropoff of a circles side from the center?
Thanks, Martijn
If $h$ is the distance of the line from the center and $r$ the radius of the circle, the length of the line is given by: $$l=2\sqrt{r^2-h^2}$$