Program to find Length of Latus Rectum of an Ellipse | Function to calculate the length of the latus rectum of an ellipse ; Length of major axis ; Length of minor axis ; Length of the latus rectum ; Given lengths of semi - major and semi - minor axis ; Function call to calculate length of the latus rectum of a ellipse
function lengthOfLatusRectum ( A , B ) { var major = 2.0 * A ; var minor = 2.0 * B ; var latus_rectum = ( minor * minor ) / major ; return latus_rectum ; } var A = 3.0 , B = 2.0 ; document . write ( lengthOfLatusRectum ( A , B ) ) ;