trimesh.typed#
- class trimesh.typed.float64(x=0, /)#
Bases:
floating
,float
Double-precision floating-point number type, compatible with Python float and C
double
.- Character code:
'd'
- Canonical name:
numpy.double
- Alias:
numpy.float_
- Alias on this platform (Linux x86_64):
numpy.float64: 64-bit precision floating-point number type: sign bit, 11 bits exponent, 52 bits mantissa.
- as_integer_ratio()#
Return a pair of integers, whose ratio is exactly equal to the original floating point number, and with a positive denominator. Raise OverflowError on infinities and a ValueError on NaNs.
>>> np.double(10.0).as_integer_ratio() (10, 1) >>> np.double(0.0).as_integer_ratio() (0, 1) >>> np.double(-.25).as_integer_ratio() (-1, 4)
- is_integer() bool #
Return
True
if the floating point number is finite with integral value, andFalse
otherwise.New in version 1.22.
Examples
>>> np.double(-2.0).is_integer() True >>> np.double(3.2).is_integer() False
- class trimesh.typed.int64#
Bases:
signedinteger
Signed integer type, compatible with Python int and C
long
.- Character code:
'l'
- Canonical name:
numpy.int_
- Alias on this platform (Linux x86_64):
numpy.int64: 64-bit signed integer (
-9_223_372_036_854_775_808
to9_223_372_036_854_775_807
).- Alias on this platform (Linux x86_64):
numpy.intp: Signed integer large enough to fit pointer, compatible with C
intptr_t
.
- bit_count() int #
Computes the number of 1-bits in the absolute value of the input. Analogous to the builtin int.bit_count or
popcount
in C++.Examples
>>> np.int64(127).bit_count() 7 >>> np.int64(-127).bit_count() 7