src/builders/polylines.js
function trianglesPerArc (angle, width) {
    if (angle < 0) {
        angle = -angle;
    }

    var numTriangles = (width > 2 * MIN_FAN_WIDTH) ? Math.log2(width / MIN_FAN_WIDTH) : 1;
    return Math.ceil(angle / Math.PI * numTriangles);
}
function trianglesPerArc (angle, width) {
    if (angle < 0) {
        angle = -angle;
    }

    var numTriangles = (width > 2 * MIN_FAN_WIDTH) ? Math.log2(width / MIN_FAN_WIDTH) : 1;
    return Math.ceil(angle / Math.PI * numTriangles);
}
function trianglesPerArc ( angle , width ) { if ( angle < 0 ) { angle = - angle ; } var numTriangles = ( width > 2 * MIN_FAN_WIDTH ) ? Math . log2 ( width / MIN_FAN_WIDTH ) : 1 ; return Math . ceil ( angle / Math . PI * numTriangles ) ; }
Calculate number of triangles for a fan given an angle and line width
Calculate number of triangles for a fan given an angle and line width