Function isBounded #
测试一个值是否是有界的。对于标量,此测试等同于 isFinite 有限性测试。另一方面,矩阵或数组被定义为有界的,如果每个条目都是有限的。
Syntax #
math.isBounded(x)
Parameters #
| Parameter | Type | Description |
|---|---|---|
x |
number | BigNumber | bigint | Complex | Fraction | Unit | Array | Matrix | 要测试的值 |
Returns #
| Type | Description |
|---|---|
| boolean | 当 x 有界时返回 true。 |
Throws #
Type | Description —- | ———–
Examples #
math.isBounded(0) // returns true
math.isBounded(NaN) // returns false
math.isBounded(math.bignumber(Infinity)) // returns false
math.isBounded(math.fraction(1,3)) // returns true
math.isBounded(math.complex('2 - 4i')) // returns true
math.isBounded(-10000000000000000n) // returns true
math.isBounded(undefined) // returns false
math.isBounded(null) // returns false
math.isBounded([0.001, -3n, 0]) // returns true
math.isBounded([2, -Infinity, -3]) // returns false