(self, angle)
return Vec2D(self[0]*c+perp[0]*s, self[1]*c+perp[1]*s)
rotate self counterclockwise by angle
rotate self counterclockwise by angle
rotate self counterclockwise by angle
def rotate(self, angle):
        """rotate self counterclockwise by angle
        """
        perp = Vec2D(-self[1], self[0])
        angle = math.radians(angle)
        c, s = math.cos(angle), math.sin(angle)
        return Vec2D(self[0]*c+perp[0]*s, self[1]*c+perp[1]*s)
def rotate ( self , angle ) : perp = Vec2D ( - self [ 1 ] , self [ 0 ] ) angle = math . radians ( angle ) c , s = math . cos ( angle ) , math . sin ( angle ) return Vec2D ( self [ 0 ] * c + perp [ 0 ] * s , self [ 1 ] * c + perp [ 1 ] * s )