Utility and mathematical functions and constants.
|
fsum(iterable)
Return an accurate floating point sum of values in the iterable. |
|
|
|
degrees(x)
Convert angle x from radians to degrees. |
|
|
|
hypot(x,
y)
Return the Euclidean distance, sqrt(x*x + y*y). |
|
|
|
radians(x)
Convert angle x from degrees to radians. |
|
|
|
cbrt(x)
Compute the cubic root x**(1/3). |
|
|
|
cbrt2(x)
Compute the cubic root squared x**(2/3). |
|
|
|
degrees90(rad)
Convert and wrap radians to degrees -270..+90. |
|
|
|
degrees180(rad)
Convert and wrap radians to degrees -180..+180. |
|
|
|
degrees360(rad)
Convert and wrap radians to degrees 0..+360. |
|
|
|
false2f(value,
name=' value ' ,
false=True)
Convert a false east-/northing to non-negative float. |
|
|
|
favg(v1,
v2,
f=0.5)
Return the weighted average of two values. |
|
|
|
fdot(a,
*b)
Return the precision dot product sum(a[i] * b[i] for
i in range(len(a))). |
|
|
|
fdot3(a,
b,
c,
start=0)
Return the precision dot product sum(a[i] * b[i] *
c[i] for i in range(len(a))) + start. |
|
|
|
fStr(floats,
prec=6,
sep=' , ' ,
fmt=' %.*f ' ,
ints=False)
Convert floats to string, optionally with trailing zero decimals
stripped. |
|
|
|
fStrzs(fstr)
Strip trailing zero decimals from a float string. |
|
|
|
ft2m(feet)
Convert feet to meter (m). |
|
|
|
halfs(str2)
Split a string in 2 halfs. |
|
|
|
hsin(rad)
Compute the Haversine value of an angle. |
|
|
|
hsin3(a2,
a1,
b21)
Compute the angular distance using the Haversine formula. |
|
|
|
hypot1(x)
Compute the norm sqrt(1 + x**2). |
|
|
|
hypot3(x,
y,
z)
Compute the norm sqrt(x**2 + y**2 + z**2). |
|
|
|
isint(obj,
both=False)
Check for integer types and value. |
|
|
|
|
|
len2(xtor)
Make built-in len () function work for
generators, iterators, etc. |
|
|
|
m2ft(meter)
Convert meter to feet (ft). |
|
|
|
m2km(meter)
Convert meter to kilo meter (km). |
|
|
|
m2NM(meter)
Convert meter to nautical miles (NM). |
|
|
|
m2SM(meter)
Convert meter to statute miles (SM). |
|
|
|
map1(func,
*args)
Apply each argument to a single-argument function and returns a tuple
of results. |
|
|
|
map2(func,
*args)
Apply arguments to a function and returns a tuple of results. |
|
|
|
radiansPI(deg)
Convert and wrap degrees to radians -PI..+PI. |
|
|
|
radiansPI2(deg)
Convert and wrap degrees to radians 0..+2PI. |
|
|
|
radiansPI_2(deg)
Convert and wrap degrees to radians -3PI/2..+PI/2. |
|
|
|
tanPI_2_2(rad)
Compute tan of half angle, rotated. |
|
|
|
wrap90(deg)
Wrap degrees to -270..+90. |
|
|
|
wrap180(deg)
Wrap degrees to -180..+180. |
|
|
|
wrap360(deg)
Wrap degrees to 0..+360. |
|
|
|
wrapPI(rad)
Wrap radians to -PI..+PI. |
|
|
|
wrapPI2(rad)
Wrap radians to 0..+2PI. |
|
|
|
wrapPI_2(rad)
Wrap radians to -3PI/2..+PI/2. |
|
|