colz.py 文件源码

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

项目:colz-python 作者: carloscabo 项目源码 文件源码
def rotateHue ( self, hue_inc ):
        """ Rotates the hue value of Colz object """
        if  isinstance( hue_inc, int ):
            hue_inc /= 360.0
        newhue = self.h + hue_inc
        if newhue > 1.0:
            newhue, whole = math.modf(newhue) # Keep decimal part
        if newhue < 0.0:
            newhue, whole = math.modf(newhue) # Keep decimal part
            newhue = 1.0 + newhue
        self.h = newhue
        self.hsl[0]  = self.h
        self.hsla[0] = self.h
        self.updateFromHsl()

    # Return array of integer values
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号