Utility and mathematical functions and constants.
|
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). |
|
|
|
classname(obj)
Build module.class name of this object. |
|
|
|
crosserrors(raiser=None)
Get/set cross product exceptions. |
|
|
|
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. |
|
|
|
fmean(floats)
Compute the mean of float values. |
|
|
|
fpolynomial(x,
*cs)
Evaluate the polynomial sum(cs[i] * x**i),
i=0..len(cs)). |
|
|
|
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. |
|
|
|
fsum(iterable)
Return an accurate floating point sum of values in the iterable. |
|
|
|
ft2m(feet)
Convert feet to meter (m). |
|
|
|
halfs(str2)
Split a string in 2 halfs. |
|
|
|
haversine(lat1,
lon1,
lat2,
lon2,
radius=6371008.77141)
Compute the distance between two points 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). |
|
|
|
inStr(inst,
*args,
**kwds)
Return the string representation of an instance. |
|
|
|
isfinite(obj)
Check for Inf and NaN values. |
|
|
|
isint(obj,
both=False)
Check for integer type or integer value. |
|
|
|
isNumpy2(obj)
Check for Numpy2LatLon points wrapper. |
|
|
|
|
|
issequence(obj,
*excluded)
Check for sequence types. |
|
|
|
isTuple2(obj)
Check for Tuple2LatLon points wrapper. |
|
|
|
iterNumpy2(obj)
Iterate over Numpy2 wrappers or other sequences exceeding the
threshold. |
|
|
|
|
|
len2(seq)
Make built-in function len 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 return a tuple
of results. |
|
|
|
map2(func,
*args)
Apply arguments to a function and return a tuple of results. |
|
|
|
polygon(points,
closed=True,
base=None)
Check a polygon given as an array, list, sequence, set or tuple of
points. |
|
|
|
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. |
|
|
|
scalar(value,
low=2.22044604925e-16,
high=1.0,
name=' scalar ' )
Validate a scalar. |
|
|
|
tan_2(rad)
Compute the tangent of half angle. |
|
|
|
tanPI_2_2(rad)
Compute the tangent of half angle, 90 degrees 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. |
|
|