Smrf.NodeXL.Visualization.Wpf.VertexDrawingHistory.GetEdgeEndpointOnCircle C# (CSharp) Method

GetEdgeEndpointOnCircle() protected method

protected GetEdgeEndpointOnCircle ( Point oVertexALocation, Double dVertexARadius, Point oVertexBLocation, Point &oEdgeEndpoint ) : void
oVertexALocation Point
dVertexARadius Double
oVertexBLocation Point
oEdgeEndpoint Point
return void
    GetEdgeEndpointOnCircle
    (
        Point oVertexALocation,
        Double dVertexARadius,
        Point oVertexBLocation,
        out Point oEdgeEndpoint
    )
    {
        Debug.Assert(dVertexARadius >= 0);
        AssertValid();

        Double dEdgeAngle = WpfGraphicsUtil.GetAngleBetweenPointsRadians(
            oVertexALocation, oVertexBLocation);

        oEdgeEndpoint = new Point(
            oVertexALocation.X + ( dVertexARadius * Math.Cos(dEdgeAngle) ),
            oVertexALocation.Y - ( dVertexARadius * Math.Sin(dEdgeAngle) )
            );
    }