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 | absdeg (angle) |
def | absrad (angle) |
def | dist (ax, ay, bx, by) |
def | normalize2rad (a) |
def | normalize2deg (a) |
def | constrainToUpperQuadrants (ang, deg=False) |
def | negPow (num, exp) |
def | round2 (num, digits=3, tostr=True, int scinot=False) |
def | largest_square (n, sideLen=1) |
def Cope.experimental.geometry.absdeg | ( | angle | ) |
If an angle (in degrees) is not within 360, then this cuts it down to within 0-360
def Cope.experimental.geometry.absrad | ( | angle | ) |
If an angle (in radians) is not within 2Pi, then this cuts it down to within 0-2Pi
def Cope.experimental.geometry.constrainToUpperQuadrants | ( | ang, | |
deg = False |
|||
) |
def Cope.experimental.geometry.dist | ( | ax, | |
ay, | |||
bx, | |||
by | |||
) |
def Cope.experimental.geometry.largest_square | ( | n, | |
sideLen = 1 |
|||
) |
Take the square root of the input number and round down to the nearest integer
def Cope.experimental.geometry.negPow | ( | num, | |
exp | |||
) |
Raise num to exp, but if num starts off as negative, make the result negative
def Cope.experimental.geometry.normalize2deg | ( | a | ) |
def Cope.experimental.geometry.normalize2rad | ( | a | ) |
def Cope.experimental.geometry.round2 | ( | num, | |
digits = 3 , |
|||
tostr = True , |
|||
int | scinot = False |
||
) |