已定义 double 类型的变量 r 和 theta,分别表示图中圆半径和圆心角。下列表达式中可以求出弦长 s 的是( )。
double
r
theta
s
图示:一个半径为 rrr 的圆,圆心与弦的两个端点相连构成等腰三角形,两条腰长均为 rrr,顶角(圆心角)为 θ\thetaθ,弦(底边)长为 sss。
r * cos(theta)
r * cos(theta / 2) * 2
r * sin(theta)
r * sin(theta / 2) * 2