compositor.py 文件源码

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

项目:mauzr 作者: eqrx 项目源码 文件源码
def create_ring_coordinates(radius, count):
    """ Create coordinates arranged in a ring.

    :param radius: Radius of the ring.
    :type radius: float
    :param count: Count of coordinates to generate.
    :type count: int
    :returns: Tuple of the coordinates.
    :rtype: tuple
    """

    pixelstep = math.radians(360/count)
    pixels = []
    for index in range(0, count):
        pixels.append((radius * math.cos(index*pixelstep),
                       radius * math.sin(index*pixelstep)))
    return pixels
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号