Cope 2.5.0
My personal "standard library" of all the generally useful code I've written for various projects over the years
Loading...
Searching...
No Matches
Functions
Cope.experimental.point Namespace Reference

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)
 

Function Documentation

◆ collidePoint()

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 

◆ findClosestPoint()

def Cope.experimental.point.findClosestPoint (   target,
  comparatorList 
)
 Finds the closest point in the list to what it's given

◆ findClosestXPoint()

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

◆ getMidPoint()

def Cope.experimental.point.getMidPoint (   p1,
  p2 
)
 Returns the halfway point between 2 given points 

◆ getPointDist()

def Cope.experimental.point.getPointDist ( 'Point'  a,
'Point'  b 
)

◆ getPointsAlongLine()

def Cope.experimental.point.getPointsAlongLine (   p1,
  p2 
)
 I don't remember what this does. 

◆ rotatePoint()

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