panel.py 文件源码

python
阅读 33 收藏 0 点赞 0 评论 0

项目:bpy_lambda 作者: bcongdon 项目源码 文件源码
def _intersect_circle(self, center, radius, x):
        """ upper intersection of line parallel to y axis and a circle
            where line is given by x origin
            circle by center, radius as float
            return float y of upper intersection point, float angle
        """
        dx = x - center.x
        d = (radius * radius) - (dx * dx)
        if d <= 0:
            if x > center.x:
                return center.y, 0
            else:
                return center.y, pi
        else:
            y = sqrt(d)
            return center.y + y, atan2(y, dx)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号