Cope 2.5.0
My personal "standard library" of all the generally useful code I've written for various projects over the years
|
Functions | |
def | findClosestXPoint (target, comparatorList, offsetIndex=0) |
def | getPointsAlongLine (p1, p2) |
def | rotatePoint (p, angle, pivotPoint, radians=False) |
def | getMidPoint (p1, p2) |
def | findClosestPoint (target, comparatorList) |
def | collidePoint ('Point' topLeft, Union[tuple, list, 'Size'] size, target, inclusive=True) |
def | getPointDist ('Point' a, 'Point' b) |
def Cope.experimental.point.collidePoint | ( | 'Point' | topLeft, |
Union[tuple, list, 'Size'] | size, | ||
target, | |||
inclusive = True |
|||
) |
Returns true if target is within the rectangle given by topLeft and size
def Cope.experimental.point.findClosestPoint | ( | target, | |
comparatorList | |||
) |
Finds the closest point in the list to what it's given
def Cope.experimental.point.findClosestXPoint | ( | target, | |
comparatorList, | |||
offsetIndex = 0 |
|||
) |
I've forgotten what *exactly* this does. I think it finds the point in a list of points who's x point is closest to the target
def Cope.experimental.point.getMidPoint | ( | p1, | |
p2 | |||
) |
Returns the halfway point between 2 given points
def Cope.experimental.point.getPointDist | ( | 'Point' | a, |
'Point' | b | ||
) |
def Cope.experimental.point.getPointsAlongLine | ( | p1, | |
p2 | |||
) |
I don't remember what this does.
def Cope.experimental.point.rotatePoint | ( | p, | |
angle, | |||
pivotPoint, | |||
radians = False |
|||
) |
This rotates one point around another point a certain amount, and returns it's new position