def yWherePieEdgeIntersectsVerticalLine(self, xOfVerticalLine, xPieCenter, yPieCenter, pieRadius, pieEdgeAngle):
        result = Double.NaN
        dxToArc = pieRadius*math.cos(pieEdgeAngle)
        if dxToArc != 0:
            # The fraction of the way (from pie center to pie perimeter
            # along the pie slice edge) that you must go to reach the point
            # at which the vertical line intersects with the pie slice
            # edge. For example, this fraction is 0.5 whenever the vertical
            # line bisects the pie slice edge.
            t = (xOfVerticalLine-xPieCenter)/dxToArc
            if GChartUtil.withinRange(t,0,1):
                result = yPieCenter - t * pieRadius * math.sin(pieEdgeAngle)

        return result


    # returns the x coordinate where a pie slice edge
    # intersects a given horizontal line, or NaN if none.
dataset/ETHPy150Open anandology/pyjamas/library/gwt/chart/SymbolType.py/PieSliceSymbolType.yWherePieEdgeIntersectsVerticalLine/original