KVector3d.isParallel() method
在特定容差下判断两个向量是否平行。 当checkFuzzyZeroVec为真时,如果两个向量中的任意一个长度在容差内接近零,结果直接为false。 当checkFuzzyZeroVec为假时,如果两个向量中的任意一个长度精确的等于零,结果直接为false。
Check if this vector is parallel with other vector with specified tolerance. If checkFuzzyZeroVec is true and any vector's length is nearly zero with the tolerance, false will be return directly. If checkFuzzyZeroVec if false, only when any vector's length is exact 0, false will be returned directly.
Signature:
isParallel(other: KVector3d, tolerance?: number, checkFuzzyZeroVec?: boolean): boolean;
Links: isParallel(other: KVector3d, tolerance?: number, checkFuzzyZeroVec?: boolean): boolean;
Parameters
Parameter | Type | Description |
---|---|---|
other | 要比较的向量。 The vector to compare this vector with. | |
tolerance | number | (Optional) 指定的容差。默认值是1e-6。 The specified tolerance.The default value is 1e-6. |
checkFuzzyZeroVec | boolean | (Optional) 默认checkFuzzyZeroVec是真。 The default value is true. |
Returns:
boolean
如果平行则返回true。
Return true if parallel, otherwise return false.