lib/split-arc.js
function findArcHeight(distance, radius, maxArcHeight, greaterThan180) {
    var heightOptions = [];
    heightOptions.push(radius + Math.sqrt(Math.pow(radius,2) - Math.pow(distance,2)));
    heightOptions.push(radius - Math.sqrt(Math.pow(radius,2) - Math.pow(distance,2)));

    if(greaterThan180){
        return closestButNotGreaterThan(heightOptions, maxArcHeight);
    }
    else{
        return closestToZero(heightOptions, maxArcHeight);
    }
}
function findArcHeight(distance, radius, maxArcHeight, greaterThan180) {
    var heightOptions = [];
    heightOptions.push(radius + Math.sqrt(Math.pow(radius,2) - Math.pow(distance,2)));
    heightOptions.push(radius - Math.sqrt(Math.pow(radius,2) - Math.pow(distance,2)));

    if(greaterThan180){
        return closestButNotGreaterThan(heightOptions, maxArcHeight);
    }
    else{
        return closestToZero(heightOptions, maxArcHeight);
    }
}
function findArcHeight ( distance , radius , maxArcHeight , greaterThan180 ) { var heightOptions = [ ] ; heightOptions . push ( radius + Math . sqrt ( Math . pow ( radius , 2 ) - Math . pow ( distance , 2 ) ) ) ; heightOptions . push ( radius - Math . sqrt ( Math . pow ( radius , 2 ) - Math . pow ( distance , 2 ) ) ) ; if ( greaterThan180 ) { return closestButNotGreaterThan ( heightOptions , maxArcHeight ) ; } else { return closestToZero ( heightOptions , maxArcHeight ) ; } }
Compute the height of a circular arc given `distance` is half the length of the chord of the circle, `radius` is the radius of the circle in question
Compute the height of a circular arc given distance is half the length of the chord of the circle radius is the radius of the circle in question